Analysis-Based … Real Time System Monitoring and Analysis-Based Internet of Things (IoT) Technology in Measuring Outdoor Air Quality

— The presence of large peatland in Riau, Indonesia, could cause air pollution due to peatland fires which causes the presence of thick smoke every year in Riau, disrupting human activities. In order to monitor the air quality, in this paper, the main advantage of the Internet of Things (IoT) is the ability to transfer data over the network without requiring human-to-human or human interaction to the computer used. In this paper, we propose an air quality monitor that can display web-based information to show the temperature and air humidity, and detects CO, CO2 gases, and alcohol in real time with the help of DHT11 and MQ135 sensors, Arduino Uno and Raspberry Pie. The results show our proposed system can successfully show each parameter of the air quality on the website and make suggestions about the overall air quality level. With our proposed system, we hope the government can respond faster to mitigate the bad air quality level and give information to public about the air quality level in a faster and more accurate way.


Introduction
Air is a mixture of several types of gases in which the ratio is not fixed, depending on the state of air temperature, air pressure, and the surrounding environment [1]. Air pollution is the biggest environmental and public health challenge in the world today. Air pollution causes adverse effects on human health, climate and ecosystems [2]. One of the main causes of global warming is the emission of carbon dioxide into the atmosphere [3]. Currently, the decline in air quality in several cities in Indonesia is increasing continuously due to industrial growth. Based on research conducted by volunteers from Wild Water Indonesia (WWI), Riau province has the largest peatland in Sumatra, covering an area of 4,044 million hectares (56.1% of Sumatra's peatland area or 45% of Sumatra's land area). The carbon content of peat soils in Riau is the highest in all of Sumatra and even in Southeast Asia. Moreover, many people cultivate land illegally by burning forests, which causes the air condition to worsen, which is indicated by the presence of thick smog every year, which disrupts human activities [4].
In order to know good or bad air quality, it is necessary to have technology that is able to provide information and warnings about air quality levels in real time and can be monitored directly on the web. One of the technologies that can be used is the Internet of Things (IoT), whereby the basic concept of this technology is the ability to transfer data over a network without requiring human-to-human or human-tocomputer interaction. IoT has evolved from the convergence of wireless technology, micro-electromechanical systems (MEMS), and the internet [5]. "Things" in the Internet of Things can be defined as a subject, for example, a person with a heart implanted monitor, a farm animal with a transponder biochip, or a car that has a built-in sensor to alert the driver when the tire pressure is low. The Internet of Things is a worldwide "internet-based smart device" system that can sense and connect to its environment and interact with users and other systems using the internet [6]. One of the important concerns is global air pollution, which is one of the main concerns of our time [7].
Pekanbaru City in Riau Province actually already has ISPU devices that can detect air quality, but these tools are only installed at certain points, which causes people who are far from the location to not know the air condition. In addition, the number of system development procedures that must be passed, the length of the process for disbursing funds for system development, and the relevant government management in charge of managing the results of air quality monitoring data are also still slow in updating data, so this tool is ineffective because the data displayed are not in real time and only updated at 15.00 WIB every day [8].
Based on these problems, in this paper, the researchers made a study entitled "Design and Analysis of Internet of Things (IoT) Technology in Measuring Air Quality". In this study, "Things" is defined as a temperature sensor that measures air temperature and humidity, a gas sensor that detects air contamination, namely CO, CO2, and alcohol, to provide information to users when air quality is poor via the web [9]. Air quality monitoring will provide measurements of the concentration of gases and pollutants, which can then be analyzed and interpreted [10]. The purpose of this research is to produce an air quality monitoring system based on IoT so it can be used as information on air quality in an area and can be accessed easily via the website page. This research uses the DHT11 module to detect temperature, the MQ135 module detects air pollution, with Arduino and Raspberry pi as the process of sending data to a web server. The combination of DHT11 sensor and MQ135 sensor is expected to give a more accurate air quality condition. This paper is arranged as follows: Section 1 is introduction of our proposed idea, in Section 2 we explain the previous related works, Section 3 is the methodology of this research, in Section 4 the research design is explained, in Section 5 we explain the results and discussion of our research, and, last, Section 6 is the conclusions. Related Works As a research reference, five previous studies that have been conducted are considered as previous works. In [11], researchers created a system that can measure air quality by combining the IoT concept and the fuzzy intelligence method in their research using Arduino Uno. The results of this study are more accurate than conventional measurements, but, in this study, the speed of the internet greatly affects the web-based server in making changes to the latest information (updates), so it requires an internet service that has optimal speed, as well as sufficient device server support. This paper does not specify any specific sensor, and only focuses on fuzzy logic implementation. In [12], IoT technology is implemented for designing a water quality monitoring device using Arduino Uno. The results of this test show that ATAIR is ready to be used for monitoring water quality in the field and has successfully measured three parameters, namely temperature, turbidity, and oxygen in the Cimahi river. In [13], the researcher uses the Wemos microcontroller module as the main module connecting the air sensor and gas sensor and provides notification to the user through the Blynk application about the air quality information in the room. The sensor which is used in this research is only MQ135, which is used to measure the level of CO, CO2, and alcohol. In [14], Waspmote module is used as a sensor that works to monitor air quality. The application will process data in the form of numbers which are sent to the MySQL database to be uploaded to the internet network in accordance with the ISPU (Air Pollution Standard Index) for further display on the website. This research only monitors the presence of PM10, O3, and CO in the air using MiCS-2610. In [15], IoT technology is designed to be an automatic plant sprinkler which is implemented in a miniature greenhouse using ATMega as a microcontroller combined with the fuzzy method. This research was conducted as an initial stage before testing the equipment to make it fit what was expected. The design of automatic plant sprinklers on IOT-based miniature greenhouses is designed to simplify the work of farmers in managing the watering system for greenhouse plants. DHT11 sensor is used in this research to monitor the humidity and temperature.
Several studies have been deployed to monitor the quality of air [11,13,14], water [12], and soil [15] using an IoT-based monitoring system. Several sensors are used to monitor the quality of air, water, or soil such as DHT11, MQ135, and MiCS-2610. Based on previous studies, it was concluded that previous research had not studied on an air quality monitoring system that combined measuring of CO, CO2, alcohol, temperature, and air humidity, using an IoT-based website as an interface for displaying the results of the air quality measurement system. We believe the addition of temperature and humidity measurement is necessary to monitor the air quality, rather than only focus on the level of gas which is contained in the air. Therefore, in this research, we propose an air quality monitoring system based on IoT that can measure CO, CO2, temperature, and humidity in certain locations and display the measurement results on a web page. This study uses the DHT11 module to detect temperature, the MQ135 module detects the CO, CO2, and alcohol, and then the combination of Arduino and Raspberry pi are used for sending data from sensors to the web server.

