Introduction: Earthquake Warning Device....!!!.
All of you might be aware about the earthquake the struck Nepal a week ago.... I too felt that....It was scary.....
Then I thought of making a device that could detect an earthquake and sound an alarm..So what else could do the job except a MINI COMPUTER OR AN ARDUINO
So roll up your sleeves and get started...
Though its a bit costly....but what costs more than life....
Step 1: Materials
1. A breadboard...(Large or small)
2. Tilt switch
3. Piezo buzzer
4. Arduino with jumper cables
5. 1k ohm resistor
6. A computer/laptop to load program to arduino
Step 2: Building the Life Saver
Follow the schematic , make all connections and then load the following program on arduino
Copy after this------>
#define TILT_SWITCH_PIN A0
#define BUZZER_PIN 10
#define MAX 100
int tiltValue = 0;
int previousTiltValue = 0;
int valueThreshold = 5;
int timeThreshold = 2 ;
int time = 0;
tiltValue = analogRead(TILT_SWITCH_PIN);
if(abs(tiltValue - previousTiltValue) >= valueThreshold)
time = time + 1;
if(time >= timeThreshold)
previousTiltValue = tiltValue;
time = 0;
previousTiltValue = 0;
Step 3: Finally Solder Everything
once you test that the device is working...solder everything.....
We have a be nice policy.
Please be positive and constructive.