Project tutorial
Vibration Sensor Module

Vibration Sensor Module © GPL3+

I will explain how connect Arduino with Vibration sensor and LED.

  • 66,353 views
  • 9 comments
  • 19 respects

Components and supplies

Apps and online services

About this project

In this project, we will connect Arduino with Vibration sensor and LED. When no vibration is detected, Vibration sensor output is 0 (low voltage),otherwise its output is 1(high voltage)。 If Arduino get 0 (no vibration) from vibration sensor it will turn on green LED and turn off Red LED. If Arduino get 1 from vibration sensor, it will turn on Red LED and turn off green LED.

Code

Vibration Sensor Module (Code)Arduino
int vib_pin=7;
int led_pin=13;
void setup() {
  pinMode(vib_pin,INPUT);
  pinMode(led_pin,OUTPUT);
}

void loop() {
  int val;
  val=digitalRead(vib_pin);
  if(val==1)
  {
    digitalWrite(led_pin,HIGH);
    delay(1000);
    digitalWrite(led_pin,LOW);
    delay(1000);
   }
   else
   digitalWrite(led_pin,LOW);
}

Schematics

Vibration Sensor Module
Vibration sensor module mgazacbgvc

Comments

Similar projects you might like

touch sensor

Project tutorial by tech guy

  • 22,938 views
  • 4 comments
  • 12 respects

Touch Sensor and Sound Sensor Controlling AC/DC Lights

Project showcase by Anbumachi

  • 3,488 views
  • 2 comments
  • 7 respects

Arduino UNO and Vibration Sensor with Relay

Project tutorial by MichDragstar

  • 2,642 views
  • 2 comments
  • 10 respects

HOW PIR SENSOR WORK

Project tutorial by DIY Partners

  • 12,693 views
  • 8 comments
  • 43 respects
Add projectSign up / Login