IoT Gas Leakage Detector and Warning Generator

− This paper presents an industrial monitoring system design using the Internet of Things (IoT). The gas sensor (MQ-5) captured information is posted into a data cloud. The sensor detects the leakage of gas under most atmospheric conditions. All the components are controlled by an Arduino (UNO-1) that acts as a central processor unit in the setup t. As soon as a gas leakage is detected by the sensor, the alarm is raised in the form of a buzzer. This alarm is supported by an LCD to display the location of leakage, alert the observer, and activate the exhaust fan in the particular section to extract leaked gas. The requirement of a gas detection system is not only to monitor continuously the surroundings but also to help prevent the gas leakage hence minimizing the chances of fire and damage.

INTRODUCTION Safety at workplace and industry is always a priority. In this regard, the less costly options for accident and mishap prevention in oil and gas industries are commonly adopted, yet these measures ought to be effective. Security is the level of protection against danger and loss [1]. The help of technology is needed to provide early warning alerts in order to ensure that enough time is available to prevent potential dangers. In this study, gas leakage detection systems have been highlighted along with troubleshooting directives [2,3]. Even though building a system with a gas sensor is not as easy as it may seem [4,5], a warning system has been developed based on ESP (WiFi) network. The system detects the presence of natural gases such as Methane and LPG. Whenever a gas leakage occurs, the sensors used in the circuit will detect it, the ESP modem will be activated and a notification alert to the user will be transmitted by a customized dashboard. The system provides a real-time notification, allowing immediate implementation of health and safety measures and increasing the available time span to overcome the situation [6,7]. The same system can be utilized in several other places such as kitchens, oil and gas pipelines, gas storage facilities, etc. [4].
There is always a risk of leakage whenever gas is used, threatening human lives and property [8,9]. Therefore, designing a low cost gas leakage detector can help in minimizing this risk over a span of several years. There have been several accidents caused by gas (LPG or methane) leakages in homes and industries (mainly oil and gas industries). These leakages have led to the loss of several lives and properties through fire outbreaks and explosions [8,10].
II. PROBLEM DESCRIPTION In pipelines gas transfer, gas leakage is inevitable as there is a necessity of joints and other transmission components. The gas leakage up to a certain mass level can be ignored, however it is very important to raise an alarm if it surpasses certain threshold values. During the training in oil and gas industry the problem was mainly identified at the connections of gas valves. IoT can be utilized for efficient and easy monitoring of gas leakages in a continuous basis and from any distance. IoT is basically a network of interconnected devices that are embedded with sensors, programing, and network connectivity to collect and exchange data [11,12].

III. DISCUSSION
The aim of this paper is to design a system that can detect the presence of natural gases and send alert signals to the users and nearest engineers of the leakage occurrence, and by showing a dashboard to the operator. The difference between the proposed system and the proposed one in [2] is that it shows a full screen dashboard in a 24 hour basis, connected to Wi-Fi allowing the faster information sending to the dashboard. In [2] the GSM is not efficient to be read all the time. It takes time and the reading is done by a mobile and not an industry application. Our system allows the user to be able to take immediate actions against the gas leakage. In addition, it makes the gas leakage information available, accessible, and monitored from the DCS room. This system can be used in oil and gas industries and even in our kitchen.

A. System Methodology
In this phase, the research focuses more on the study case and the project development based on gas and sensor. The microcontroller will continuously receive the concentration and temperature data from two sensors in analog data packets. It will process the data and convert them to ppm and Celsius degrees respectively. The converted data will be displayed in the LCD. Whenever the reading of the sensors exceeds the set limit, it will automatically send a reading alert to the dashboard by using ESP 8266 Network to the numbers which are already set on the source code. The project methodology shows the step by step development of the project. The methodology includes

