In this article, I will describe what vibration swich module is, its uses, specifications, how to connect to the arduino board and a sample code to test this vibration sensor switch module.
The vibration switch module is a vibration sensor where it detects or sensitive to vibration in the environment. The module has the controller to change the vibration strength (other known as shock threshold). There are 3 pins in the vibration switch module. The pin 1 represents VCC, pin 2 represents shock output, and pin 3 represents ground. If there is enough vibration strength and it reaches the shock threshold values, the output from the vibration switch module would give a higher value (pin 2).
Vibration Switch Sensor Module Specifications:
1. Input sensor - vibration in the environment like the vibrating motor.
2. Output - numeric values (Digital output)
3. Supply voltage : 3.3V up to 5V
4. On-board LM393 voltage Comparator chip and Vibration sensing probe
5. Signal detection sensitivity can be adjusted.
You may adjust the vibration controller to adjust the desire value for a particular vibration.
Vibration switch sensor module connection to Arduino board:
1. Connect the VCC pin of vibration module to the 5V pin of Arduino.
2. Connect the Output pin of vibration module to the Analog pin 0 (A0) of Arduino.
3. Connect the GND pin of vibration module to the GND pin of Arduino.
Test code for the vibration switch sensor module
Upload the test code and open the Serial Monitor from the Arduino Editor to see the output. When you do nothing and there's no vibration in the environment, the output message that you will see in the Serial Monitor display is a series of "Quiet" text. But if you put the vibration sensor module closer to the vibrating device (like electric tootbrush or any motor) then you may see the series message display as "Vibration Detected!".
Note: If you cannot detect any vibration from any vibrating device, try to adjust the threshold controller located on the vibration sensor switch module.