Earthquake Warning Device....!!!.
Intro: Earthquake Warning Device....!!!.
Hello Makers....
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....
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)
Link:- http://www.amazon.com/gp/aw/d/B005GYATUG/ref=mp_s_a_1_4?qid=1430585122&sr=8-4π=AC_SX110_SY165_QL70&keywords=breadboard
2. Tilt switch
Link:- http://www.amazon.com/gp/aw/d/B00VUS24BY/ref=mp_s_a_1_14?qid=1430585222&sr=8-14π=AC_SX110_SY165_QL70&keywords=tilt+switch
3. Piezo buzzer
Link:- http://www.amazon.com/gp/aw/d/B00DKC993O/ref=mp_s_a_1_4?qid=1430585426&sr=1-4π=AC_SX110_SY165_QL70&keywords=piezo+buzzer+3v
4. Arduino with jumper cables
Link:- http://www.rs-components.com/arduino/index.html
5. 1k ohm resistor
6. A computer/laptop to load program to arduino
Link:- http://www.amazon.com/gp/aw/d/B005GYATUG/ref=mp_s_a_1_4?qid=1430585122&sr=8-4π=AC_SX110_SY165_QL70&keywords=breadboard
2. Tilt switch
Link:- http://www.amazon.com/gp/aw/d/B00VUS24BY/ref=mp_s_a_1_14?qid=1430585222&sr=8-14π=AC_SX110_SY165_QL70&keywords=tilt+switch
3. Piezo buzzer
Link:- http://www.amazon.com/gp/aw/d/B00DKC993O/ref=mp_s_a_1_4?qid=1430585426&sr=1-4π=AC_SX110_SY165_QL70&keywords=piezo+buzzer+3v
4. Arduino with jumper cables
Link:- http://www.rs-components.com/arduino/index.html
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;
void setup()
{
pinMode(BUZZER_PIN, OUTPUT);
}
void loop()
{
tiltValue = analogRead(TILT_SWITCH_PIN);
if(abs(tiltValue - previousTiltValue) >= valueThreshold)
{
time = time + 1;
}
else
{
reset();
}
if(time >= timeThreshold)
{
analogWrite(BUZZER_PIN, MAX);
delay(500);
reset();
}
previousTiltValue = tiltValue;
delay(500);
}
void reset()
{
time = 0;
previousTiltValue = 0;
analogWrite(BUZZER_PIN, 0);
}
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;
void setup()
{
pinMode(BUZZER_PIN, OUTPUT);
}
void loop()
{
tiltValue = analogRead(TILT_SWITCH_PIN);
if(abs(tiltValue - previousTiltValue) >= valueThreshold)
{
time = time + 1;
}
else
{
reset();
}
if(time >= timeThreshold)
{
analogWrite(BUZZER_PIN, MAX);
delay(500);
reset();
}
previousTiltValue = tiltValue;
delay(500);
}
void reset()
{
time = 0;
previousTiltValue = 0;
analogWrite(BUZZER_PIN, 0);
}
STEP 3: Finally Solder Everything
once you test that the device is working...solder everything.....
8 Comments
Saiyam 8 years ago
There have been earthquakes coming recently in the place I live and this can be quite useful in such case. If you are from northern India, you would felt that as well. Isn't it?
rshacker86 8 years ago
selp 9 years ago
it's too late when the sensor is triggerd ...
rshacker86 9 years ago
Good Luck
rshacker86 9 years ago
Kiteman 9 years ago
"What's that buzzing noise?"
"What?"
"That buzzing noise, what is it?"
"Buzzing noise? I can't hear any buzzing over the noise of collapsing buildings!"
;-)
rshacker86 9 years ago
.
just place the buzzer into it and fix it with a glue gun...but be sure not to spoil the buzzer with glue
rshacker86 9 years ago
Good Luck
Please vote if you like it