A portable earthquake warning system prototype using tilt sensors and Arduino, developed for 2024 4006-TUBITAK Program.
Quake-Clock is a 4006-TUBITAK Program project that was presented in 2024. This repository contains and explains the prepared and presented prototype of the project in detail.
The project aims to use a portable and widely used item, like a clock, to enable the recognition of an earthquake and warn its users in any case to prevent losses.
A view of the prototype of the project. In the image, all components and the system are placed on a desk clock. a 9V battery used to make the system portable can also be seen next to the UNO.
You can review the simulation on Tinkercad and test yourself by clicking the simulation image below:
Initially, you should hear the startup melody and observe the LED blinking once when you run the simulation, which indicates system has successfully started up. To test the system, you have to click on the tilt sensors and continously change the tilt detected by the sensors.
Earthquake detection in this project is based on estimating the transition rate of binary signals from the tilt sensors. This rate is calculated by counting signal state changes within a fixed time window (buffer duration) and dividing it by the total time. When the threshold frequency value is exceeded, system determines that an earthquake has occured and alerts the user.
There are a few points that need clarification. While developing the prototype, we didn't have an accelerometer and couldn't obtain one. So, instead of an accelerometer, we decided to use mercury tilt sensors to detect accelerations. Also, for a better coverage and precision we used two different sensors facing in different directions. Unfortunately, however, the use of tilt sensors has important drawbacks, as detailed under the 'Suggestions' title. Therefore, the methods used in this project and designs shouldn't be used in a real product.
| Name of the Component | Amount | Average Price |
|---|---|---|
| Arduino UNO | 1 | ~340-345₺ |
| 400 pin breadboard | 1 | ~56,5-56,7₺ |
| Mercury tilt sensor | 2 | ~39-40₺ × 2 = ~79-80₺ |
| Red LED diode | 1 | ~0,70-0,75₺ |
| 12mm buzzer | 1 | ~8,20-8,25₺ |
| 330Ω 1/4W resistor | 1 | ~0,40-0,45₺ |
Components' prices are calculated in June 2024. The total price is approximately ~485-492₺.
The LED diode and the resistor used for its protection are not mandatory components. If a visual warning is important, they can be added to the system.
Current setup has several significant problems, such as false positives and negatives. Most of the problems occurs because of the high sensitivity of the tilt sensors. Due to the simple laws of physics, tilt sensors tend to generate lots of signal interference when the system is intentionally moved during the vibration measuring. Normally, tilt sensors are not designed to measure acceleration, so these side effects must've been accepted in this design. Thus, regardless of any code change, at some point entire system must be prepared from scratch using an accelerometer, which is capable of sensing accelerations in at least 2 dimensions for a higher accuracy.
However, to adjust the sensitivity and reduce at least somewhat false positive results, threshold frequency value can be reconfigured as a dynamic variable which can be adjusted at runtime. For instance, a potentiometer can be mounted to the system and used to adjust the threshold value dynamically.
Additionally, each piece of data in the buffer can be stored as 1 bit instead of uint8_t because the entire buffer consists of binary data, which indicates tilt sensor sent signal or not each time the sensors take a measurement. This improvement will significantly reduce the memory usage, possibly by as much as 8 times smaller.
This repository is under the MIT License.