Vibration Sensor Switch

Background

vibrationsensor.jpg

The cheap version of an accelerometer/motion sensor! These spring-vibration switches are medium sensitivity non-directional vibration induced trigger switches. Inside is a medium hardness spring coiled around a long metal pin. When the switch is moved, the spring touches the center pole to make contact. So, when there's motion, the two pins will act like a closed switch. When everything is still, the switch is open. Great for basic projects and wearables!

 

Hardware Description

You will wire this up just like you would a pushbutton switch. Connect one pin to ground and the other to a digital pin that will be configured with an internal pull-up resistor.

 

Software Description

The switch will be wired up to a digital pin as an input with an internal pull-up resistor. Use pinMode() to configure the mode to be INPUT_PULLUP. When there is no vibration detected, the pin will read as HIGH. When vibration is detected, it will intermittently read as LOW.

 

Resources