You are on page 1of 6

2nd ICAICT, 28-29 November 2020, Dhaka, Bangladesh.

IoT based Low-Cost Gas Leakage, Fire, and


2020 2nd International Conference on Advanced Information and Communication Technology (ICAICT) | 978-0-7381-2323-3/20/$31.00 ©2020 IEEE | DOI: 10.1109/ICAICT51780.2020.9333530

Temperature Detection System with Call Facilities


Sourav Debnath Samin Ahmed Suprio Das
Electronics and Communication Electronics and Communication Electronics and Communication
Engineering Discipline, Engineering Discipline, Engineering Discipline,
Khulna University, Bangladesh Khulna University, Bangladesh Khulna University, Bangladesh
souravdebnath727@yahoo.com 1997samin@gmail.com supriodas673@gmail.com

Abdullah-Al Nahid Anupam Kumar Bairagi∗


Electronics and Communication Computer Science and
Engineering Discipline, Engineering Discipline,
Khulna University, Bangladesh Khulna University, Bangladesh
nahid.ece.ku@ku.ac.bd anupam@ku.ac.bd

Abstract—IoT (Internet of Things) is dominating all over the outbreaks. These terrible accidents are occurring because of a
world for developing technology. It is another information indus- massive number of gas users who are not proficient in the use
try following the computer, internet, and mobile connection. In of gas. Presently it becomes an emerging topic for technical,
modern society, we must ensure security for leading a comfortable
life. Nowadays, security has been affected by different types of economic, agricultural, etc. Natural gas pipeline leakage also
matters. Gas leakage and fire incidents are considered among creates a fire that is a threat to humans. Sometimes viperous
them. At present, there are many undesirable accidents from gas leakage creates environmental pollution, which is danger-
gas leakage and fire incidents. One way to prevent accidents ous for human beings and species. Moreover, fire accidents
involving gas leakage and fire incident detection is to affix a gas have become a threat to human life. At present, cylinders and
leakage and fire incident detection device at adequate places.
Indeed, when the gas leakage or fire incident occurs, then the chemical explosions are more responsible for fire accidents in
temperature can be increased naturally. Our proposed work, a Bangladesh. Almost fifty people were injured, and ten people
simple system using low-cost devices, has been designed to send died in a year for gas cylinder blast and fire occurrence [1]. In
a phone call to the user via the GSM module in case of any gas the present time, fire accidents take appalling situations. New
or smoke leakage. It also sends data to the alarm, alerting the technologies are now focusing more on those accidents and
users and sending a graphical alert to the server via NodeMCU.
Besides, a temperature sensor also detects the temperature of that working on how to diminish these accidents. Several systems
hazardous situation at the same time and sends data to the web have been implemented for detecting gas leakage and fire
server. We are using different algorithms to know the sensor’s occurrence. All orders have some constraints, such as they
early predictions’ overall accuracy in real-life-critical situations cannot use the money, space, and time efficiently. From this
through the machine learning approach. This proposed work will perspective, our project has some advantages-
contribute if gas leaks or fires occur at home or in the industry,
then people can take the necessary precaution in advance. • A real-life helpful and cost-efficient sensible project
Index Terms—Alarm system, LPG (Liquefied petroleum gas), • Accurate info
MQ-2 Sensor, IR Flame Sensor, DHT11 Temperature and hu-
midity sensor, Internet of Things(IoT), Mobile Phone call system, • Less complex circuit
NodeMCU(ESP2866), Machine Learning. • No environmental impact or no impact of physical con-
ditions
I. I NTRODUCTION The primary purpose of doing this work is to sense LPG gas
At the age of the 21st century, a revolutionary change has that is responsible for the fire and detect fire occurrence, and
been taken place in technology. Technology is developing, also sense smoke flows out from the light. Sometimes when
and new technologies are being invented day by day. Internet gas leaks or fires occur, people don’t understand that situation,
of Things (IoT) is a phenomenal technology in the present but the temperature increases, which is harmful to human
and is a widely used technology in the present world. In the health and the environment. Generally, when fire incidence
21st century, safety is the first criteria while designing and occurs at any place, the temperature of that place is about
contracting residence, palaces, industries, along with cities. 70◦ -120◦ C concerning different distances (by preliminary in-
Unfortunately, many people die every year in their homes or formation) that is relatively high than average temperature.
industries or elsewhere due to gas cylinder explosions or fire The proposed system uses an alarm and a Global System for
Mobile Communications (GSM) to aware of the gas leakage
∗ Corresponding Author: Anupam Kumar Bairagi and detection of fire and heat in favor of NodeMCU for