Methodology
In this study, two sensors were used, namely the DHT11 and MQ135 sensors. The DHT11 sensor functions to detect air temperature and humidity while the MQ135 sensor functions to detect air contamination which focuses on CO, CO2, and alcohol. The research method is an important part of carrying out research, and through the determined method the discussion of the problem and the research objectives are not out of context, because the researcher must follow the steps of the method. The method used in making the web is the waterfall method, a structured and sequential process, starting from the requirements definition, system and software design, implementation and unit testing, system testing and integration (integration and integration), and operation and maintenance (operational and maintenance). The stages of the waterfall method according to Sommerville [16] are described in Figure 1.
The basic concepts of the research design are carried out in Figure 2. In this study, the DHT11 sensor is needed as a sensor that measures temperature and humidity, while the MQ-135 sensor functions to measure air contamination. These two sensors are connected to the Arduino Uno. Then the Arduino Uno is connected to the Raspberry Pi as a container for incoming data from the Arduino Uno. Wi-Fi as a wireless internet connection sends data to a web server. The web server will then display the following information: 1. Temperature 2. Air humidity 3. Air quality index 4 Analysis and Design

ISPU System Analysis (Air Pollutant Standard Index)
The current air quality monitoring system is the ISPU. The ISPU system is prepared and made by the government as a form of conveying information about air quality levels at certain points of location. In ISPU, air contamination can be detected based on five air pollutants, including carbon monoxide (CO), sulfur dioxide (SO2), nitrogen dioxide (NO2), ozone (O3), and dust particles (PM10).
The air quality level at ISPU is also divided into five categories [17], namely: 1. Good, with a value range of 0-50. In the government ISPU system, information is updated only at 15:00 WIB per day, this information is not in real time. The public can only find out this information if the community is near the point where the ISPU board is installed. Thus, not all people can find out the air quality information.

