Prototype of Gas Warning Monitoring Application Using Mobile Android Smartphone : A Case Study

,


INTRODUCTION
Sistem Manajemen Keselamatan dan Kesehatan Kerja commonly referred to as SMK3, is now a very important concern because of the high number of work accident in Indonesia.SMK3 to build occupational safety and health system by involving management element, worker, condition and integrated work environment in order to prevent and reduce accidents and occupational diseases.
To meet the demands set by the government and its customers.The Company has followed its first audit in accordance with OHSAS 18001: 2007 standard, ILO-OSH: 2001 and Permenaker No 5 Year 1996 [1] on Occupational Safety and Health Management System.At the time of the first audit there were several findings, one of them in chemical warehouse in which there is gas installed to the production machine.
Findings submitted by the auditor to the team SMK3 in The Company is weakness of security system on Installation of gas in the warehouse, because in case of leakage in the gas installation, it may be risky such as contamination of the product, the danger of gas being inhaled by the employee and the most dangerous is the explosion.For now the security system has not been maximal and can effectively control the danger of gas leakage.The current security system is still using the emergency button to be pressed by someone who knows if there has been a leak in the existing gas installations in the chemical warehouse, this can be risky for the safety of employees and the production process at The Company.
Along with the increasingly sophisticated technological developments over time, security systems must be improved so that leak monitoring of gas installations can be more effective and efficient [2].Therefore, the monitoring of an object becomes more practical.To observe an object does not need to be done continuously, but simply put a sensor that leads to the desired object and then observe it through android smartphone [3].For devices to be used as controllers and gas leak information givers in chemical warehouse using android smartphone.In one of the journals of the International Journal of Computing and Technology titled Android Base Home Automation Using Raspberry Pi writes that it is possible to set up a system to control and monitor using raspberry pi via android applications run on smartphones using android operating system [4].Based on the research, to monitor gas leakage in this research can be done by using Android smartphone and Raspberry Pi.
Based on the above background, this research intends to make a leak detection device on gas-based raspberry pi installation connected to android application so that the SMK3 team can monitor the condition of the warehouse without having to repeatedly come to the site.The number of employees, especially SMK3 team that uses android smartphone can be used as a solution to monitor and control leakage on gas installations in chemical warehouse through android smartphone that they use.It is hoped that the construction of this system can increase and reduce the risk of work accident caused by LPG gas.

A. Internet Of Things
Internet of Things (IOT) is a computational concept that describes the future in which every physical object can connect to the internet and can identify itself between other devices [5].The term "Internet of Things" became known in 1999 when it was first mentioned in a presentation by Kevin Ashton, confessor and executive director of the Auto-ID Center at MIT (Massachusetts Institute of Technology).

B. Android
Android is a subset of software for mobile devices that includes middleware operating systems, and core applications released by Google.Android is a mobile operating system that adopts Linux operating system, but has been modified.Android was taken over by Google in 2005 from Android, Inc. as part of a strategy to populate the mobile operating system market.Google takes over all android work including the team that developed Android [6].

C. Arduino Nano
Arduino is an electronic kit or an Open source electronic circuit board in which there is a main component, a microcontroller chip with Advanced Versatile RISC (AVR) type from an Atmel company.The microcontroller itself is a chip or intergrated circuit (IC) that can be programmed using a computer.The purpose of embedding the program on a microcontroller is that the electronic circuit can read the input, process the input and then produce the output in accordance with the desired.So the microcontroller as the "brain" input, output and process on an electronic circuit.

D. Raspberry Pi
Raspberry Pi is a mini computer device the size of a credit card.Raspberry Pi has a Broadcom BCM2835 chip (SoC) system, which includes the ARM1176JZF-S 700 MHz processor (the firmware includes a number of "Turbo" modes) so users can try overclocking, up to 1 GHz, tanp, VideoCore IV GPU, and originally shipped with 256 megabytes RAM, then upgraded to 512MB.Includes built-in hard disk or solid-state drive, but uses the SD card for booting and long-term storage.
The operating system is embedded in an SD Flash Card, which makes it very easy to replace and exchange.The potential is remarkable, from the already or never explored, but has been tested as a multimedia player with good capabilities [7].Raspberry pi has GPIO (general purpose input output).GPIO is a generic pin on a chip that can be controlled and programmed through software in both configurations as input pins and output pins.

