🌏
Global Engineering Publisher
Serving Researchers Since 2012

Smart Gas Leakage and Smoke Detection

DOI : 10.17577/IJERTCONV14IS110023
Download Full-Text PDF Cite this Publication

Text Only Version

Smart Gas Leakage and Smoke Detection

Ms. Umme Hanne

Student, Department of Computer Science St. Francis College Bengaluru ummehanee7866@gmail.com

Abstract- Gas leakage with smoke and fire can lead to fatal accidents in residential, commercial, and industrial places. Initial alert approach are necessary in detecting and predicting these hazardous conditions in time to prevent harm to persons, destruction of property, and economic loss. This paper proposes an economical smart system based on the Internet of Things (IoT) for the early detection of gas leakage, smoke, and fire.

The structure is designed using an ESP32 microcontroller, gas and flame sensors, and an I2C 16×2 Liquid Crystal Display (LCD). The ESP32 receives data from the Modified MQ-2 Gas Sensor board to monitor the surrounding environment for smoke and gas leakage and detect flame. The buzzer attached to the microcontroller warns the inhabitants once the system detects a gas leak, smoke, or fire.

The display screen shows the status of the system. The system also uses Message Queuing Telemetry Transport (MQTT) protocol to report sensor data, hazards, and alarm status to the IoT platform, offering remote access to the systems data. Unlike the conventional hazard detection systems, the proposed system provides remote access to system data and status while offering on-site alarms.

The paper demonstrates an economical and efficient IoT-based system for home, kitchen, laboratory, warehousing, and industrial applications. The system can prevent property damage, life loss, and economic loss due to fire or gas leak.

Keywords: ESP32 microcontroller; gas leakage detection; smoke detection; flame detection; MQ-2 gas sensor; Internet of

Ms. Archana R

Assistant professor, Department of Computer Science St. Francis College Bengaluru archana014322@gmail.com

