LPG is widely used for cooking and heating in most residential buildings. LPG can cause serious explosions and fires when exposed to heat or electrical sparks. Even a small leakage can pose significant danger to residents. Therefore, an early LPG leakage detection system is essential to prevent such accidents. In this study, the performance and selectivity of MQ gas sensors for detection of LPG leakage are enhanced using TinyML. This system will activate alarm signal, informe the user with any expected LPG leakage through mobile app and switch off the electricity from the distribution unit.
In this study, two classes were defined to detect LPG leakage. The first class, “No LPG leakage,” includes fresh air, disinfectant substance (chloroxylenol), incense sticks, and cigarette smoke, while the second class, “LPG leakage,” contains LPG. Two nodes that were sensor and action nodes were used. The datasets were collected using five MQ sensors and DHT11 sersor that were integrated with ESP32. The total collecting datasets for both classes was 64,225. This dataset was split into 80% for training, and 20% for testing a DNN model. The action node that consisted of ESP32 and relay will switch off the electricity if it receive wireless command from sensor node.
The LPG leakage detection model was achieved 94% offline prediction accuracy. This model was deployed on the microcontroller. The arena size and inference time of deployed model were 1300 Bytes and 73 us respectively. During testing in a controlled environment, the system demonstrated improved selectivity of MQ sensors toward LPG leakage with reduced false positives compared to traditional methods. The electicity was also switched off by action node and the user was informed by mobile app when there was expected LPG leakage.