Air Quality Analysis with IoT Technology
In this study, the detected air quality was not as complete as the ISPU. This is because researchers only used the DHT11 sensor as a detector for air temperature and humidity and the MQ135 sensor, which can only detect some air contaminants such as ammonia (NH3), NOx, alcohol, benzene, carbon monoxide (CO), and carbon dioxide (CO2) [18], [19].
The DHT11 sensor will detect temperature in Celsius and humidity with the following rating categories: 1. If the air temperature reaches 24-27 degrees Celsius, the display on the web will show green, which means the air temperature is still in normal condition.
2. If the air temperature exceeds 27 degrees Celsius, the display on the web will show red, which means the air temperature is abnormal and very hot.
The MQ135 sensor will detect air contamination with assessment categories that still follow the ISPU assessment standards, namely: 1. Good, with a value range of 0-50.

Block Diagram
The system design applied in this study can be seen in Figure 3 below: Figure 3 shows the process of each part in carrying out their respective duties. In the picture, it consists of DHT11 and MQ135 components that are connected to the GPIO port on the Raspberry Pi. Then the Raspberry Pi will record and detect sensor data which will then send the data via an internet connection to the database and display it on a web server [20]. So that when the user accesses the web, a display of the detection results of temperature, humidity, and air quality level will appear in the form of a graphic that is easy for the user to understand.

Fig. 3. Block Diagram Design
The role of IoT technology is physically invisible, but can be seen when the recording and detection process occurs by each sensor, which then sends the data in real time via an internet connection and displays it in a web form that can be accessed by users anywhere. The following is a picture of the tool that has been assembled and is ready for use in Figure 4:

Flowchart Design
In order for the design flow to be clear and orderly, a design flowchart is needed. The following is the IoT design flowchart in measuring air quality in Figure 5.
Based on Figure 5, the system will start recording data when the DHT11 sensor starts detecting air temperature and humidity, then the MQ135 sensor starts detecting contamination of the surrounding air, whereby this sensor is connected to the Raspberry Pi and an internet connection. Then the recorded data will be sent to the database and displayed on the web. Residents as users can see the results of air quality monitoring when accessing the web.

Measurement Scenario
To test the ability of the proposed IoT-based web monitoring system to display measurement results, we take the following steps: a) First step: Measure the original air quality without adding any alcohol or smoke, then capture the measurement result from the website. For the purpose of the research, the sensor is placed in a place where the air condition is in "Good" condition.
b) Second step: Add smoke which contains CO and alcohol to the air around where the sensor is placed until the air indicator changes from good air condition into "Moderate" air condition, then capture the measurement result from the website. c) Third Step: Repeat the second step but wait until the air condition changes into "Unhealthy", then capture the measurement result from the website. Repeat this step until the website shows the "Very Unhealthy" and "Dangerous" air conditions. d) Fourth Step: For the purpose of validation, these steps are also tested at different times, to test the accuracy of other parameters such as temperature and humidity, which usually differ according to the time.