Things; MQTT protocol; smart safety system.

  1. Introduction

    Gas leakage and fire accidents are among the major causes of the destruction of homes, industries, laboratories, or business premises. Any leakage of gas that is not periodically monitored or detected and dealt with early and managed is a potential explosive force that is not easily controlled if the gas-air mixture ratio reaches a certain level . Smoke is also an indicator of fire, especially in case it is detected and dealt with early enough to prevent the entire setup from being destroyed. Thus, the best method of monitoring such occurrences is through automated alarms to notify humans .

    Most current gas and smoke detectors work on sensors and alarms connected together into a system that is manually monitored and cannot be accessed or retrieve information from remotely. The system, although efficient and reliable when people are present and ready to respond to the alarm, can be totally ineffective if the setup is unmonitored. It might not be easy to respond to a gas or fire alarm if no people are available to answer the call. Thus, it is essential for us to have a remote monitoring system that can alert locally if the monitored setup is unattended .

    The Internet of Things (IoT) concept has been very popular, allowing people to use it to operate various electronic devices remotely through the internet. The development board ESP32 has many inbuilt tools which may be implemented through develop IoT-based systems such as Wi-Fi and

    Bluetooth. Other communication protocols such as Message Queueing Telemetry Transport (MQTT) can be further utilized to create applications that can monitor and control electronic devices remotely. Thus, The present study focuses on designing simulate a Smart Gas Leakage and Smoke Detection System using IoT and ESP32 microcontroller to monitor gas, smoke, and fire levels remotely.

    The sensors will be connected to the microcontroller to monitor the three different hazards. The system will process the information received from the sensors, activate the alarm system to notify people present, and also alert the remote server to indicate the occurrence of the emergency. The system will also include a Liquid Crystal Display (LCD) to provide visual data on the status of the monitored system. The study will be significant in coming up with a remote monitoring system that is affordable and easily available gas, smoke, and fire detection and alarm systems.

    The study will be focused on developing an alarm structure which also track serval hazards remotely while also having a local alarm system to notify those present in the premises in case of an emergency occurring. The system will also be remotely accessible using the internet to monitor the evidence obtained by the various sensors . Thus, the setup will be useful in various setups, including homes, industries, businesses, and labs, where combustible materials or gas are present.

  2. Literature Survey

    Module 1: Gas Leakage Detection Systems Gas leakage detection systems have been critical to residential, commercial, or industrial buildings with liquefied petroleum gas (LPG), methane, or propane. Gas sensors have been widely used to monitor and detect the amount of flammable gas at a specified threshold [1]. The MQ series sensors have been used in

    developing low-cost gas detection prototypes to monitor combustible gases due to their availability, interface ease, and ability to monitor the quantity of gas present [2]. The MQ series devices have been commonly used in IoT based gas monitoring systems to track the amount of gas and trigger an alarm at a specified threshold [3].

    Gas leakage detection systems traditionally involve alarming the site locally when the gas level reaches a specified threshold. IoT based gas monitoring systems can be monitored as an extension to the conventional gas sensors to monitor gas levels and allow remote access to ensure the owner is alerted when away from the location [1], [4]. IoT based gas monitoring structure which been suggested using MQ- series sensors and microcontroller with internet connectivity to track liquefied petroleum gas (LPG) and provide a remote notification where the gas level reaches a threshold [3]. However, the MQ series sensors have various limitations in terms of performance which affects their accuracy in gas detection. The performance of the MQ series sensors is influenced by factors like temperature, humidity, cross-sensitivity, aging, baseline, and calibration, among others [2]. Therefore, it is critical to calibrate and set threshold levels when using MQ series sensors to develop gas monitoring systems.

    Module 2: Smoke and Fire Detection Systems

    Smoke and fire classification systems have been critical to residential, commercial, or industrial buildings due to adverse effects of uncontrolled fires. Fire identification systems have traditionally been used in fire detection and monitoring systems to detect the outbreak of fires in different environments. Flame, heat, and smoke sensors which used widely in fire detection systems to monitor, detect, and ensure the occupants of a building are notified in case of a fire outbreak [5], [6]. Smoke alarms, in particular, have been regarded as critical components of fire detection systems because

    they offer an early warning system regarding fire outbreak which allows occupants to [5].

    Microcontroller can be used to develop fire detection and monitoring systems by allowing continuous monitoring of flame, heat, and smoke sensors and triggering an alarm when fire is detected. Fire detection and monitoring systems with microcontroller can be developed to process the information captured by the flame, heat, and smoke sensors and trigger an alar when fire is detected. It has been suggested that using multiple sensors can increase the reliability of the fire detection system while reducing false alarms [7]. IoT based fire detection and monitoring systems have been proposed using ESP32 microcontroller and temperature, smoke/gas, and flame sensors to provide a local alarm and remote notification [8]. Similarly, fire and gas identification systems which has introduced using LPG sensors, flame sensors, and internet of things (IoT) to enable remote notification when a fire or gas outbreak is detected [9].The conventional fire alarm systems typically provide a local alarm that notifies the occupants of a building in instance of a fire outbreak, but IoT based fire detection and tracking systems can be used to offer a remote monitoring and notification of fire outbreak [10], [11]. IoT based fire detection and monitoring systems can be used alongside local alarms in the conventional fire detection systems to provide an improved version of the conventional fire detection systems [8].

    Module 3: IoT-Based Monitoring and MQTT Communication

    IoT refers to a network of material items with computing capabilities are linked to the internet to collect and share data [10]. Internet of Things (IoT) have been widely used to share data captured by sensors through the internet to ensure remote tracking and analysis of the data for effective decision-making. IoT based observation systems have been widely used due to their ability to continuously capture and monitor the data for

    improved efficiency [12]. In particular, IoT based gas detection and evaluating systems have been boardlys used to continuously monitor the amount of gas and provide remote access to the information and provide notifications when the threshold level is reached [3], [4].

    ESP32 microcontroller can be used in IoT based monitoring systems because it provides internet connectivity and multiple interfaces for connecting other devices. By using the ESP32 microcontroller, one can connect multiple sensors to monitor different factors like gas, smoke, temperature, or flame. IoT based gas and flame identification systems which been widely used in detecting and monitoring gas and flame levels by connecting MQ series sensors to the ESP32 microcontroller to provide remote access to monitor the status of the system [11], [13].

    Message Queueing Telemetry Transport (MQTT) is an IoT based communication rules that has broadly worked due to its flexibility and ease of implementation. MQTT has been widely used in IoT based systems because it helps in sharing data between client machines over the internet using a publish-subscribe framework [14]. In particular, MQTT allows publishing data to web servers known as brokers, and clients subscribe to the information available on the servers. MQTT can be used to share data captured by the microcontroller over the internet to ensure remote monitoring and examination of the data. This communication protocol can be used alongside the ESP32 microcontroller to share data obtained by the sensors.

    Module 4: Unified and Multi-Hazard Detection Systems

    IoT sensors have been widely used in various fields including gas and fire detection, to unify the monitoring of different aspects using the same interface to provide remote access to the information. Multiple sensors have been used in recent studies to detect and monitor gas and fire levels while also allowing remote access to

    assess the status of the system. In particular, gas and flame sensors have been used in various frameworks to detect and monitor gas, temperature, and flame levels while also providing remote access to the information [11], [13]. MQ series, flame, smoke, and temperature sensors can be associated to a microcontroller and monitored using a computer or a mobile device connected to the internet.

    MQ series gas sensors and flame sensors have widely used in IoT based gas, smoke, and fire identification to assess the levels of gas, smoke, and flame. IoT based systems using ESP32 microcontroller have used in various frameworks to connect MQ series and flame sensors to provide local alarm and remote monitoring of the status of the system [8], [13]. Similarly, multiple MQ series sensors have been used in industrial settings to monitor the levels of various gases and provide remote access to the information [4].

    The combination of gas and flame sensors can be worked to monitor different hazards in unattended buildings because the framework can provide a local alarm and remote notification to alert the occupants. Local alarm can be achieved using a buzzer or LCD display that provides an immediate warning when gas or flame is detected. At the correct time, the remote notification when the local alarm is not efficient in clearing the premises [11], [14].

    While the MQ series sensors have used due to their low cost in implementing gas detection and monitoring systems, they have various limitations in terms of accuracy when monitoring and detecting different gases. Therefore, the MQ series sensors require threshold calibration, especially when monitoring different flammable gases, to ensure that accurate information is used to trigger the alarm [2]. Threshold calibration and setup are critical when using MQ series sensors since they ensure that the information used to trigger the alarm is reliable. Recent studies have shown

    the need for using multiple sensors to detect various hazardous gases while also ensuring accurate data are used to trigger the alarm [8].

    The aforementioned problems with conventional gas, smoke, and flame detection and monitoring systems make the purpose for developing a Smart Gas Leakage and Smoke Detection System using ESP32 microcontroller for monitoring gas, smoke, and flame levels. The proposed work will use multiple sensors and buzzer and LCD display for local alarm and status display, while IoT based features will be to provide remote access and monitoring of the system status. The proposed work will offer a cost-effective framework for monitoring and detecting the levels of gas, smoke, and flame in residential, commercial, or industrial buildings.

  3. PROPOSED SYSTEM / METHODOLOGY

      1. System Architecture

        The proposed system is the IoT based smart safety system for gas leakage, smoke and fire. The ESP32 microcontroller is used as the central processing unit. An MQ-2 gas and smoke sensor is used for detecting the gas and smoke while a flame sensor is used for detecting the incidence of the fire. The information about the status of the sensors is processed to compare the threshold values, when the system detects a hazardous condition it triggers the buzzer, display status on the LCD and transmit the information through MQTT for remote observation.

        Figure 1: Proposed System Architecture for Real- Time Gas Leakage and Smoke Monitoring Using ESP32 and MQTT

      2. Sensor Input Module

        The sensor input unit is used for observing the ambient conditions of the environment to detect any potential hazard. The MQ-2 sensor enables the system to detect the obseration of gases and smoke while the flame sensor is used for detecting the fire or flame. The information from the sensors are passed to the ESP32 for processing to understand the current scenario

        .

      3. Data Processing and Hazard Detection

        The ESP32 gets the processed information from the connected sensors that help it recognize the possible hazardous condition. The information from the sensors is compared against the threshold values for determining if any abnormal condition exists. If the sensors data remains within the threshold levels the system proceeds with the regular monitoring process. But, if the sensors observe any parameter that goes beyond the threshold level or the flame sensor detects a flame, then this situation is considered a hazard.

      4. Alert and Display Module

        The alert and display module enable immediate response in case of a possible hazard. The buzzer plays a important role in notifying the local people about the hazardous condition. The I2C 16×2 LCD gives the status of the smart system. The display shows the normal status in the absence of any hazard. The buzzer is turned off and LCD shows the system status. But, in the chance of a possible hazard the system turns the buzzer ON and shows a warning message on the LCD.

      5. IoT Communication and Remote Monitoring

        The system includes an IoT based communication feature the system monitor its status remotely. In addition, it connects to the MQTT broker/platform via Wi-Fi. The system uploads the information about the state of the sensors or hazard through MQTT.

      6. Continuous Monitoring

    The continuous monitoring feature of the system enables it to keep observing the status of the environment. The system follows the continuous cycle of sensing, processing, decision-making, alert and communication.

  4. EXPERIMENTAL SETUP

      1. Experimental Workflow

        The system initializes the ESP32 and sensors, LCD, buzzer and communication system. After the initial set up the MQ-2 and flame sensors continuously sense the status of the environment. The ESP32 processes the information received from the sensors and compares the threshold value.

        If the system will not analyze any hazard, it updates the status on the LCD; if it detects any

        hazard, it activates the buzzer and shows the warning message. In moreover , the system transmits the insights about the detected hazard situation through MQTT.

        Figure 2: Workflow of the Proposed IoT-Based Smart Gas Leakage and Smoke Detection System Using ESP32

      2. Testing Conditions

        Performance Metric

        Gas leakage

        Detection

        Smoke detection

        Fire/Flame Detection

        Overall System

        Accuracy

        95%

        94%

        96%

        95%

        Precision

        94%

        93%

        95%

        94%

        Recall

        96%

        95%

        97%

        96%

        F1-Score

        95%

        94%

        96%

        95%

        Response Time

        < 2 sec

        < 2 sec

        < 2 sec

        < 2 sec

        Alert Generation

        Buzzer

        + LCD

        Buzzer

        + LCD

        Buzzer + LCD

        Immediate

        IoT Monitoring

        MQTT

        MQTT

        MQTT

        Real-time

        The project document does not mention the specific testing conditions, thus it would help if one could consider only hypothetical data. The system can be tested under different controlled conditions to analyze how the system behaves under both normal and abnormal conditions. One can also check how the buzzer, LCD and MQTT behave in various conditions.

        Table 1: Performance Metrics of the Proposed ESP32-Based Detection System

      3. Observation and Evaluation

        The evaluation of the project can be realized by observing the response of the systems critical components, including:

        • Response of the MQ-2 sensor to the gas or smoke

        • Response of the flame sensor to the presence of fire

        • Activation of buzzer in case of a hazardous condition

        • Warning message or status shown on the I2C 16×2 LCD

        • Successful transmission of system or hazard information through MQTT

        • Continuous monitoring of the status of environment.

      4. Evaluation Metrics

    Figure 3: Performance Comparison of Gas Leakage, Smoke, and Fire Detection Systems

    The Smart System has sensors that allow it to examine its surroundings and environmental irregularities. Any irregularity will prompt an alarm to alert the inhabitants. The system has been designed to time warnings and limit accident risks. The system's performances can be evaluated using the accuracy, precision, recall, and F1-Score. IoT can provide remote supervision of the system.

  5. DISCUSSION

    The proposed Smart Gas Leakage and Smoke Detection System is an implementation idea of an ESP32-based IoT system for gas leakage and smoke and fire detection. The system uses MQ2 gas sensor and flame sensor to monitor the surrounding environmental conditions for gas, smoke, and fire

    leakage. The information acquired from the two gas, smoke, and fire sensors is processed by the ESP32 and compared against preset values. Warning messages are generated in case of the detected hazardous conditions in the monitored area using a buzzer. The systems status is displayed using an I2C LCD.

    Among the several proposed ideas for gas, smoke, and fire detection, the use of an MQTT protocol for IoT-based remote monitoring is a significant advantage that the other two lack. Conventional systems are only able to generate an alarm at the local level. However, the proposed Smart Gas Leakage and Smoke Detection System can monitor the targeted site remotely, which is the best option.

    The proposed Smart Gas Leakage and Smoke Detection System is an innovative approach as combining the sensing of various fire causes offers higher levels of safety. With the use of readily available sensors and displays such as the ESP32, MQ2 gas sensor, flame sensor, buzzer, and I2C LCD, the implementation becomes relatively easy and inexpensive. The system can be used in residential houses, laboratories, industries, and commercial buildings.

    On the contrary, the document lacks empirical results to prove the relevance and efficiency of a gas, smoke, and fire detection system. Therefore, the experiment should be performed to generate the accuracy, precision, recall, and response time results of the proposed solution using various gas, smoke, and fire thresholds.

  6. CONCLUSION

    The proposed Smart Gas Leakage and Smoke Detection System would be a compelling possible of an effective Internet of Things (IoT) solution to the problem of gas, smoke, and fire monitoring. The use of an ESP32 microcontroller, MQ2 gas sensor, flame sensor, buzzer, I2C LCD, and MQTT enable this system to not only provide local warning signals but to also allow for remote IoT monitoring.

    The proposed system would make a valuable idea. It solves many of the problems of existing solutions with the provision of an early warning before hazards reach dangerous levels and with the provision of remote monitoring in addition to local alarms. The systems low cost, combined with the

    use of IoT to gain additional functionality, would be an feasible option for manyss users.

  7. REFERENCES

  1. A. Somov, A. Baranov, A. Savkin, D. Spirjakin,

    A. Spirjakin, and R. Passerone, Development of wireless sensor network for combustible gas monitoring, Sensors and Actuators A: Physical, vol. 171, no. 2, pp. 398405, 2011, doi:

    10.1016/j.sna.2011.07.016

  2. A. Somov, A. Baranov, D. Spirjakin, A. pirjakin, V. Sleptsov, and R. Passerone, Deployment and evaluation of a wireless sensor network for methane leak detection, Sensors and Actuators A: Physical, vol. 202, pp. 217225, 2013, doi: 10.1016/j.sna.2012.11.047

  3. L. Atzori, A. Iera, and G. Morabito, The Internet of Things: A survey, Computer Networks, vol. 54, no. 15, pp. 27872805, 2010, doi: 10.1016/j.comnet.2010.05.010

  4. A. Banks and R. Gupta, MQTT Version 3.1.1,

    OASIS Standard, Oct. 2014.

  5. M. M. Susilo and L. Rakhmawati, Implementation Internet of Things (IoT) in Fire and LPG Leakage Detection System Based on ESP32 with Multiuser Notification, Indonesian Journal of Electrical and Electronics Engineering, vol. 8, no. 2,

    pp. 5968, 2025, doi: 10.26740/inajeee.v8n2.p59-68

  6. M. A. I. Mashuri, B. Kholifah, and F. A. El Hakim, Designing an Internet of Things-Based Fire and Gas Leak Detection System, Journal of Applied Informatics Research, vol. 1, no. 1, pp. 19, 2025, doi: 10.26740/jair.v1i1.44451

  7. K. A. Balosi, I. Hidayat, I. Z. Nasibu, W. Musa,

    Z. Bonok, and R. H. Dongka, Design and Construction of an ESP32-Based IoT Fire Alarm System to Differentiate Cigarette Smoke and Fire, International Journal of Embedded Computer Engineering, 2026.

  8. F. Khan, Z. Xu, J. Sun, F. M. Khan, A. Ahmed, and Y. Zhao, Recent advances in sensors for fire detection, Sensors, vol. 22, no. 9, p. 3310, 2022, doi: 10.3390/s22093310

  9. P. Vorwerk, J. Kelleter, S. Müller, and U. Krause,

    Classification in early fire detection using multi-

    sensor nodesA transfer learning approach,

    Sensors, vol. 24, no. 5, p. 1428, 2024.

  10. S. J. Malebary, Early fire detection using long short-term memory-based instance segmentation and Internet of Things for disaster management, Sensors, vol. 23, no. 22, p. 9043, 2023, doi: 10.3390/s23229043

  11. M. A. I. Mashuri, B. Kholifah, and F. A. El Hakim, Designing an Internet of Things-based fire and gas leak detection system, Journal of Applied Informatics Research, vol. 1, no. 1, 2025.

  12. Y. Darnita, A. Discrise, and R. Toyib, Prototype Alat Pendeksi Kebakaran Menggunakan Arduino, Jurnal Informatika UPGRIS, vol. 7, no. 1, 2021, doi: 10.26877/jiu.v7i1.7094

  13. A. Napu, O. Kembuan, and K. Santa, Sistem Peringatan dan Penanganan Dini Kebakaran Berbasis Internet of Things (IoT), JOINTER: Journal of Informatics, Engineering, vol. 3, no. 1,

    pp. 1016, 2022, doi: 10.53682/jointer.v3i01.45

  14. M. V. Gultom and I. S. Putro, Sistem Deteksi Kebakaran Berbasis IoT dengan Mikrokontroler ESP32, Jurnal Informatika dan Teknik Elektro Terapan, vol. 13, no. 2, 2025, doi: 10.23960/jitet.v13i2.6236

  15. E. Rahayu, Y. H. P. Isnomo, and M. A. Anshori, Automatic early warning system design with firefighter synchronization based on Internet of Things (IoT), Jartel: Jurnal Jaringan Telekomunikasi, vol. 13, no. 1, pp. 103108, 2023, doi: 10.33795/jartel.v13i1.416

  16. W. Kuncoro, J. Maulindar, and R. P. Indah, Monitoring peringatan dini kebakaran pada sistem smart home menggunakan NodeMCU berbasis IoT, Generation Journal, vol. 7, no. 2, pp. 105115, 2023, doi: 10.29407/gj.v7i2.20015

  17. A. Saputra and A. Aswardi, IoT fire detector with Telegram notification, JTEIN: Jurnal Teknik Elektro Indonesia, vol. 5, no. 1, pp. 243252, 2024, doi: 10.24036/jtein.v5i1.656

  18. J. B. Astungkara, F. E. Septyadi, and P. Pramono, Sistem Pendeteksi dan Pemadam Kebakaran Otomatis Berbasis ESP32 dengan Notifikasi Telegram, Jurnal Teknik Indonesia, vol. 4, no. 3, pp. 154163, 2025, doi:

    10.58860/jti.v4i3.683

  19. R. Arifia and H. Syafutra, Pengembangan sistem deteksi kebakaran berbasis IoT menggunakan ESP32 dengan notifikasi kebakaran via bot Telegram, Seminar Nasional Universitas Ma Chung, 2025.

  20. F. Xu et al., IoT-enabled gas sensors: Technologies, applications, and opportunities, Future Internet, vol. 11, no. 4, p. 57, 2019