The GY-87 sensor module is a versatile component that combines multiple sensors in a single package. Its common features include a 3-axis accelerometer, a 3-axis gyroscope, a 3-axis magnetometer, and optionally, a barometer/altitude sensor and a temperature sensor. These sensors allow the module to measure linear acceleration, angular rate of rotation, magnetic field strength and direction, atmospheric pressure (altitude), and ambient temperature. The specific sensors included may vary depending on the module variant or manufacturer. It's important to consult the documentation provided by the manufacturer or supplier for accurate information about the features of a particular GY-87 module.
This code is a basic earthquake alarm system using an MPU6050 sensor with an Arduino Uno. The MPU6050 sensor measures acceleration in three axes (X, Y, Z) and calculates the total acceleration. The code continuously reads the acceleration values from the sensor and compares the total acceleration to a predefined threshold.
If the total acceleration exceeds the threshold, indicating a significant movement or vibration, the alarm is triggered. The alarm is represented by an LED that blinks and a buzzer that emits a sound. The LED turns on and off rapidly, while the buzzer emits a continuous tone for a brief period.
The purpose of this code is to demonstrate how to use the MPU6050 sensor to detect vibrations or movements that could be indicative of an earthquake. When an earthquake-like motion is detected, the alarm is activated to alert the user.
By measuring the acceleration in three axes (X, Y, Z) and calculating the total acceleration, the sensor can provide an indication of significant motion.
The threshold value for total acceleration can be adjusted to customize the sensitivity of the earthquake alarm.
When the total acceleration exceeds the threshold, the alarm system is triggered, indicating the possibility of an earthquake.
The LED and buzzer serve as visual and auditory indicators to alert the user when an earthquake-like motion is detected.
This project demonstrates the potential of using sensor technology for earthquake detection and early warning systems.