Cigarette detection system in closed rooms based on Internet of Thing (IoT)

Detection of cigarette smoke is very necessary to increase the level of comfort in a closed room. By implementing an Internet of Thing system in detecting cigarette smoke in the room, making it easier to monitor and control it via a smartphone. In this system, the MQ-2 sensor is used to detect cigarette smoke in the room, the NodemCu microcontroller as a data processor received from the sensor, the buzzer as an indicator sound and the blynk application to display notifications if the room is detected by cigarette smoke. The sensitivity level of the MQ-2 sensor is strongly influenced by the distance of the source of cigarette smoke with the sensor. The use of the internet of thing system affects the signal strength and network on the user’s smartphone which results in a delay when sending notifications. Therefore, a good internet network is needed. The use of IoT technology in detecting cigarette smoke in a room will be an alternative solution to increase the level of security and comfort in a closed room.


Introduction
Air pollution is an air condition that is contaminated by the presence of materials, foreign substances or other components in the air that cause changes in the air structure by human activities or by natural processes, so that air quality becomes less. One of the causes of air pollution is cigarette smoke. Cigarette smoke is one of the things that is harmful to humans. Cigarette smoke contains 4000 toxic chemicals and no less than 69 of them are carcinogenic or cause cancer [1].
Smoke is a suspension of small particles in the air (aerosols) that come from improper combustion of a fuel. Therefore, smoke can also damage human health. Poisoning smoke is the main cause of death of fire victims in the room. This smoke kills with a combination of thermal damage, poisoning, and lung irritation caused by carbon monoxide, hydrogen cyanide, and other combustion products [2]. Detection and monitoring system of smoke concentration is very useful for places that tend to be flammable or area/room that are designated as nonsmoking area. This system is not only able to detect smoke but also determine the existence of point/source of smoke (areas where greater smoke concentrations are detected). The presence of smoke sources can be observed by monitoring systems with the addition of mobile camera trackers to focus on the presence of smoke sources. This system is very helpful to facilitate the building/room security officers in monitoring the smoke in their area, either smoke caused by fire or cigarette smoke in nonsmoking area [3].
In many universities it has been declared a smoke-free area on campus, this is intended to minimize the adverse effects of cigarette use on campus. Various efforts to increase the dangers of smoking are one of them by implementing a ban on the campus environment, but in reality many of them violate it. To increase comfort in a closed room from cigarette smoke, a system was created to detect the presence of cigarette smoke.
At present the IoT (Internet of Things) internet-based automation technology is one of the popular and growing technologies, especially in the application of home appliances home automation ladder is needed so users no longer need to bother turn on and turn off an existing electronic device [4].
This system consists of several electronic devices such as cigarette smoke sensors, buzzers, Liquid Crystal Display (LCD) and other electronic components that are controlled by the microcontroller system as a data processor. The microcontroller used is Nodemcu. Nodemcu is an open source IoT platform. Nodemcu has 10 GPIO Ports from D0 -D10, PWM functionality, I2C and SPI interfaces, 1 Wire interface and ADC. The type of sensor used is the MQ-2 sensor. This sensor is a sensor that can detect the presence of cigarette smoke. This tool is also equipped with a buzzer as an alarm marker for the presence of cigarette smoke in the place. Of the entire system will be connected to the internet that can be accessed via an Android smartphone so that it can make it easier to monitor the condition of cigarette smoke in the room even though it is not in the room. So when someone turns on a cigarette in a closed room, a warning will immediately appear in the form of an alarm and also an SMS that goes to the policymaker's cellphone [5][6][7]. Based on the above block diagram explaining that sensor MQ-2 will do the detection of the presence of smoke or not in the room. If the sensor detects smoke indoors then the sensors will transmit data and analog in sports by mikrokontroller. As well as settings of the cell phone users who want a certain condition that will be working simultaneously from multiple input above based on the mikrokontroller command. The result of the processing of data and command from microcontroller output will provide notification in the form of android applications and buzzer with Internet communications of Thing.

Research method
Design and manufacture of smoke detection system in a closed room-based Internet of Thing (IoT) includes software and hardware include:  Power supply to provide the supply voltage on the NodemCu.  NodemCu as the center of the control or data processing of sensor MQ-2.  The Sensor used in this research is the sensor MQ-2 functional smoke detector in the room.  [5].  Android Smartphone used as a display in the user interface with the control system. Figure flowchart above explains that the workflow system at start by connecting the device to the power supply and the system is ready to begin their processes with NodeMCU that is connected to the internet as communication between software and hardware. If it is connected to the internet, then the sensor MQ-2 will start to detect cigarette smoke so that the data will be processed and sent to the server that would menampikan a notice on a smartphone. The next process is if the microcontroller code pairing of android as in the previous program will then enable or disable the actuator in the form of the buzzer.
Software design in this system using program editor and compiler software for Arduino Uno, The Arduino IDE software as compiler to NodemCu. Arduino IDE software uses C language so that it can make it easier for users to program a microcontroller [8].

Result and analysis
From all parts to design the system in a box, as well as the installation of sensors placed inside acrylic box corresponds to the voltage supply 220 VAC delivers.  Testing the mq-2 sensor is done in various distances. Based on Table 2, it can be concluded that the closer the sensor distance the smaller the time of reading the value of cigarette smoke. And the average increase in ppm with a distance of 10cm sensor from the source of cigarette smoke and normal air conditions to detect cigarette smoke is 202. The average increase in ppm with a distance of 15cm sensor from the source of cigarette smoke and in normal air conditions to detect cigarette smoke is 173,667. The average increase in ppm in the 20cm sensor distance from the source of cigarette smoke and in normal air conditions until detecting cigarette smoke is 115,333. The average increase in ppm within the 25cm sensor distance from the source of cigarette smoke and in normal air conditions until detecting cigarette smoke is 97.6667. And the average increase in ppm in the 30cm sensor distance from the source of cigarette smoke and in normal air conditions to detect cigarette smoke is 73.6667.   Figure 5. Notification on Android.
The picture above is from the results of some tests that have been done over at get results from testing the system overall tools ranging from smoke detector system in a room using a system of internet of things that can be detect or no cigarette smoke in a closed room effect on signal strength and network on a smartphone. Sensor sensitivity levels can be measured by how much distance sensor toward the source of the smoke. In addition to other factors that can affect the level of sensitivity is the State of wind within a room.
If the MQ-2 sensor detects the presence of cigarette smoke in the room, the sensor will send analog data and is processed by a microcontroller. The results of processing data and commands from the microcontroller will provide output in the form of notifications in the android application and buzzer with Internet of Thing communication.

Conclusion
From the testing process and data collection for several times, it can be concluded as follows:  The sensitivity level of the MQ-2 sensor is strongly influenced by the distance of the source of cigarette smoke with the sensor.  Use of a better internet network is a major factor which is expected to be able to communicate properly over the network without any disruption in the form of delay time.