978-0-7381-2323-3/20/$31.00 ©2020 IEEE 11

Authorized licensed use limited to: Carleton University. Downloaded on May 31,2021 at 17:53:40 UTC from IEEE Xplore. Restrictions apply.
sending sensor reading data to the web server so that analytical TABLE I
results could be performed by taking observation readings for S UMMERY OF THE RELATED WORKS
making this project more candidness. By using IoT, people Reviewed Paper IoT Call Service Machine Learning
can be aware of the situation before any misadventure will [2] No No No
occur through a web server. Also, machine learning is used [3] No No No
[4] Yes No No
for predicting the accuracy of sensors’ best performance. [5] Yes No No
[6] No No No
[7] No No No
II. L ITERATURE R EVIEW
[8] No No No
[9] No No No
Tanvira Ismail et al. [2] discussed about GSM based gas [13] Yes No Yes
leakage warning system. Their idea was that when the MQ-
6 gas sensor detected gas in the atmosphere, a signal was
sent to the ADC unit of the microcontroller which then
Table I shows that all the literature we reviewed does not
sent an activation signal to other external devices connected
cover the IoT based gas or smoke and fire detection. None
to it such as a buzzer, GSM module, and exhaust fan. In
of them had a call system, which inspires us to develop our
another research, the vision was to prepare a gas monitoring
network. In our proposed method, we have mainly focused on
system and automatic cylinder booking for a home where
the calling system. We have tried to get accurate output and
they used the MQ-4 gas sensor to sense the gas leakage
have added call facilities and IoT, which effectively detect gas
and sent data to LCD monitor, buzzer, and authority’s mobile
or smoke leakage and fire occurrence.
phone through GSM module. A load cell was used for an
automatic cylinder booking system [3]. A system is designed III. BACKGROUND AND R ESEARCH M ETHODOLOGY
to detect the gas leakage and make a smart alert system
A. Block Diagram:
through email and message alert to the phone using the GSM
module [4]. Pavithraa.M et al. [5] discussed about IoT based
LPG gas booking and monitoring system. They used load
cell, IoT(Internet of Things), Global Posting System(GPS).
A. Mahalingam et al. [6] have discussed about design and
implementation of an economic gas leakage detector. Fraiwan
et al. [7] has used gas detection and transmission module, and
the receiver module as a wireless network in their system.
They made a special sensing circuit for detecting gas and
a threshold value was declared for gas concentration. If the
gas concentration exceeded that threshold value, the sensing
circuit detected it and made an alarm, and sent a signal to
Fig. 1. Overall working diagram of the proposed system.
the RF receiver. Faisal et al. [8] has established a system
where multiple gas sensors detect the leakage gas and sends Fig. 1 shows the overall working method diagram of the
a message to two different phone numbers and LCD monitor proposed system.
and makes an alarm. A system is proposed where fire sensor,
temperature and humidity sensor, and wireless senor network B. Logic Diagram:
have used for monitoring the fire detection node [9]. A system
is analyzed to establish a numerical formula for combustible
gas spread in housing and industrial area [10]. Chen et al. [11]
proposed a system where the smoke can be detected by video
processing created by fire. They used the chromatic decision
rule and dynamic decision rule in their method. Abdullah-Al
Nahid et al. [12] designed a simple system by which liquid
leakage in supply can be detected simply. That design is cost
effective and included both flow measurement, data storing and
monitoring. Salhi et al. [13] designed early detection system
for gas leakage and fire in smart home using machine learning.
They proposed a model where gas and fire were detect early
into centralized Machine-to-Machine method. They also data
mining method detect the abnormal air state changes. Asthana
et al.[14] proposed IoT device for sewage gas monitoring and Fig. 2. Gas, smoke and fire leakage detection processing steps.
alert system. The summary of the related works is presented
in Table 1. Fig. 2 shows a flowchart of the proposed system.

12

