Arduino Sensors # 01 - Vibration Sensor

Vibration sensor is a kind of hardware. It is not like other electronic sensors. This sensor can be seen as a module as well as separate sensor.
Let's start with Easy Mades.

But in this tutorial i have used the vibration sensor only. I hope it will help you to understand the sensors's behavior easily.

If you shake the sensor you can feel and hear something is moving inside the sensor. Arduino programme detects that movement itself to calculate the sensitivity.

You only need following few componants

01. 1K resister
02.Vibration sensor
03.Arduino Uno + Atmega 328 chip.

Circuit diagram as follows.

You can wire the circuit as shown below.

Copy and paste following code and upload .


 * Arduino Shock Sensor
int shock = A0;

void setup() {
  // put your setup code here, to run once:

void loop() {
  // put your main code here, to run repeatedly:


Watch the following video for more details.

**********Your comments are highly appreciated***********


  1. If i wanted to use this sensor to control power to a 12 volt circuit, how could that be done? that is, whenever there is a vibration, power to the circuit stops and vice versa.

    thank you

    1. You can connect a relay or a transistor to control external circuit. do you know how to code in arduino?


Copyright © 2013 Easy Mades