In this illustration we will going to wire the vibration switch module, this module is default OFF when external vibration force or a movement speed from the sensor, a conductive pin will switch ON change the electrical property of the sensor, when the external force disappears the electrical property will open and turn to OFF. This vibration sensor is suitable for small current trigger circuit.
Required Components
- Arduino Board
- Vibration Sensor Module
- Solder Less Bread Board
- Jumper Wire / DuPont Wires
- LED Any Color
- Resistor 220K
Wiring Diagram
Arduino Sketch
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
int Led = 13 ;// Define the LED as OUTPUT int Shock = 10; // Define the vibration sensor switch int mymyval; // define numeric variables myval void setup () { pinMode (Led, OUTPUT) ; // define LED as output interface pinMode (Shock, INPUT) ; // output interface defines vibration sensor } void loop () { myval = digitalRead (Shock) ; // reading the digital interface is assigned a myvalue of 3 myval if (myval == HIGH) // When the vibration sensor detects a signal, the LED will turn to HIGH { digitalWrite (Led, LOW); // Turn LED to LOW } else { digitalWrite (Led, HIGH); // Turn LED to HIGH } } |
Wiring the Vibration Sensor Switch Module on Arduino