Authorized licensed use limited to: Carleton University. Downloaded on May 31,2021 at 17:53:40 UTC from IEEE Xplore. Restrictions apply.
IV. R EQUIRED H ARDWARE
A. MQ-2 Gas and Smoke Sensor :
The MQ-2 sensor is very helpful for detecting gas leakage. Fig. 6. NodeMCU(ESP8266).
This sensor is used to detect Alkanes, LPG, Smoke, etc. Be-
cause it is exceptionally sensitive to them. For high sensitivity
and fast working processes, the measuring process is simply E. Buzzer :
completed by this sensor. A buzzer is an audio signaling device. It can be me-
chanical, electromechanical, electronic, etc. A buzzer speaker
is basically a tiny speaker that can connect directly to a
microcontroller. By applying an electric signal at the right
frequency, it can make a sound.
F. DHT11 :
Fig. 3. Gas sensor.
The DHT11 senses, measures, and reports both moisture and
air temperature. Using a capacitive humidity sensing element
B. IR Flame Sensor : and a thermistor, the sensor can determine the humidity and
temperature values. The humidity range is from 20 to 80%
IR sensor is mainly sensitive to fire and ordinary light. It is
with 5% accuracy, and the temperature range is from 0 to
also called a flame detector. The sensor is mostly used to detect
500C with a 2-degree accuracy.
the flame. It can detect the flame using infra-red radiation from
it. A flame sensor has an infra-red receiver that can catch infra-
red of a particular frequency found in flash. It can detect the
flame within the range of 60-degree angles.

Fig. 7. DHT11 sensor.

Fig. 4. Flame sensor.


V. S OLUTION A PPROACH
A. Hardware Design:
C. GSM SIM900A : The schematic circuit diagram of the hardware gathering
GSM module is a communication device between a com- of this project is shown in Fig. 8. NodeMCU and GSM
puter and a GSM modem. GSM module is a wireless module, modules are the main part of this system. The system consists
designed for mobile communication over the GSM network. of three sensors, namely MQ-2 gas and smoke sensor, IR
This module requires a SIM card to enable connection to flame sensor, and DHT11 temperature and humidity sensor.
the system. Its highest supply voltage is 4.5 volt, and the These three devices sense the gas levels, fire leakage, and
lowest supply voltage is 3.4 volt and is programmed by AT the neighborhood’s temperature where the method is installed.
commands. Also, the buzzer, GSM module, is connected to the NodeMCU.
• When the MQ-2 sensor detects gas, it gives an analog
value which can be converted into digital value by using
ADC. The sensor readings data is then sent to NodeMCU.
• NodeMCU and GSM module maintain serial commu-
nication between them. The Tx and Rx pins of GSM
connected with the Rx and Tx pins of NodeMCU respec-
tively. By maintaining serial communication, the GSM
Fig. 5. Sim900 GSM module.
module creates a call to users phone when the gas detects
and makes alarm of that incident place.
• Similarly, the flame sensor detects fire at that place where
D. NodeMCU (ESP8266) : the fire occurs and then gives a graphical alert through
The full form of NodeMCU is Node MicroController Unit. NodeMCU.
NodeMCU is a mini microcontroller. It has 30 pins containing • The temperature sensor is used for measuring temperature
TXD, RXD with wifi chips. It has one analog pin and nine of that incident place. Generally, when fire occurs, the
digital pins. It works at 3.3-5 volt. It has a USB port used as temperature rises higher than the normal temperature.
input. It is an open-source IoT platform. Sometimes, if the flame sensor does not respond, then

13

Authorized licensed use limited to: Carleton University. Downloaded on May 31,2021 at 17:53:40 UTC from IEEE Xplore. Restrictions apply.
the temperature sensor graphical alert will also indicate has some limitations because it senses only gas. It can not
that the place is on fire. sense smoke. When making the fire of anything at first spread
• Thingspeak is an open-source IoT platform. It stores fume. So, at first, we detect fume, then we prevent it more
data from things by using HTTP over the Internet. In accessible than before. In this cause, we use the MQ-2 sensor.
our proposed design, sensors reading send to the cloud
(Thingspeak.com) by using HTTP. The user can be alert
about fire incidents or how much gas leaks or rising
temperature to the surrounding environment by analyzing
graphs using MatLab.

Fig. 10. IoT based graph for sensing gas or fire leakage and detect
temperature.

Fig. 10(a) illustrates that the sensors reading graphical


response curve is shown to the webserver. The sensors reading
data transmit to the cloud now and then. When the gas does
Fig. 8. Circuit diagram. not leak, the red line will flat. When the gas leaks, the red line
ups and downs, and it can be easy to understand gas leakage.
Fig. 10(b) shows that by observing the luminous curve, it can
be easy to understand fire intensification. Fig. 10(c) illustrates
the increment of temperature curve ups and downs. The curve
highest peak value is 100◦ C when the fire breaks out.

TABLE II
T HE TOTAL APPROXIMATE COST

Item Name Units Required Total Unit Price


MQ-2 Sensor 1 $1.76
IR Flame Sensor 1 $1.76
DHT11 Temperature Sensor 1 $1.76
Buzzer 1 $0.2
NodeMCU 1 $6
GSM Module 1 $9
Breadboard 1 $1.41
Fig. 9. Prototype. Total Amount $21.89