F. Web Service
Web Service is a software system designed to support interaction and interoperability between systems on a network.Web services are used as a facility that provides services (in the form of information or data) to other systems, so that they can interact with the system through the services provided.Web services store information data in JSON or XML format, so this data can Accessed by other systems despite different platforms, operating systems, and programming languages [8].

A. Problem Analysis
Some of the most common problems with gas leak checking activities are : 1. Weak security system in existing gas installations in chemical warehouse, because the current security system only uses emergency button which is operated manually when gas leak occurs.2. Inefficient time when monitoring the gas installations in chemical warehouse, because the team must check the condition of the warehouse at any time during working hours.

B. System Architecture Analysis
The system to be built has several stages of input data obtained from the sensor MQ2, data processing input by raspberry pi 3, warning information that appears in android smartphone applications.As for the design of the system to be built can be seen in Figure 3 below. .The following analysis of data flow and stages to explain the work process on the system design architecture above: 1.The MQ2 sensor detects the level of hydrocarbon gas in the air around the LPG gas cylinder installation, then the MQ2 sensor sends an analog signal to the arduino nano microcontroller based on the gas content detected by the MQ2 sensor.The gas detected is LPG type gas which consists of two gas mixtures, propane 30% and 70% butane.To differentiate LPG gas and other types of gas then on the sensor MQ2 there is a datasheet that determines the type of gas detected, here is the sensor datasheet to differentiate the type of gas: • Propane 200-500 ppm • Butana 300-5000 ppm • Methane 5000-20.000ppm The hydrocarbon gas that is sensed by the MQ2 sensor affects the value of the analogue resistance which can be converted to voltage.The sensor readings can be read by the ADC pin (analog to digital coverter) on the arduino nano microcontroller.
2. Arduino nano works as an ADC (Analog to digital converter).This ADC is used as an analog to digital converter for the signal can be read by raspberry pi.For example, if the reference voltage is 5 volts, the input voltage is 3 volts, the input to reference ratio is 60%.So, if using an 8bit ADC with a maximum scale of 255, we get a digital signal of 60% b.Applications on android smartphone can control GPIO on raspberry pi that serves to control the relay switch.
6. 6. Rasberry pi receives commands from android smartphone to run a program that serves to disable the previously active relay switch to turn on the exhaust fan in the triger by the MQ2 sensor.GPIO on raspberries to further control the relay.. Another explanation that can explain more details of the system workflow can be seen in figure 4 below.

C. Web Service Analysis
In the development of this web service based RESTfull API with JSON-based data exchange, web service development is built into two parts: webservice for android device and web service for web application, both web service is connected to one database.The webservice is accessed by web apps and android apps and then reconfigures on the device with JSON format.

D. Hardware Analysis
Hardware analysis is an analysis process that emphasizes more on the aspect of hardware utilization needed for research Prototype Warning Monitoring Gas Via Android Based Rapsberry pi in Chemical Warehouse The Company.

D.1. Mini PC Raspberry Pi3 Analysis
Instead of PCs in this study used a mini PC that is Rapsberry pi 3. Raspberry pi or often abbreviated Raspi, is a single board computer SBC (single-board circuit) the size degan credit card.Raspberry pi has a processor, RAM and hardware port like most computers that can be connected to monitors, kerboard and mouse.In addition raspberry pi also dilengkapai with GPIO (General-Purpose input / output) which serves to control the relay that works as a switch.Relay is one component part of the system to be built.Rasberry pi is a good choice to use as a web sever as a liaison between the android smartphone device and microcontroller that is suitable for the system to be built on the research being conducted.Raspberry pi can be activated by using a micro USB cable with a voltage of 5V and a minimum current of 700 mA.With 700 mA current limits on micro USB and GPIO pins.Any good input / output digital pins have logic high 3.3VDC and low logic 0 VDC.If the resistance is less than 3.3V on any pin it can cause damage.

D.2. Microcontroler Arduino Nano Analysis
The microcontroller board used in this experiment is an arduino nano board.Arduino nano is a microcontroller board based on ATmega328p with a very small size.Arduino nano is used as ADC (analog to digiltal converter).This ADC works to convert analog signals that send MQ2 sensors into digital signals to be read by raspberries pi.By using arduino nano to facilitate the process of assembling a series of electronics microcontroller than assemble Atmega328 from scratch in breadboard.ISSN 2354-0082

