Skip to content

Earthquake Detector & Alarm using XIAO RP2040| SekhoHub|


Overview.

Earthquakes are scary natural disasters that can cause a lot of damage and danger. Imagine if there was a way to know when an earthquake might happen a little bit before it does. That would give us time to protect ourselves and our things.

In today’s tutorial, we are going to make an “Earthquake Detector” using the XIAO RP2040 Microcontroller and Vibration Sensor.


What is an Earthquake Detector?

An earthquake detector is a device designed to sense and detect movements or vibrations in the ground that occur during an earthquake. The detector can use various sensors, such as accelerometers or gyroscopes, to pick up these movements. When it senses unusual ground activity, it triggers an alarm or sends out warnings to alert people in advance about the possibility of an impending earthquake


Materials for the Project.

XIAO RP2040 1
Vibration Sensor SW420 1
Buzzer 1
Jumper Wires 1

XIAO RP2040 Pinout.

Pin No Pin Name
1 P26 / A0 / D0
2 P27 / A1 / D1
3 P28 / A2 / D2
4 P29 / A3 / D3
5 P6 / SDA/ D4
6 P7 / SCL / D5
7 P0 / TX / D6
8 P1 / RX / CSN / D7
9 P2 / SCK / D8
10 P3 / MISO / D9
11 P4 / MOSI / D10
12 3V3
13 GND
14 5V

801s Vibration Sensor Pinout.

Pin No Pin Name Pin Description
1 VCC VCC is the +5 volt Positive Pin
2 Sig Signal Output
3 GND GND is the (Ground) Negative

 


Make connections according to the circuit diagram given below.

Wiring / Connections

XIAO RP2040 Vibration Sensor Buzzer
5V VCC
GND GND GND
D2 AO
D0 +ve

Uploading Code.

Now copy the following code and upload it to Arduino IDE Software.

So that’s it for today’s Project I hope you have enjoyed this

Project for more Project like that stay tuned and I will see you in the next Project.

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *