Development of Earthquake Detection
Development of Earthquake Detection
S & M 3240
Earthquakes often cause severe disasters. Taiwan is located in an earthquake zone, where
earthquakes occur frequently. For example, the Meinong earthquake in Kaohsiung in 2016 and
the Hualien earthquake in 2018 caused the collapse of buildings in Tainan and Hualien, resulting
in a total of 232 deaths and more than 100 injuries. Due to the strong vibration, earthquakes are
often accompanied by fire and the leakage of toxic gases, causing loss of life and property. In
this study, we integrate Arduino, sensors, and transmission technology to design an earthquake
detection and warning system. When an earthquake is detected, the system immediately notifies
everyone to evacuate. When the harmful gas concentration exceeds a critical value, the warning
light is switched on, and the exhaust fan is turned on to extract the indoor toxic gas. When the
flame sensor detects a flame, the system activates an alarm to warn people to escape quickly. In
the designed system, capacitive three-axis accelerators are used as vibration measurement
sensors to issue warnings in the early stage of an earthquake. In addition, the system includes an
IR flame sensor to detect fires and an MQ series air quality sensor to detect harmful gases. The
newly designed sensing system not only has the advantage of notifying people immediately
during an earthquake but is also cheap and easy to use.
1. Introduction
Taiwan experiences frequent seismic activity due to the ongoing subduction of the Philippine
and Eurasian plates.(1) Old buildings are often cracked and tilted due to earthquakes. As shown
in Fig. 1(a),(2) the 2016 Meinong earthquake in Kaohsiung caused a building to collapse in
Yongkang District, Tainan City, killing 115 people. Figure 1(b) shows a building that collapsed
during the Hualien earthquake in 2018.(3) This earthquake was the most severe in Taiwan since
the Kaohsiung Meinong earthquake in 2016. The quake caused four buildings to collapse and 17
people to die. Earthquakes are often accompanied by fires and toxic gas leakage. Therefore,
their detection is also necessary when an earthquake occurs.
In this study, we integrate embedded systems, wireless transmission technology, network
access, and sensors to design an earthquake-sensing system. When an earthquake is detected,
*Corresponding author: e-mail: [email protected]
https://doi.org/10.18494/SAM4116
(a) (b)
Fig. 1. (Color online) (a) Building collapse caused by the Kaohsiung Meinong earthquake. (b) Building collapse
caused by the Hualien earthquake in Taiwan.
the system warns users with a buzzer and notifies people immediately of a tilted building,
harmful gas leakage, or a fire.
The designed system includes Wi-Fi wireless transmission combined with a three-axis
accelerator, an MQ series sensor, and a flame sensor to detect earthquakes, harmful gases, and
fires, respectively. The system can not only warn users to escape early but also detect possible
threats to life when earthquakes occur.
2. Literature Review
Hsu(4) proposed a wireless earthquake early warning and detection system that used a three-
axis accelerometer to detect earthquakes. In the system, temperature-sensitive changes were
avoided by using capacitors with direct current (DC) to reduce noise. The sensing signal of the
three-axis accelerometer was transmitted through the serial peripheral interface (SPI). It then
sent the signal to the server using a wireless network, and a data analysis method was used to
notify the user of the risk. The advantage of the system is the use of DC capacitors to reduce the
noise density of the three-axis accelerometer. However, it only detects earthquakes and does not
warn users of building tilt, harmful gases, and fires caused by earthquakes.
Hsu and Sheu(5) proposed an ultralow-complexity algorithm for an earthquake early warning
system. The algorithm used the moving average method to eliminate short-term noise and
collected the turning points where the earthquake starts to be detected as important feature
points for earthquake identification. Then, the quadratic differentiation method was used to
differentiate the turning points and calculate the earthquake’s magnitude. The primary purpose
of their study was to quickly and accurately calculate the magnitude of earthquakes.
Sensors and Materials, Vol. 35, No. 4 (2023) 1213
technology to assess the level of pollution. As different types of sensing technologies are suitable
for different situations, they evaluated available sensor technologies, discussing the application
of sensors and their limits and possibilities for monitoring the concentration of particles and
gaseous pollutants indoors.
3. System Architecture
Figure 2 shows the architecture of the proposed system. The server, which is the data center,
is used to set up the database system required for the design and store sensor data and serves as a
monitoring interface to display data and respond to queries. The embedded system uses Arduino
as its core. The sensing modules in the system are seismic and building tilt sensor modules,
which use an ADXL345 three-axis accelerometer. Smoke, gases, and air quality are respectively
sensed by MQ-2, MQ-5, and MQ-135 sensors, and a flame is detected by an IR flame sensor.
The user interface includes functions such as user login, wireless communication operation,
database query, data statistics, and a hazard alarm, as follows:
A. User login: Responsible for creating user accounts, entering user passwords, and verifying
database access rights.
B. Wireless communication operation: Responsible for establishing a wireless connection
between the server and the Wi-Fi router, including the IP address and port setting.
C. Database query: Various data queries, including air quality, building inclination, and flame
information.
D. Data statistics: The data for a week, a month, or the whole year is presented in a graphical
interface to facilitate inquiries from users about environmental changes.
E. Hazard alarm: When an earthquake, gas leakage, or fire occurs, or the building is tilted
beyond a certain angle, the system issues a warning sound to alert users of the problem.
The accelerometer calculates the acceleration in three dimensions.(13) The proposed system
uses an ADXL345 three-axis accelerometer for earthquake sensing and building tilt detection,
which is a thin, short gravity sensor with low power consumption. It consists of fixed and
moving plates that deflect in any direction subject to acceleration in the x, y, and z directions.(14)
Its digital output data is in the format of a 16-bit binary code, which is transmitted with an SPI or
I2C digital serial transfer. It is ideal for static acceleration or center-of-gravity tilt sensing
applications, and its high resolution (4 mg/LSB) enables the measurement of changes in the tilt
of less than 1.0°.
Figure 3 shows the diagram of the tilt angles for ADXL345. The following angles are
calculated as(13)
Ax
α1 = tan −1 , (1)
Ay2 + Az2
Ay
β1 = tan −1 , (2)
A2 + A2
x z
Az
γ 1 = tan
−1 , (3)
Ax + Ay2
2
where Ax, Ay, and Az represent the acceleration values in the respective directions of the
coordinate axes, while α1, β1, and γ1 represent the angles between each acceleration vector and
the horizontal line.
Y
Z
ADXL345
X
γ1
α1 β1
Horizontal line
The IR flame sensing module uses IR rays that are sensitive to flames and IR receiver tubes
to detect the presence of fire, and then converts the brightness of the flames into a voltage signal
output. The critical characteristics of the flame model are as follows.
A. The module detects light sources whose flame wavelength ranges from 760 to 1100 nm.(15)
The larger the flame, the longer the test distance.
B. The detection angle is about 60° and is not sensitive to flame light.
C. The sensitivity is adjusted with an adjustable precision potentiometer.
D. The working voltage is 3.3–5 V.
E. The voltage increases with the distance from the flame source.
The output voltage in the case of no fire source is 4.8 V. When a fire occurs, the voltage value
read by Arduino is lower than 4.0 V, and the system reports a suspected fire. The statistics of the
relationship between distance from fire source and output voltage are presented in Table 1.
In this study, the air quality is monitored using MQ series sensors. These sensors detect six
different gases, namely, methane, propane, butane, smoke, carbon monoxide, and ammonia.
They have a fine porous stainless steel mesh for rapid heat transfer to prevent a gas explosion,
and they use tin dioxide (SnO2) as a gas-sensing material as it has low conductivity in clean air.
When the concentration of harmful gases in the air increases, the conductivity of the sensor
increases, and then a simple ADC conversion circuit converts the change in conductivity into an
output signal corresponding to the gas concentration. MQ sensors are classified as follows.
MQ-2: Smoke gas sensor.
MQ-3: Alcohol sensor.
MQ-4: Methane gas sensor.
MQ-5: Liquefied gas/methane sensor.
MQ-6: Propane/liquefied gas sensor.
MQ-7: Carbon monoxide/combustible gas sensor.
MQ-8: Hydrogen gas sensor.
Table 1
Relationship between distance from fire source and output voltage.
Distance (mm) Output (V) Distance (mm) Output (V)
10 0.06 20 0.07
40 0.09 60 0.1
80 0.11 100 0.13
200 0.18 300 0.19
400 0.22 500 0.25
600 0.30 700 0.32
800 0.43 900 0.50
1000 0.70 2000 1.44
8000 3.52 — —
Sensors and Materials, Vol. 35, No. 4 (2023) 1217
4. Experimental Results
Figure 4(a) shows the front view of the house model built for this study. Sensors are installed
in the upper left corner of the house. The Arduino and three-axis accelerometer are located at the
bottom of the model, and the wireless Wi-Fi router is placed behind the model house as shown in
Fig. 4(b). Figure 4(c) shows the user interface, where “IP” displays the IP address of the house
model and “3-axis accelerometer” displays the angles α1, β1, and γ1 measured by the three-axis
accelerometer. The menus “Smoke”, “Air quality”, “Gas”, and “Flame” display the indoor smoke
quantity, air quality, gas concentration, and fire monitoring value, respectively. The graphs on
the right of each monitoring item display the monitoring status, where the blue line indicates the
monitoring value and the red line indicates the critical value. When the system detects a
monitoring value exceeding the threshold, it generates a warning sound and displays the sign
“Warning message”. The “Start” button in Fig. 4(c) is used to start the system, the “End” button
is used to stop the system, and the “View” button is used to view the log of abnormal events.
Figure 5(a) shows how the up, down, left, and right displacements in an earthquake were
simulated. Figure 5(b) shows the values measured by the three-axis accelerometer. The values of
0.11, −0.29, and 0.79 indicate an earthquake, and the system sounds an alarm and displays a
warning message.
To simulate gas leakage, we use a gas lighter to generate gas at a distance of about 5 cm from
the sensor as shown in Fig. 6(a). As shown by the blue line in Fig. 6(b), when the system detects
gas with a concentration exceeding a threshold value, a warning message is displayed to inform
the user of a gas leakage.
Figure 7(a) shows the fire used for testing. We use a gas lighter to generate a flame about 5
cm from the sensor. Figure 7(b) shows that when a fire is generated, the sensor immediately
detects it and displays a fire alarm message. It also generates a warning sound. In the figure, the
blue line shows the value for the flame and the red line shows the threshold value.
(a) (b)
Fig. 5. (Color online) (a) Simulation of an earthquake. (b) Warning message generated when the sensor detects an
earthquake.
(a) (b)
Fig. 6. (Color online) (a) Gas-sensing experiment. (b) Warning message generated by the system when the sensor
detects gas.
(a) (b)
Fig. 7. (Color online) (a) Fire experiment. (b) Warning message generated when the sensor detects a fire. A
warning sound is also generated.
Next, we generate smoke by burning tissue paper as shown in Fig. 8(a). When smoke is
generated indoors, the smoke detection line in blue exceeds the red line indicating the threshold
value, and the system generates a warning sound and message.
When there is an earthquake, gas, or fire in the room, the system records the event along with
the time of occurrence in the back-end server system through the wireless network. As shown in
Fig. 9, when the user presses “View”, the system displays all abnormal events, which can be
queried.
Sensors and Materials, Vol. 35, No. 4 (2023) 1219
(a) (b)
Fig. 8. (Color online) (a) Smoke experiment. (b) Warning message generated for smoke.
Table 2
Comparison of system in this study with other systems.
Jayron et al.(7) Grover and Sharma(8) Proposed method
Earthquake detection √ √ √
Warning sound √ √ √
Harmful gas detection × × √
Flame detection × × √
Data center × √ √
Table 2 shows a comparison of the system designed in this study with other systems. A large
earthquake causing damage to buildings is often accompanied by fires and toxic gas leakage.
Therefore, it is necessary to detect earthquakes, fire, and toxic gas concentrations at the same
time. Our newly designed system detects all three, whereas the systems designed by Jayron et
al.(7) and Grover and Sharma(8) detect earthquakes but not fire and toxic gases. To detect possible
fires and abnormal toxic gas concentrations when an earthquake occurs, our system stores the
data in a cloud database through wireless transmission for subsequent inquiries. The system
designed by Grover and Sharma included a data center to store seismic data but lacked
information on fire and toxic gases. The system developed by Jayron et al. did not include a data
center. Therefore, our system has greater functionality than the other systems.
1220 Sensors and Materials, Vol. 35, No. 4 (2023)
5. Conclusions
When an earthquake occurs, the time available to find a sheltered space is only a few to a
dozen seconds. Therefore, in the early stages of an earthquake, it is important to provide early
warnings to people to seek shelter as soon as possible. To warn people of an earthquake, harmful
gas, or fire so that they can evacuate effectively, we established an earthquake disaster
prevention system combining Arduino, sensors, and 4G transmission technology. The results of
testing the system showed that it functions appropriately. In the future, the system will require
modularization and packaging so that it can be applied as a disaster prevention system in houses,
businesses, factories, public offices, and schools. The designed system provides the basis for a
large-scale application to warn people of earthquakes and accompanying fires and gas leakage.
Acknowledgments
This research was funded by the National Science and Technology Council, Taiwan (grant
number MOST 111-2637-E-262-001) and the MOE Teaching Practice Research Program (grant
number PSK1110219).
References
1 Y. M. Wu and H. Mittal: Sensors 21 (2021) 1. https://www.mdpi.com/1424-8220/21/22/7649
2 S. Mori, C. W Lu, and M. H. Wu: Ehime University Disaster Information Research Center, https://orgws.kcg.
gov.tw/001/KcgOrgUploadFiles/408/relfile/74090/215157/202221d3-3be6-4978-ab62-cbed52ae9d2f.pdf
(accessed March 2023).
3 2018 Hualien Earthquake: https://en.wikipedia.org/wiki/2018_Hualien_earthquake (accessed November 2022).
4 H. S Hsu: Low Noise Wireless Earthquake Early Detecting System, Master Thesis (Taipei University of
Technology, Taipei, 2016).
5 M. Y. Hsu and S. T. Sheu: Proc. 2016 Int. Conf. Communication Problem-Solving (ICCP, 2016) 1–2. https://
ieeexplore.ieee.org/document/7751128
6 C. E. Yoon, O. O’Reilly, K. J. Bergen, and G. C. Beroza: Sci. Adv. 1 (2015) 1. https://www.science.org/doi/
epdf/10.1126/sciadv.1501057
7 M. Jayron G. Galang, J. Ar F. Felia, M. J. T Fajutnao, C. L. C. C. Felia, and P. G. F. Jr: Int. J. Inf. Technol.
Infrastruct. 9 (2020) 10. https://www.warse.org/IJITI/static/pdf/file/ijiti01942020.pdf
8 V. Grover and A. Sharma: Int. J. Sci. Res. 6 (2017) 1044. https://www.ijsr.net/archive/v6i9/ART20176803.pdf
9 Small, Low Power, 3-Axis ±3 g Accelerometer, https://www.sparkfun.com/datasheets/Components/SMD/
adxl335.pdf (accessed November 2022).
10 S. Faiazuddin, M. V. Lakshmaiah, K. T. Alam, and M. Ravikiran: Proc. 2020 4th Int. Conf. Electronics,
Communication and Aerospace Technology (ICECA, 2020) 714–719. https://ieeexplore.ieee.org/
document/9297442
11 P. Liu, D. Fu, S. Jiang, and M. Wang: Proc. 2017 2nd Int. Conf. Cybernetics, Robotics and Control (CRC)
(IEEE, 2017) 126-129. https://ieeexplore.ieee.org/document/8328320
12 A. Schieweck, E. Uhdea, T. Salthammera, L. C. Salthammerb, L. Morawskac, M. Mazaheric, and P. Kumar:
Renewable Sustainable Energy Rev. 94 (2018) 705. https://doi.org/10.1016/j.rser.2018.05.057
13 N. Tiwari: Integrated Wireless Sensor System for Efficient Pre-fall Detection. Master Thesis (Purdue
University, Indianapolis, 2015) Chap. 4.
14 M. H. M. Ghazali and W. Rahiman: Sensors 22 (2022) 1. https://doi.org/10.3390/s22166015
15 Product Tag - IR Flame: https://www.taiwaniot.com.tw/products-tag/ir-flame/ (accessed November 2022).