Introduction
- Arduino UNO/MEGA/PRO
- 1x Vibration Tilt Switch
- 1x LED
- 1x 220 k Resistor
- 1x 10k Resistor.
Connection
Connection from the Vibration Tilt Switch to Arduino Mega 2560:

Figure 1: Vibration Tilt Switch
- Sensor Board
- Vcc------->5V.
- Gnd------->Gnd.
- Din-------->02.
- Connection From Led To ArduinoMega2560:
- Postive pin(Dout)-------->13
- Negative pin------->Gnd.
Programming
- int Din = 2;
- int Dout = 13;
- int LEDStatus = HIGH;
- int Reading;
- int Previous = LOW;
- long DTime = 0;
- long Dbounce = 50;
- void setup()
- {
- pinMode(Din, INPUT);
- digitalWrite(Din, HIGH);
- pinMode(Dout, OUTPUT);
- }
- void loop()
- {
- int ReadingState;
- Reading = digitalRead(Din);
- if (Reading != Previous)
- {
- DTime = millis();
- }
- if ((millis() - DTime) > Dbounce)
- {
- ReadingState = Reading;
- if (ReadingState == HIGH) LEDStatus = LOW;
- else LEDStatus = HIGH;
- }
- digitalWrite(Dout, LEDStatus);
- Previous = Reading;
- }
Explanation
It will explain the earth level where we have a fix.
When an earthquake occurs, LED will ON.
When it does not occur, LED will OFF.
Output

Figure 2
Read more articles on Arduino:

Sr KarthigaPosted May 25, 2016, 8:26 AM
thank you prasanna
Prasanna MuraliPosted May 20, 2016, 10:15 AM
Nice one...
Sr KarthigaPosted Apr 7, 2016, 10:06 PM
Thank you Rahul saxena sir
Rahul Kumar SaxenaPosted Apr 4, 2016, 7:51 AM
Good Show
Sr KarthigaPosted Mar 29, 2016, 8:24 AM
thank you mohammed sir
Sr KarthigaPosted Mar 29, 2016, 8:24 AM
thank you kumaresh sir
Sr KarthigaPosted Mar 29, 2016, 8:23 AM
thank you kumares sir
Sr KarthigaPosted Mar 29, 2016, 8:23 AM
Thank you vignesh mani sir
Mohammed IbrahimPosted Mar 28, 2016, 4:11 AM
nice
Debasis SahaPosted Mar 28, 2016, 12:39 AM
Good One..
Kumaresh RajalingamPosted Mar 27, 2016, 9:15 PM
Nice share
Kumaresh RajalingamPosted Mar 27, 2016, 9:15 PM
Nnice share
Sr KarthigaPosted Mar 27, 2016, 8:56 PM
Thank you vignesh mani sir
Vignesh ManiPosted Mar 27, 2016, 3:40 PM
Good One.