B. Software Design: This system has been designed for small ranges. This system
In this project, the software plays an important role. So, can be extended by using multiple sensors. Though there are
an Arduino microcontroller code is used for this project. some limitations to this prototype, it can detect the gas leakage
The NodeMCU is programmed with the necessary code and fire occurrence and give the perfect output to the user’s
to operate correctly. There is some complexity in code for phone and web server. Thus, considering the material used,
getting accurate information. A string API key is used for which is available and the cost at only around $22, it performs
connecting with the webserver. Isnan() function is also used. its task well, and it is easy to set up and can be easily used.
AT function is used for making the phone call through GSM
VII. M ACHINE L EARNING
module. Also, delay() functions are used to keep the program
running a fixed loop to get an accurate result. Through machine learning, we tried to show how much the
sensors give accurate output or how much they can predict
in critical conditions. For this, we use a user-friendly machine
VI. P ERFORM AND R ESULT A NALYSIS learning software called WEKA, which applied machine learn-
At first, we are using a lighter in front of the gas sensor ing directly to the collected data sets. WEKA is a collection
for testing because, in the lighter, there is mainly propane of machine learning algorithms. It is a collection of built-in
gas. At the trial version of our project, this step is working classifiers that help predict bugs and other uncertain situations
successfully. At first, we try to do this project MQ-6. But it depending on the given and classified data.

14

Authorized licensed use limited to: Carleton University. Downloaded on May 31,2021 at 17:53:40 UTC from IEEE Xplore. Restrictions apply.
A. Sensors Dataset: C. Accuracy of IR Flame Sensor:
The sensors(MQ2 sensor, IR Flame sensor, DHT11 sensor) NaiveBayes is the popular algorithm in which is provided by
experimental data shown in the Fig.11 is performed on the the software has given prediction results, which is 85.6953%.
prototype device. The data is more appropriate for further Furthermore, different classification was applied. In SGD, the
development of this project. prediction of accuracy result was 92.4658%. In IBK, the
accuracy result was 75%. In RandomTree, the prediction of
accuracy result was 85.6392%.

Fig. 11. Graphical Representation of Sensors Dataset.


Fig. 13. Output of Different types of Classification Algorithm for IR Flame
We collected sensors reading data from the webserver for sensor.
different distances. Then those data were inserted separately
into WEKA. There are 2 attributes for each sensors reading D. Accuracy of DHT11 Sensor:
data-sheet called Distance and Output results of each sensor
In NaiveBayes, the prediction of accuracy was 81.25%. In
at different distances. The characteristics prefer the judgment
SimpleLogic, the prediction of accuracy result was 87.5%. In
of output with the point of view of the classifier algorithm and
J48, the accuracy result was 87.5%. In SGD, the prediction of
develop the models immediately.
accuracy result was 93.75%.
B. Accuracy of MQ2 Sensor:
Different types of well known and popular classification
algorithms were applied to find the best accuracy or output
prediction of the sensor in critical situations for different
distances. In multilayerPerceptron, the prediction of accuracy
result was 91.6667%. In NaiveBayes, the result was 83.333%.
In NaiveBayesMultinomial, the result was 75%. In SimpleL-
ogistic, the result was 83.333%.

Fig. 14. Output of Different types of Classification Algorithm for DHT11


sensor.

E. Accuracy Classification:
From the data obtained, it can be inferred that if the different
algorithm is applied separately, the sensor’s best accuracy will
be achieved in critical conditions. For the MQ2 sensor, the best
prediction ability or sensing accuracy is found by using the
Fig. 12. Output of Different types of Classification Algorithm for MQ2 sensor. multilayerPerceptron algorithm(91.6667%). Similarly, the IR
Flame sensor and DHT11 sensor, the best accuracy found in

15