D.3. Sensor MQ2 Analysis
For LPG gas sensor used MQ2 sensor.MQ2 is an electronic component for detecting hydrocarbon gas levels such as iso butane (C4H10 or isobutane), propane (C3H8 or propane), methane (CH4 or methane), ethanol (ethanol alcohol, CH3CH2OH), hydrogen (H2 or hydrogen), smoke, and LPG (liquid petroleum gas).This gas sensor can be used to detect gas leakage at home and factory, in this research MQ2 is used to detect leakage of LPG.
By using MQ2 hydrocarbon Gas Sensor, the researchers can detect the levels of hirdokarbon gas in the air by connecting the MQ2 sensor to the Arduino nano microcontroller.Thus the researcher can make electronic devices to determine the action based on readable such as sending notification on the smartphone android warning sign of danger when gas leak is detected.
The output of this sensor is analogue resistance which can easily be converted to voltage by adding one ordinary resistor can also use potentiometer so threshold detection sensitivity can be adjusted as needed.By converting this impedance into voltage, the sensor reading result can be read by ADC pin (analog to digital converter) on arduino nano microcontroller.This MQ2 gas sensor can be installed close to the gas installation so that when LPG gas leak occurs, this sensor can easily detect it.The description of how the sensor works can be seen on the Figure 5.

. Relay Switch Analysis
This research uses a switch as an electrical voltage relay.A relay is an electromechanical component that acts as a switch operated by an electric voltage.The relay consists of two parts namely the Coil electromagnet and a set of switch contacts.Relays use electromagnetic principle to drive the Switch Contacts so that with a small electric current (low power) can conduct higher voltage electricity.For example, with Relays using 5V and 50mA Electromagnets capable of moving Armature Relay (which serves as a switch) to conduct 220V.

E. Functional Needs Analysis
This section discusses the use case diagrams of mobile applications, class diagrams and relational schemes of the table structure on the web backend.

E.1. Use Case Diagram Mobile Application
Use Case Diagram is a diagram showing the functionality of a system or class and how the system interacts with the outside world and describes the system functionally visible to the user.From the identification of actors involved above then Use Case Diagram can be described as follows in Figure 6.Stage Implementation and system testing is a design translation phase based on the results of analysis into a particular programming language and application of software built in the real environment.

F.1. Hardware Implementation
The hardware used to implement the system can be seen in the table III and Figure 9 below.

. Raspberry Implementation
In Raspberry pi can be seen the value generated by the MQ2 sensor sample results.Visible on the image the value changes when there is a leak in the gas.. MQ2 sensor sample results when no leaks can be seen in the Figure 10.

. Mobile Android Implementation
Here is an implementation of several interfaces of the android mobile platform system that can be built.

F.3.1 Login Page Interface
In login page interface, user fill in Username and Password on the login page to be able to enter Warning Monitoring Gas Application.The appearance can be seen in the Figure 12.

. Website Implementation
Chart graph display on server can be seen through web application.In this web application can be seen graphs, historical tables, and time tables of events.This software testing uses two stages, the first stage is alpha testing that focuses on software functionality built with black box testing methods.The second stage is beta testing that focuses on user assessment of the software built, data collection methods in the form of interviews to parties who involved in the system.Alpha testing is a test of functionality against software built.Alpha testing is done by users who use software that has been built previously and accompanied by the builder.The builder notes the mistakes and problems felt by the user.Alpha testing is divided into three stages, namely test scenario, case and test results, and test conclusions.

G.1. Gas Leak Monitoring Testing
Table III below is the result of blackbox testing of gas leakage with this application.Figure 15 below shows an example of test scenario implementation result that the user gets the status of safe or alert information.On this page the user can see the status of the gas condition in case of leak it appear notification in the form of a warning that there has been a leak.

G.2. Blackbox Testing Conclusion
Based on the results of blackbox testing that has been done can be drawn the conclusion that the process still allows an error, but the system functionality can produce output, validation and error handling process is expected.

IV. CONCLUSION
Based on the results obtained from research conducted this study, it can be concluded : 1. Security system for leakage on gas LPG installation in chemical warehouse at The Company in this research can be improved 2. Time to monitor gas installation condition in chemical at The Company in this research becomes more efficient Furthermore, this monitoring system can be developed in all aspects of safety not only used for gas leakage only but can be developed to monitor all security systems in The Company, for example wastewater disposal security systems, security systems on production machines and so on so that all systems can be centralized and easy to monitor.

