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, 4:26 AM EDT
thank you prasanna
Prasanna MuraliPosted May 20, 2016, 6:15 AM EDT
Nice one...
Sr KarthigaPosted Apr 7, 2016, 6:06 PM EDT
Thank you Rahul saxena sir
Rahul Kumar SaxenaTOP 100Posted Apr 4, 2016, 3:51 AM EDT
Good Show
Sr KarthigaPosted Mar 29, 2016, 4:24 AM EDT
thank you mohammed sir
Sr KarthigaPosted Mar 29, 2016, 4:24 AM EDT
thank you kumaresh sir
Sr KarthigaPosted Mar 29, 2016, 4:23 AM EDT
thank you kumares sir
Sr KarthigaPosted Mar 29, 2016, 4:23 AM EDT
Thank you vignesh mani sir
Mohammed IbrahimPosted Mar 28, 2016, 12:11 AM EDT
nice
Debasis SahaTOP 100Posted Mar 27, 2016, 8:39 PM EDT
Good One..
Kumaresh RajalingamPosted Mar 27, 2016, 5:15 PM EDT
Nice share
Kumaresh RajalingamPosted Mar 27, 2016, 5:15 PM EDT
Nnice share
Sr KarthigaPosted Mar 27, 2016, 4:56 PM EDT
Thank you vignesh mani sir
Vignesh ManiTOP 100Posted Mar 27, 2016, 11:40 AM EDT
Good One.