shock sensor module interfacing with pic microcontroller

shock sensor module interfacing with pic microcontroller, In this article,  I am going to talk about shock sensor or vibration detection sensor module. Shock sensor module as its names suggests is used to detect shocks. It is also known as a vibration sensor. In this shock detection project, we will see how shock detection sensor works? How to interface it with pic microcontroller and how we can use it in real time embedded systems projects. I will be using pic16F877A microcontrollershock sensor module interfacing with pic16f877a microcontroller

you may also like to check following sensor interfacing with pic microcontroller

What is Shock Sensor Module?

Shock sensor module is a such type of sensor which sense the shock, vibration, knock or tap of anything. If the shock or vibration is excess from the limit then it gives the alarm signal to buzzer as well as with allow the circuit, controller or device to detect this vibration or shock. This shock sensor module is also known as vibration sensor and it has different types. These types easily available on online shop. Every shock sensor module almost covers the six square meter distance from each side of mounting thing therefore they are very useful for security purposes. They are easily installed at windows or main gate of any building or house for security purposes. A simple shock sensor module is shown in figure 1Shock Sensor Module

Figure 1 Simple Shock Sensor Module

Pin Configuration of Shock Sensor Module

 Every shock senor module consists of three pins. Two pins are used for power on this module such as positive 5 volts and ground. Third pin is used for sensing the vibration and giving the logic high signal to any type of controller such as microcontroller or Arduino etc. shown in figure configuration of shock sensor module

Figure 2 Shock Sensor Module Pins

Normally, shock sensor module is installed in two configurations such as pull down resistor configuration and pull up resistor configuration. In pull down resistor configuration, a 10k ohm resistor is connected in between pin 1 and 2, pin 3 is used for positive supply and pin 2 is also used for ground. Similarly, in pull up resistor configuration 10K ohm resistor is also connect between 1 and 2 but positive supply voltages are applied at pin 2 and pin 3 is connected to ground. One thing should be keep in mind during the installation of this shock sensor module that which configuration is suitable for your controller. The user can easily check each configuration from multimeter before use. Both configurations are shown in figure 3pull down and pull up shock sensor module

Figure 3                Pull Down Resistor Configuration                           Pull Up Resistor Configuration

Working Principle of Shock Sensor Module

The working principle of shock sensor module is very simple. When any one touch, hit, mover or jolt the thing where shock sensor module has installed then this sensor sends the signal to their brain or controller for indicating the intensity of this hit, move or touch. Similarly, depending on this intensity, the brain or controller sends logic high signal to buzzer, beep or sound system. Two methods are used for installing shock sensor module which we have described in detail in above paragraph. For installing this shock sensor module two metal contacts are used and along with these contacts shock sensor is installed, and we can configure these contacts with a simple switch. When any on touch these contacts then shock sensor pins are short then current flow these pins. During this, the sense pin means third pin sense this current and sends logic high signal to brain or microcontroller. Then alarm or beep would be turned on according to the intensity of touch, move or vibration.

How to Interface Shock Sensor Module with PIC16f877a Microcontroller

For acquiring proper advantages or benefits, a brain or controller is required with this shock sensor module. Different controllers such microcontroller or Arduino etc. have been using with shock sensor. But here, we will explain it with pic microcontroller PIC16F877A. This controller consists of four ports and shock sensor could be contact with any port, but that port is configured as input  port in programming. It is programmed in c language with the help of mikro/c software and is powered up with 5 volts dc voltages. Similarly, when it is connected with microcontroller then during any movement, vibration or jolt then microcontroller receives the logic low signal from sense pin of shock sensor.

Because the shock sensor module we are using is a active low shock sensor module.  an alarm system or buzzer is connected at the output of microcontroller therefore microcontroller would be turned on or off the alarm or buzzer after some processing the logic low signal. Because the shock Microcontroller is the main intelligent controller with the shock sensor module therefore it has done all the work more precisely and efficiently during any emergency situation.

so to interface shock sensor with pic16f877a microcontroller, we need to use one digital input pin of microcontroller.  I have pin number 5 of PORTB as a digital input pin. If you don’t know how to use digital input output pins of pic microcontroller I recommend you to check this article.

PORTD of pci16F877A microcontroller is used as a digital output. Whenever microcontroller detects a shock, digital output pins of PORTD goes high and also alarm connected with PORTE pin number zero starts giving sound. For more information check the project demonstration in video given below:

Add Comment