B. Hardware and Software Development
Arduino Uno board plays an important role in this project as it plays the role of the project's Central Process Unit (CPU). It needs to be programmed to execute the required function. The program should clarify the digital and analog pins (input and output pins), transmit, receiver pins, input voltage, and output voltage (5V DC). The Arduino Uno is a microcontroller board with extraordinary functions. It contains fourteen digital (input and output pins), six analog pins, with data transferring speed up to 16MHz, a universal USB terminal, power connection, and a reset switch. The project basic diagram is presented in Figure 1 and the software flowchart is given in Figure 2 [6].  The hardware components of the module are:  Figure 3, the model will be designed in a Printed Circuit Board (PCB). The project will be containing several devices such as the microcontroller, transistors, diodes, transformer, resistors and filter capacitance. The circuit will be fed from the sockets (230V) by using the stepdown transformer to 12V. The voltage will become DC by a bridge rectifier. The output of the bridge rectifier will be smoothed with the use of a parallel 1000µF capacitance filter. The PCB should be designed before by using special programs such as Proteus. It helps to simulate the circuit and check the number of pins and available connections for each component. The following steps show the arrangement to our model: • Proteus gave us many advantages to minimize the number of wires and easy connection for each component. Also, Proteus facilitated all connections so that the circuit was completed in operational form. Figure 4 shows the design of the PCB (3D). In addition, the condition of the circuit is applicable by testing the LCD, Wi-Fi, valve, and the fan.
• Proteus was used to view the circuit from other angles. The back view of the circuit helped us to inspect various solder components. Figures 5-6 show the layout of the back of the PCB.
• Once we are satisfied with the simulation of the circuit, we were ready to take up the soldering of the components.    VI. SIMULATION RESULTS The circuit was tested using Proteus by running the design. The tested MQ-5 sensor was adjusted from 0% to 100%. At 100% the output voltage was 5V as shown in the datasheet of the sensor. When the program is running, the Power ON LED and the Green LED are working. The red LED and the alarm are not [5,10].
By applying (1) and (2) to calculate the gas leakage for different gases, such as Methane and LPG we got different results as shown in Table I which the sensor working properly.
Practical results were obtained using the PCB implemented gas leakage detector. The circuit was powered on and LPG gas was released from a lighter. The gas concentration was read on the LCD and recorded in IoTgecko instrument panel (dashboard). The gas sensor sensed the gas from the lighter in different concentrations caused by different lighter distances from the sensor. The high accurate sensor could read up to 10000ppm [9]. When the gas is released, the green LED goes OFF, the red LED blinks, and the alarm goes ON when the sensor output voltage is more than or equal to 2.5V. Below 2.5V, the alarm is OFF and the green LED is lit while the red LED is off. The sensor output voltage is monitored using a push button that shows if the alarm is ON or OFF.
As shown in Figure 7 the simulation results and the practical results of testing the sensor in different levels of voltage match. The dashboard (instrument panel) and LCD show the same condition for different gas readings. Comparison between simulation and practical results.  VII. OPERATION After plugging the 12V power supply from the main outlet the circuit is biased and the PCB starts its operation. Supply of power to all the components must be assured for smooth operation. One way is to check the blinking LED for internal components. The main LED is also working as shown Figure 8 according to [11]. After a couple of seconds, the PCB will connect to the Wi-Fi and will display the status of the connection on the LCD. The PCB is connected to the IoTgecko. Then, a dialogue box appears on the computer to seek the minimum and maximum values for gas detection. This is the setup of the level of sensitivity for the detection of leaked gas. Fig. 9.
Pipe minimum and maximum gas concentration values input when connecting to the server.
If the gas leakage is does not belong in the range defined by the maximum and minimum values for the pipe, the alert will start, and the warning light would turn ON and an appropriate message will show on the server. In addition to this the gas valve changes its status from open to close and the exhaust fan will turn ON immediately.

VIII. TESTING RESULTS
For testing the project in the laboratory, a cigarette lighter was used in two particular cases as discussed below.

A. Without Gas Leakage from the Pipe
We assumed the gas has a leakage concentration of 6% as maximum and a minimum of 2%. In this case the cigarette lighter was not used to satisfy the condition. Figure 10 shows the display of normal condition. The Green LED shows the normal condition, the fan and the valve don't take any actions.  In this case we assume that the gas concentration has a maximum value of 10% and a minimum value of 2%. In this www.etasr.com Alshammari & Chughtai: IoT Gas Leakage Detector and Warning Generator case the cigarette lighter was used to satisfy the condition of risk. Figure 11 displays the abnormal conditions in the server and in the module. The red LED represents the abnormal condition, the fan and the valve they will take actions immediately.

IX. CONCLUSION
After the design implementation, the device accurately detected the simulated gas leakages and a message was generated through the Wi-Fi network. The message was transmitted to the server to arm the buzzer for the purpose of user alert. On the same time the exhaust fans were automatically activated to suck out the leaked gas from the enclosed space, to prevent potential ignition and fire hazards. This smart device offers several safety benefits that are vital for early gas leakage detection, and response towards preventing LPG leakage. With small modifications the system can also be used for household purposes to prevent house gas leakages.