Linkit ONE: Earthquake Detector

by Diwask in Circuits > Microcontrollers

1077 Views, 6 Favorites, 0 Comments

Linkit ONE: Earthquake Detector

temp_951263408.jpg
This instructable will guide you through the process of making an earthquake detector using the Mediatek Linkit ONE. This can be useful in earthquake prone areas as this project is very sensitive to any type of vibrations.

It uses a mercury tilt switch to detect earthquakes then, a buzzer beeps to give an alert.

So let's get started......

Parts Required

DSC00170.JPG
DSC00167.JPG
temp_1092529716.jpg
DSC00171.JPG
DSC00176.JPG
DSC00206.JPG
The following parts are required for this project:



• Linkit ONE
• Lithium battery
• Jumper wires
• Mercury tilt switch
• Buzzer module
• Breadboard
• BC547 transistor


Connect the Battery

temp_1390230777.jpg
temp_1325486530.jpg
temp_323841534.jpg
temp_259513985.jpg
Connect the 3.7v Lithium battery provided with the package to it's respective socket on the linkit one board.

Connect the Buzzer

DSC00222.JPG
DSC00221.JPG
DSC00220.JPG
Connect your buzzer module to linkit one through a BC547 transistor as shown in the image above. The transistor is required to make the buzzer more louder when there is a tilt detected in the switch. Use a breadboard and jumper wires to connect it.

Connect the Tilt Switch

DSC00208.JPG
DSC00216.JPG
DSC00214.JPG
DSC00212.JPG
A tilt switch is a kind of a sensor that closes when it is tilted. It has mercury inside which on tilting completes the circuit. Here it will be used to detect an earthquake. Connect it as per the following:



• Vcc ------------- 5v linkit
• Gnd -------------- Gnd
• Out --------------- A0


Upload the Code

temp_1489289927.jpg
Upload the code given below to your linkit one. The switches should be in USB, UART and SPI positions.

\\
void setup()
{
pinMode(2, OUTPUT)
}
void loop()
{
if(analogRead(A0) == HIGH)
{
digitalWrite(2, HIGH);
}
else
digitalWrite(2, LOW);
}
//

Test

temp_1668519475.jpg
Finally, switch the device on and keep the tilt switch in a stable situation. On making the switch move, the buzzer will beep.

This is the end of this instructable. Thanks for watching!!