Results and Discussion
The program code to run the DHT11 and MQ135 sensor functions is carried out on the Arduino Uno. Then the Arduino Uno is connected to the Raspberry Pi. This is done when the hardware implementation of the MQ135 on the Raspberry Pi cannot to read the output data from the sensor, because the Raspberry Pi only reads digital data, while the output from the MQ135 sensor is analog data. Thus, the Raspberry Pi cannot display the data output. Therefore, Arduino Uno is used which can automatically read the library from the MQ135 sensor.
The process of sending data between the Arduino Uno and the Raspberry Pi uses a serial connection on the Raspberry Pi. Then the data that have been successfully captured by the sensor are synchronized to the database that has been prepared. After the data have been successfully stored in the database, then these are displayed in a web form so that it is easier for the user to understand.
The connection used is a wireless or Wi-Fi connection, where, by staying connected to the internet, this tool can be controlled remotely without human intervention and manages to display real-time information in accordance with the IoT concept previously described. Users can view this air quality update by accessing the website.
In Figure 6 below, the DHT11 sensor detects an environmental temperature of 31 degrees Celsius or 50 degrees Fahrenheit where the sensor chart is red because the value has exceeded 27 degrees Celsius. The DHT11 sensor also detects the ambient humidity by 54%. Meanwhile, the MQ135 sensor detects 10 ppm CO air contamination, 50 ppm alcohol, and 24 ppm CO2. To get the air quality value, it is determined based on the average of the three detected contaminations, where, in this test the average value of air contamination is 28 ppm, by which the air quality category is in the Good category marked with green.
A display of five updated data from air quality monitoring results is shown in Figure 7. In Figure 8 below, the DHT11 sensor detects an environmental temperature of 26 degrees Celsius or 149 degrees Fahrenheit where the sensor chart is green because the value is less than 27 degrees Celsius. The DHT11 sensor also detects environmental humidity by 36%, while, the MQ135 sensor detects air contamination of 65 ppm of CO, 122 ppm of alcohol, and 24 ppm of CO2. The air quality value is determined based on the average of the three detected contaminations, where, in this test, the average value of air contamination is 70.3 ppm, by which the air quality category is in the Moderate category marked in blue.
A display of five updated data from air quality monitoring results is shown in Figure 9.  Figure 10 below explains that the DHT11 sensor detects an ambient temperature of 31 degrees Celsius or 73.4 degrees Fahrenheit where the sensor graph is red because the value has exceeded 27 degrees Celsius. The DHT11 sensor also detects around 54% humidity, while the MQ135 sensor detects 23 ppm of CO air pollution, 437 ppm of alcohol, and 24 ppm of CO2. The air quality value is determined based on the average of the three detected contaminants, where, in this test, the average value of air pollution is 161.33 ppm, where the air quality is included in the Unhealthy category which is marked with orange color.
A display of five updated data from air quality monitoring results is shown in Figure 11. In Figure 12 below, the DHT11 sensor detects an environmental temperature of 32 degrees Celsius or 476.6 degrees Fahrenheit where the sensor chart is red because the value is more than 27 degrees Celsius. The DHT11 sensor also detects the ambient humidity by 45%, while the MQ135 sensor detects air contamination of 247 ppm of CO, 423 ppm of alcohol, and 12 ppm of CO2. The air quality value is determined based on the average of the three detected contaminations, where, in this test, the average value of air contamination is 227.33 ppm, by which the category of air quality is included in the Very Unhealthy category, marked in red.
A display of five updated data from air quality monitoring results is shown in Figure 13.  In Figure 15 below, the DHT11 sensor detects an environmental temperature of 32 degrees Celsius or 476.6 degrees Fahrenheit where the sensor chart is red because the value is more than 27 degrees Celsius. The DHT11 sensor also detects ambient humidity by 12%, while the MQ135 sensor detects air contamination of 247 ppm of CO, 423 ppm of alcohol, and 324 ppm of CO2. The air quality value is determined based on the average of the three detected contaminations, where, in this test, the average value of air contamination is 331.33 ppm, by which the air quality category is in the Dangerous category marked with black.
A display of five updated data from air quality monitoring results is shown in Figure 15.

Analysis and Discussion
The result shows that our system could show the measurement on our proposed web-based IoT successfully. The parameters which are shown on the website are temperature, humidity, CO, CO2, alcohol, and the average PPM, which indicates the level of pollution. The website also automatically shows the air quality level based on the system calculation and on the classification in Section 4, whether the quality is "Good", "Moderate", "Unhealthy", "Very Unhealthy", or "Dangerous". Compared to the previous works [11][12][13][14][15], we believe our proposed system is more complete because we can combine the DHT11 sensor and MQ135 sensor so that the air quality level can be calculated more accurately. The addition of temperature and humidity, which is measured by DHT11, is necessary to calculate the overall air quality to be more accurate because temperature and humidity condition can be dangerous for human life after reaching a certain level. Compared to the previous system, which is used by the government, our monitoring system has the advantage because people can monitor the air quality wherever and whenever they want, unlike the government's tools which are only placed in a certain place and only updated hourly.

Conclusion
In this paper, we present an air quality monitoring system based on IoT which can show the monitoring results in real-time using a website. The sensors used in this research are DHT11, which can measure the level of temperature and humidity, and MQ135, which can measure the presence of CO, CO2, and alcohol. Arduino and Raspberry Pie are used to send the data from the sensors to the website. For testing purpose, alcohol and smoke which contained CO were added to the surrounding of the sensors to test the capability of the proposed system. From the result of the research, it is shown that the website can present the level of each parameter accurately, the system can detect the increasing of the alcohol and CO level, and the website can show the change of the parameters in real-time and then give suggestion based on the average pollutant level. The system also successfully detected the temperature and humidity change when we tried to test the system at different times. For the future work, the author suggests that more sensors are needed so more particles in the air can be detected. Sensors which can detect the presence of PM10, PM2.5, O3, NO2, and other air pollutants are needed. The sensors which are used should be compatible with Arduino and easy to be implemented. More accurate pollution level calculation also should be studied to give better representation of the air condition. With more supporting sensors and better air quality level calculation, we believe this research will give a more accurate air quality monitoring system and, as such, will give many advantages to human life.