Fig 2 .
Fig 2. Board Arduino Nano E. Sensor MQ2 This sensor functions like a potentiometer, the resistance of this sensor varies proportional to the concentration of the detected gas.The change in resistance value of the sensor is then transferred to the ADC1 port of the microcontroller to be converted to PPM value.(Part Per Milion) The MQ-2 gas sensor has an output change in the resistance value, so in its use with the microcontroller ADC we need to add the load resistor so that the sensor readings can be worth the voltage.The change in voltage values is then converted to PPM (Part Per Milion).

4 .
x 255 = 153 in decimal form and converted to binary form 10011001.Signal = (sample / max_value) * reference_voltage = (153/255) * 5 = 3 Volts 3. Raspberry pi receives an imputed value of Arduino nano that has converted digital signals.Raspberry pi is programmed by using python language to process the value of imputation into information sent to android smartphone, if the specified gas value has reached the maximum limit that has been determined, automatically exhaust fan child is on.Besame with the command to fire the raspberry exhaust fan also sends information in the form of value to server tingspeak.comand server The Company.The value sent by raspberry pi is stored on the server tingspeak and server The Company.a. Data sent to tingspeak.comserver by raspberry pi is data for notification if value in field = 1 means that there has been a mistake and if value in field = 0 means no leakage.b.Data sent to the server The Company is the reading data from the MQ2 sensor periodically, whose results are stored on the server The Company and can be seen in web applications in the form of line charts and tables.5. Applications on android smartphone in this research work in two stages: 1.The application on the andorid Smartphone reads the value on the tingspeak.comserver periodically if the value in field = 0 means no leakage on the gas installation, if the value in field = 1 means there has been a leak in the gas installation.Applications on android smartphone provide a notification if the value is read in the field = 1.

7 .
The relay switch then receives the signal in the form of voltage supplied by GPIO on raspberry pi what if the value on the raspberry HIGH program then the relay is active and if the value on LOW program then switch is off.

Fig 4 .
Fig 4. System Data Flow Analysis

Fig 5 .
Fig 5. How Sensors Works D.4.Relay Switch AnalysisThis research uses a switch as an electrical voltage relay.A relay is an electromechanical component that acts as a switch operated by an electric voltage.The relay consists of two parts namely the Coil electromagnet and a set of switch contacts.Relays use electromagnetic principle to drive the Switch Contacts so that with a small electric current (low power) can conduct higher voltage electricity.For example, with

Fig 6 .
Fig 6.Use Case Diagram E.2.Class Diagram Aplikasi Mobile Class Diagram is a structural diagram that modeled a set of classes, interfaces, conditions and relationships.The class diagram is depicted with a box that is essentially divided into three parts, namely class name, attribute, and operation.For the class diagram in this study are as follows in Figure 7:

Fig 10 .
Fig 10.Sensor Value Without Gas Leakage

Fig 11 .
Fig 11.Sensor Value With Gas Leakage

ISSN 2354- 0082 Fig
Fig 12. Login Page Interface F.3.2.Chart Page Interface Chart Charts On this page Users can see images of Graphic Chart from MQ2 sensor that detects gas leak in warehouse.

Fig
Fig 13.Chart Page Interface F.4. Website ImplementationChart graph display on server can be seen through web application.In this web application can be seen graphs, historical tables, and time tables of events.

Fig 14 .
Fig 14.Chart Page Interface on Web Server G. System TestingThis software testing uses two stages, the first stage is alpha testing that focuses on software functionality built with black box testing methods.The second stage is beta testing that focuses on user assessment of the software built, data collection methods in the form of interviews to parties who involved in the system.Alpha testing is a test of functionality against software built.Alpha testing is done by users who use software that has been built previously and accompanied by the builder.The builder notes the mistakes and problems felt by the user.Alpha testing is divided into three stages, namely test scenario, case and test results, and test conclusions.

Table Structure Database
The table structure describes the detail of the table containing fields, data types, data lengths, and other information.Figure8is a description of each of these tables databases.Fig 8.Table Structure Database F. Implementation and System Testing

TABLE II .
Spesification Hardware Implementation

TABLE III .
Gas Leak Monitoring Testing