IOT Based Gas Leakage Detection System with Database Logging, Prediction and Smart AlertingChaitali Bagwe1, Vidya Ghadi2, Vinayshri Naik3BE Computer Engineering, Atharva College of Engineering, Mumbai, India. Abstract : IoT is an expanding network of physical devices that are linked with different types of sensors and with the help of connectivity to the internet, they are able to exchange data. Through IoT, internet has now extended its roots to almost every possible thing present around us and is no more limited to our personal computers and mobile phones. Safety, the elementary concern of any project, has not been left untouched by IoT. Gas Leakages in open or closed areas can prove to be dangerous and lethal. The traditional Gas Leakage Detector Systems though have great precision, fail to acknowledge a few factors in the field of alerting the people about the leakage. Therefore we are using the IoT technology to make a Gas Leakage System with Database logging and Prediction having Smart Alerting techniques involving sending text message and an e-mail to the concerned authority.Keywords : Data analysis, Gas leakage detector, Internet of Things, MQ5 gas sensor, Prediction, Smart alerting techniques, Temperature and humidity sensor.IntroductionLiquid Petroleum Gas is used on a large scale for domestic and industrial purposes. Main constituents of LPG are propane and butane. The proportion of these gases varies according to applications. These gases are highly flammable and if not used carefully they can be dangerous and lethal. LPG is an odorless gas, hence leakage detection this gas cannot be detected via smell. Leakage detection and location is one of the major concerns of homeowner all over the world. Proper management of the consequences and an effective risk minimization can be done by timely evaluation and proper response to leakage. The traditional gas leakage detectors are not more concern about the safety of people. The proposed system uses IOT and gives us a way to detect gas leakage as well as take proper measures for providing safety to users. Over the past decade, Internet of Things is expanding and is being used in various applications such as home automation, smart city, smart farming, etc. IOT is a network of physical devices embedded with different types of sensors and actuators and via internet connectivity is able to exchange and collect data. It goes beyond machine to machine communications to make use of variety of protocols, applications and domains. It helps in making applications which are cost efficient. 1.1 Need:Around 62 people die every day due to fire accidents in India. Out of this 17% deaths are due to gas cylinder/stove burst7. Systems providing safety to people from gas burst are not easily available in the market. The proposed system will help in giving better protection to life and property. It will also help in taking quick actions and also data will be analyzed by connecting the system to the database and also prediction will be done using suitable prediction algorithm.1.2 Basic Concept:”IOT based Gas Leakage Detection System with Database Logging, Prediction and Smart Alerting” will detect gas leakage using MQ5 sensor (used for detecting natural gases) and check the presence of excess amounts of harmful gases and alerting through alarms. With the help of IOT it will alert concerned authority about the condition through SMS using GSM module and an email will be sent using NodeMCU. It will also forward the sensor values to the database for collecting and analyzing the data.Related WorksMahalingam , R. T. Naayagi, N. E. Mastorakis 1 have proposed a system where any gas leak detected by the sensors is fed to the microcontroller so that it can process and produce an audio-video alarm. Buzzers and LEDs are used in alerting mechanism and MQ5 sensor senses various gases. The system uses PIC18F1320 microcontroller which detects the gas leakage and activates the alarm when certain exposure limit is exceeded. 1 Hina Ruqsar, Chandana R, Nandini et al. 2 have proposed a system that monitors the gas leak constantly with the help of sensors and also the data is available real time through internet. They have used Xively IOT platform to provide real time sensor data over the internet. The sensor data will be fed to an account (Twitter or Facebook) through Xively. Advantage of the proposed system is that along with gas leakage detection, real time data is available through real time feed over internet.2 The proposed paper by Ashish Shrivastava, Ratnesh Prabhaker, et al 3 aims to present such a design that can automatically detect and stop gas leakage in susceptible premises. This system consists of GSM module, which alerts by sending SMS. This system not only detects gas leakage but also alerts and turn off main power and gas supplies. 3Existing SystemAsmita Varma, Prabhakar S, Kayalvizhi Jayavel 4 have proposed Gas leakage detector system that uses IOT technology which also has Smart alerting techniques like calling, sending SMS and email to concerned authority. The system uses an MQ-2 Sensor which can detect gases such as H2, LPG, CH4, CO, Alcohol, Smoke and Propane. The system is capable of detecting presence of excess amount of harmful gases and alerting through alarms and also with the help of IOT it can alert the authority through calls, SMS and email about the details of the area using Ethernet shield. The system also cuts of the main power supply of the house or building using relays when the concentration of gas is about to reach a lower explosion limit. The system sends the sensor readings to cloud so that analytics can be done.4 Abid Khan ,Neju K. Prince , Shailendra Kumar Dewangan , et al 5 have proposed a system that measures the consumption of gas according to time. If gas reaches a particular level, booking message for a new cylinder is transmitted by GSM .The main objective of the alert mechanism in the proposed system is to use MQ5 sensor in order to prevent damage or explosion of LPG. The alert mechanism includes an buzzer, an LED and a SMS sent to the stored numbers with the help of GSM. Micro controller unit controls all the devices. The system uses 89C51RD2 Microcontroller perfectly fits many uses and has low consumption, low cost and flexibility.5Proposed SystemThe functionality of system will consists of four main steps. In the initial step, the gas leak will be detected using MQ5 sensor and the sensor values will be sent to NodeMCU. In the second step NodeMCU will send activation signal to other external devices attached to it. In the third step, many tasks can be performed such as buzzer can be activated to send alarm signal , LED will be turned on, GSM module will send an SMS and NodeMCU will send Email to concerned authority via its inbuilt WiFi. In the last step, the NodeMCU will pass the sensed values from different sensors to database where analysis of collected data and prediction can be done.4.1 MethodologyIn the proposed system, we will detect and constantly monitor the gas leak and use alert mechanisms to notify the users and concerned authority about the mishap. It will also analyze the leak and make the data available to users via internet.Also the system uses the temperature and humidity values, send by DHT22 sensor, since the behaviour of the gases varies according to temperature and humidity of the surrounding area.These values will also help in making more precise system as the cases of false alarms can be reduced.4.1.1 Detection of Gas Leakage The MQ5 sensor interacts with gas to measure its concentration.MQ5 is suitable for detecting LPG,town gas and natural gas.The MQ5 sensor interfaced with NodeMCU will read the gas values from time to time. In case the sensed value surpasses the threshold value, the gas leakage is detected. The DHT22 Sensor is digital temperature and humidity sensor which gives out a digital signal on data pin.The DHT22 will read the temperature and humidity values in the room.These values will be passed to NodeMCU which will forward it to database for analysis and prediction. 4.1.2. Sending Activation to attached modules. NodeMCU is an open source, interactive , programmable, low cost, simple, smart, wifi enabled platform which has a firmware based on ESP8266 WI-FI SOC from Espressif Systems. It takes input from the sensors and will send activation signals to the attached modules like GSM Module, LED and Buzzer for further operations.It will send the sensed values to database for analysis and prediction via its inbuilt WiFi.4.1.3. Operations of attached modules 184.108.40.206. Buzzer: It is an audio signaling device which generates audio at the frequency assigned to it. It will start buzzing at the given frequency to alert the neighbors about the leakage. 220.127.116.11. GSM Module: It assembles a GSM modem with standard communication interfaces like serial port, USB, etc. so that it can be easily interfaced with a computer or microprocessor or microcontroller based system. It will send alert SMS to the consumer and concerned authority regarding the gas leak. 18.104.22.168 LED (Light Emitting Diode) : It is a P-N junction diode which emits monochromatic visible light when electric current passes through it. When the gas leakage is detected and NodeMCU sends activation signal, the LED will be turned on and will glow. 4.1.4. User interface to interact with database: Basic webpage will help the user to view the sensor values stored in the database.The stored values can be used for further analysis and prediction.4.1.5. Database analysis :Analysis can be done using graphs which uses the sensor values stored in database.It can provide information about the reaction of gas at particular temperature and humidity.Prediction can be done using Naive Bayes algorithm.Naive Bayes is classification technique which can solve predictive problems.It is based on Bayes theorem and assumes that the predictors are independent.Naive Bayes model is useful for very large datasets and is easy to build.P(x)=P(c)*P(c)P(x)P(c|x):- posterior probability of class given predictorP(x|c):- probability of predictor given classP(c):- prior probability of classP(x):- prior probability of predictorConclusionThe proposed system will not only provide safety to the users against harmful gases but also analyze the data stored in database to make predictions which can be helpful in current and future use. The use of IoT components will reduce the cost of system to a greater extent which will make it less expensive than the traditional Gas detector systems. The system also notifies the consumer and concerned authority about the leakage with the help of SMS and Email.