Linkit ONE: Earthquake Detector
by Diwask in Circuits > Microcontrollers
1077 Views, 6 Favorites, 0 Comments
Linkit ONE: Earthquake Detector
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......
It uses a mercury tilt switch to detect earthquakes then, a buzzer beeps to give an alert.
So let's get started......
Parts Required
The following parts are required for this project:
• Linkit ONE
• Lithium battery
• Jumper wires
• Mercury tilt switch
• Buzzer module
• Breadboard
• BC547 transistor
• Linkit ONE
• Lithium battery
• Jumper wires
• Mercury tilt switch
• Buzzer module
• Breadboard
• BC547 transistor
Connect the Battery
Connect the 3.7v Lithium battery provided with the package to it's respective socket on the linkit one board.
Connect the Buzzer
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
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
• Vcc ------------- 5v linkit
• Gnd -------------- Gnd
• Out --------------- A0
Upload the Code
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);
}
//
\\
void setup()
{
pinMode(2, OUTPUT)
}
void loop()
{
if(analogRead(A0) == HIGH)
{
digitalWrite(2, HIGH);
}
else
digitalWrite(2, LOW);
}
//
Test
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!!
This is the end of this instructable. Thanks for watching!!