Skip to content

Earthquake Detector & Alarm using XIAO RP2040 | SekhoHub |

Earthquake Detector Alarm using XIAO RP2040


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.

XIAORP20401
Vibration SensorSW4201
Buzzer1
Jumper Wires1

XIAO RP2040 Pinout.

XIAO RP2040 Pinout

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

801s Vibration Sensor Pinout.

801s Vibration Sensor Pinout

Pin NoPin NamePin Description
1VCCVCC is the +5 volt positive pin.
2SigSignal Output
3GNDGND is the (Ground) Negative

 


Make connections according to the circuit diagram given below.circuit diagram

Wiring/Connections

XIAO RP2040Vibration SensorBuzzer
5VVCC
GNDGNDGND
D2AO
D0+ve

Uploading Code.

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

Arduino logo

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 *