Authorized licensed use limited to: Carleton University. Downloaded on May 31,2021 at 17:53:40 UTC from IEEE Xplore. Restrictions apply.
the SGD algorithm (92.4658% & 93.75%). The overall average sensing robot can be constructed to sense gas leakage through
accuracy is 92.6275% by taking the best accuracy results in pipelines.
different algorithms. This result provides that the system is
R EFERENCES
able to detect a dangerous or critical situation.
[1] http://energybangla.com/gas-cylinders-blust-deaths-continues/
[2] Ismail, T., Das, D., Saikia, J., Deka, J., & Sarma, R. (2014). GSM based
gas leakage warning system. International Journal of Advanced Research
in Computer and Communication Engineering (April. 2014).
[3] Macker, A., Shukla, A. K., Dey, S., & Agarwal, J. (2018, May).
ARDUINO Based LPG Gas Monitoring & Automatic Cylinder Booking
with Alert System. In 2018 2nd International Conference on Trends in
Electronics and Informatics (ICOEI) (pp. 1209-1212). IEEE.
[4] Varma, A., Prabhakar, S., & Jayavel, K. (2017, February). Gas Leakage
Detection and Smart Alerting and prediction using IoT. In 2017 2nd
International Conference on Computing and Communications Technolo-
gies (ICCCT) (pp. 327-333). IEEE.
Fig. 15. Best sensors performance pie chart according to different algorithm. [5] Pavithraa.M, Priya.K, Priya.M, & Jenifer. Z. (2014). IoT BASED
LPG GAS BOOKING AND MONITORING SYSTEM. International
Research Journal of Engineering and Technology (IRJET)(March 2019).
Although Naivebayes is the most common and widely [6] Mahalingam, A., Naayagi, R. T., & Mastorakis, N. E. (2012). Design and
used AI algorithm. In the Naivebayes algorithm, the overall implementation of an economic gas leakage detector. Recent Researches
in Applications of Electrical and Computer Engineering, 20-24.
accuracy is 83.4261%, which indicates that the system gives [7] Fraiwan, L., Lweesy, K., Bani-Salma, A., & Mani, N. (2011, February).
almost perfect and reliable output, and the system is working A wireless home safety gas leakage detection system. In 2011 1st Middle
correctly. East Conference on Biomedical Engineering (pp. 11-14). IEEE.
[8] Faisal, M. M. A., & Rahman, S. M. (2017). Arduino based gas
leakage detector with short message service and sound alarm. Journal of
Emerging Trends in Engineering and Applied Sciences, 8(3), 113-116.
[9] Vijayalakshmi, S. R., & Muruganand, S. (2016). Real time monitoring
of wireless fire detection node. Procedia Technology, 24, 1113-1119.
[10] Nagaosa, R. S. (2014). A new numerical formulation of gas leakage and
spread into a residential space in terms of hazard analysis. Journal of
hazardous materials, 271, 266-274.
[11] Chen, T. H., Yin, Y. H., Huang, S. F., & Ye, Y. T. (2006, December). The
smoke detection for early fire-alarming system base on video processing.
In 2006 International Conference on Intelligent Information Hiding and
Multimedia (pp. 427-430). IEEE.
[12] Nahid, A. A., Hasan, M. T., & Bairagi, A. K. (2019, December).
Simpler Design for Liquid Supply Line Leakage Monitoring. In 2019
International Conference on Sustainable Technologies for Industry 4.0
Fig. 16. Sensors accuracy prediction of Naivebayes Algorithm. (STI) (pp. 1-5). IEEE.
[13] Salhi, L., Silverston, T., Yamazaki, T., & Miyoshi, T. (2019, January).
Early Detection System for Gas Leakage and Fire in Smart Home Using
Machine Learning. In 2019 IEEE International Conference on Consumer
VIII. C ONCLUSION Electronics (ICCE) (pp. 1-6). IEEE.
[14] Asthana, N., & Bahl, R. (2019, April). IoT device for sewage gas
This research’s main objective is to build a low-cost and monitoring and alert system. In 2019 1st International Conference on
straightforward system that can be operated at three modes: Innovations in Information and Communication Technology (ICIICT)
gas and fire leakage detection mode and temperature detection (pp. 1-7). IEEE.
mode. In many research papers, it almost uses the message
alert system. When the gas, smoke, or fire leaks, it will send a
message alert to the user phone. But we use a call alert system,
which gives some advantages to users. Moreover, we deployed
a system with different sensors. Overall it is user friendly and
low cost. Besides, it doesn’t give not only the call alert but
also a graphical alert on the webserver. In previous works, the
raspberry pi uses for getting the accurate output[13]. We tried
to do it by NodeMCU and applied machine learning to get
sensors’ accuracy or prediction ability in critical situations.
Future work of this research will include data analytics that
will apply to the cloud side to improve the system’s services
and accuracy. Also, use multiple gases and fire sensor for
detecting gas and fire leakage in industries and prepare a
database for gathering sensors output. Besides, somebody will
develop it for calling or messaging multiple users by creating a
database in the future. GSM data will be stored in the database
and transmit to multiple users. Furthermore, a gas and fire

16

Authorized licensed use limited to: Carleton University. Downloaded on May 31,2021 at 17:53:40 UTC from IEEE Xplore. Restrictions apply.

You might also like