1 Journal of Intelligent System and Telecommunications 1. 51-62 Journal of Intelligent System and Telecommunications Journal homepage: https://journal. id/index. php/jistel/index IoT-Based Air Quality Monitoring System Using Rule-Based Method in Pertamina Green Village Haryanto1*. Mochamad Rafli Rahmadani1. Dian Neipa Purnamasari1. Adi Kurniawan Saputro1. Hanifudin Sukri1. Diana Rahmawati1 Electrical Engineering. Faculty of Engineering. Universitas Trunojoyo Madura. Bangkalan. Indonesia *Correspondence: E-mail: Haryanto@trunojoyo. ARTICLE INFO ABSTRACT Article History: Submitted/Received 4 December 2024 First Revised 20 December 2024 Accepted 20 December 2024 First Available Online 21 December 2024 Publication Date 21 December 2024 This research aims to design and implement an Internet of Things (Io. -based air quality monitoring system with rulebased method in Pertamina Green Village. This system is designed to monitor and detect various air quality parameters such as Ozone (O. Carbon Monoxide (CO), dust particles (PM. , temperature, humidity, and rainy weather detection using various sensors connected through the IoT platform. The sensors used in this system include MQ131 sensor to detect O3. MQ7 sensor for CO. DHT22 sensor for temperature and humidity. ZH03B dust sensor to detect (PM. , and rain sensor. Data from these sensors are sent in real-time to the Blynkcloud platform and telegram application for direct notification to the user. System testing shows that the sensors used are able to detect air quality parameters well. Quality of Service (QOS) test results indicate that the system has Troughput. Packet Loss, and Delay (Latenc. which fall into the excellent category, although Jitter is in the medium category. The test results carried out on the five sensors are the average percentage of DHT22 sensor error values of 0. 1% for temperature, and 0. 4% for humidity. MQ7 sensor of 0. MQ131 of 0. ZH03B of -0. 03%, for rain sensors in normal conditions. QOS system tests prove that the use of hotspot internet networks is superior with an average value of 3. 25 compared to Wifi which is only 2. ____________________ Keyword: Blynkcloud. Internet of Things (IoT) Air Quality. Rule-Based Method. Telegram A 2024 Tim Pengembang Jurnal UNESA Haryanto. IoT-Based Air Quality Monitoring System Using Rule-Based Method in Pertamina Green Village | 52 INTRODUCTION A healthy environment has a major impact on the physical health of living things, including One of the supporting factors for a healthy environment is air quality that meets health Air, as a source of oxygen for humans, must be ensured to be free from hazardous substances such as carbon monoxide, carbon dioxide, fungi, viruses, dust, and other substances that can have serious impacts on health. According to the World Health Organization, buildings, construction materials, vehicle exhaust, combustion processes, or heating can be sources of hazardous substances that have the potential to cause health problems. Increasing human activity has exacerbated this problem, creating major challenges in maintaining optimal air quality. Hazardous particles can come from various sources, including natural events such as volcanic eruptions and forest fires, as well as human activities such as motor vehicles, factories, and power plants. According to WHO, air pollution causes nearly seven million deaths each year worldwide, with nine out of ten people breathing air that is polluted beyond reasonable limits. In developed countries, the death rate from indoor air pollution reaches 67% in rural areas and 23% in offices. Meanwhile, in developing countries, the mortality rate related to indoor air pollution in urban areas is around 9%, and only around 1% in rural areas. The use of nonenvironmentally friendly energy, indoor smoking, use of pesticides, and cleaning chemicals can affect air quality. Prolonged exposure or high concentrations of these hazardous substances can cause various health problems, ranging from respiratory disorders, eye irritation, to lung disease and cancer. Air pollution also plays a role in global climate change through the greenhouse effect and global warming. People can enjoy a healthy environment and support their overall physical health. Research to monitor outdoor air quality has been widely conducted by previous researchers . , as well as research on indoor air quality . Several studies have also been based on IoT technology . Several studies have monitored substances that are harmful to human health, such as CO2 and CO . Many designs have been offered by previous researchers . This is to meet the standards set by the government that have been legalized in a regulation . The IoT systems proposed by previous studies are very diverse . , while the performance analysis mostly uses QoS . The sensors used also depend on the type of substance to be monitored . , one of which uses MQ7 and MQ131. Several studies have also applied Artificial Intelligence to their Decision Support Systems . Meanwhile, to find out the results of monitoring, users can access them in various ways, for example via email . , or website . In addition to monitoring air quality. IoT has been applied in many fields, for example to monitor water levels when flooding occurs . , liquid filling machines . AC control systems . , robotics . , monitoring the use of electrical energy . , traffic . , and others. This is because its use is wireless and can reach long distances. Meanwhile, the use of IoT and Artificial intelligence has been used in air monitoring using a rule-based system . However, the above research is still on a laboratory scale. This research tries to apply it to a village, so that the air quality in this village remains monitored, and the quality of life of the community becomes better. This research used several types of sensors and implements IoT This research was conducted in the Kampung Hijau Pertamina environment. RW 04. Jagir Village. Wonokromo District. Surabaya City, which faces major obstacles due to frequent train DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x 53 | Journal of Intelligent System and Telecommunications. Volume 1 Issue 1. Dec 2024 Hal 51-62 traffic, causing increased air pollution and greenhouse gas effects that increase environmental As a response to poor air resource management, this study provides an innovative solution to monitor air quality in Kampung Hijau Pertamina with the assistance of the Surabaya City Environmental Service. This solution includes monitoring air quality data through an IoT platform, where data collected by sensors can be accessed through an IoT platform, providing a deeper understanding of air quality in the environment. This effort aims to develop an air quality monitoring system as a preventive measure and to create a good environment for human The prototype developed shows limitations in conducting continuous air quality To overcome these obstacles, this study aims to improve functionality by developing a notification system that provides instant information on air quality and is able to record data continuously through the IoT platform. METHODS This study summarizes the structured and systematic steps in designing an Internet of Things (IoT)-based air quality monitoring system in the Pertamina Green Village Environment. This system uses an ESP32 microcontroller and is equipped with various sensors, including the MQ7 sensor for carbon monoxide (CO) gas detection. MQ131 for ozone (O. gas detection. ZH03B dust sensor. DHT22 temperature sensor, and rain sensor for additional environmental This process involves designing software and hardware to create an air quality monitoring The system block diagram describes the system components and their settings as input, process, and output. The input consists of rain sensors. MQ131. MQ7. DHT22, and ZH03B, as well as a DC Fan for air circulation. ESP32 is used as a system controller. Blynkcloud functions as an interface to facilitate communication between hardware and servers, while the Telegram Bot is used as an early warning information notification system for air pollution. Figure 1. System Block Diagram The O3 detection flowchart starts with the MQ131 sensor detecting O3 gas. If the O3 PPM value is O 120 AAg/mA, the data displayed is "Good". If the O3 PPM value is between >120 and O235 AAg/mA, the data displayed is "Moderate", and if >235 and O400 AAg/mA, the data displayed is "Unhealthy". The data read goes to Blynkcloud as an interface and database, as well as to the Telegram Bot for early warning information notifications. DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x Haryanto. IoT-Based Air Quality Monitoring System Using Rule-Based Method in Pertamina Green Village | 54 The CO detection flowchart starts with the MQ7 sensor. If the CO PPM value is O 4000 AAg/mA, the data displayed is "Good". If the CO PPM value is between >4000 and O8000 AAg/mA, the data displayed is "Moderate", and if >8000 and O15000 AAg/mA, the data displayed is "Unhealthy". The data read goes to Blynkcloud and Telegram Bot. The dust detection flowchart starts with the ZH03B sensor detecting PM10 dust. If the dust PPM value is O 50 AAg/mA, the data displayed is "Good". If the dust PPM value is between >50 and O150 AAg/mA, the data displayed is "Moderate", and if >150 and O350 AAg/mA, the data displayed is "Unhealthy". The data read goes to Blynkcloud and Telegram Bot. Mulai Mulai Sensor MQ131 Mendeteksi O3 Sensor MQ7 Mendeteksi CO AAg/m^3 AAg/mA Tidak Tidak >120 AAg/m^3 >4000 AAg/mA Tidak Tidak >235 AAg/m^3 >8000 - Hitung Nilai ISPU Tidak Tampilkan Data Perhitungan Selesai AAg/mA Hitung Nilai ISPU Tidak Selesai Tampilkan Data Perhitungan Mulai Sensor ZH03B Mendeteksi Debu PM10 AAg/mA Tidak >50 AAg/mA Tidak >150 AAg/mA Tidak Selesai Hitung Nilai ISPU Tampilkan Data Perhitungan Figure 2. Flowchart of pollutant sensor system MQ131. MQ7. ZH03B Websites using the Blynkcloud platform offer a simple yet effective user experience with an attractive design. DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x 55 | Journal of Intelligent System and Telecommunications. Volume 1 Issue 1. Dec 2024 Hal 51-62 Figure 3. Website Interface Design The hardware design involves the installation of MQ131. MQ7. ZH03B sensors, rain sensors, and DHT22. DC fans are used for air circulation, ensuring accurate and effective data collection in measuring air quality. Figure 4. Air Quality Monitoring Circuit Design The calculation of ISPU values is done manually based on the parameters taken, such as PM10 and O3, using certain equations. Description: I = Calculated ISPU Ia = Upper limit ISPU Ib = Lower limit ISPU Xa = Upper limit ambient concentration (AAg/m. Xb = Lower limit ambient concentration (AAg/m. Xx = Actual ambient concentration of measurement results (AAg/m. DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x Haryanto. IoT-Based Air Quality Monitoring System Using Rule-Based Method in Pertamina Green Village | 56 The Rule-Based method is used to process data from the MQ7. MQ131, and ZH03B sensors. The processed data produces information on the concentration of CO. O3, dust, and air pollution categories according to the Air Pollution Standard Index (ISPU) regulated by the Regulation of the Minister of Environment. The Rule-Based method has 27 rules according to reference . RESULTS AND DISCUSSION The results of the design of the IoT-Based Air Quality Monitoring System with the RuleBased Method in Kampung Hijau Pertamina are one of the innovations that are beneficial to the community, especially the community in Kampung Hijau Pertamina. This system is equipped with an MQ-131 sensor to detect ozone, an MQ-7 sensor to detect carbon monoxide, and a ZH03B sensor to measure dust particles and PM10 in the air. A DC fan is used as a circulation of gas or air in and out so that gas can enter and then pass through the system and then be released. Data obtained from these sensors are processed using the rule-based method and monitored using the Blynkcloud website, and can take action in the form of notifications from the telegram bot needed to maintain air quality within safe and healthy limits for the residents of Kampung Hijau Pertamina. Figure 5. Overview of hardware design implementation Table 1. Results of the rain sensor testing process Weather Panel Dry Dry Dry Partially Wet Partially Wet Partially Wet Wet Wet Wet Condition sunny weather sunny weather sunny weather Rain Rain Rain Rain Rain Rain Voltage 3,78 V 3,65 V 3,76 V 2,23 V 2,24 V 2,25 V 1,96 V 1,95 V 1,90 V Rain sensors are used as early weather detection in the Kampung Hijau Pertamina The rain sensor works when rainwater hits the 5cm x 4cm sensor panel, then the rainwater will undergo an electrolysis process and conduct electric current. In the test, water DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x 57 | Journal of Intelligent System and Telecommunications. Volume 1 Issue 1. Dec 2024 Hal 51-62 was dripped onto the sensor panel, then measurements were taken on the output voltage before and after the water was dripped. The more water that hits the sensor panel, the smaller the output voltage value that is read. The results of this test indicate that the rain sensor is working well and normally according to its standards. The DHT22 sensor is used to monitor the temperature and humidity in the Kampung Hijau Pertamina environment, which is related to the air quality monitoring device in the The following are the results of the DHT22 sensor test. From the test Table 2, it can be seen that the results of the DHT22 sensor test have an average temperature error value in this test, the lowest is -4. 9%, while the highest is 7. while the highest error value for humidity is 3%, while the lowest value is -11. This sensor works well by getting an average error rate of 0. 1% for temperature, while for humidity it gets an average error value of -0. Table 2. Example of DHT22 Sensor Testing Temperature DHT22 (AC) Reference Temperature (AC) Difference Error (%) Humidity DHT22 (%) Reference Humidity (%) Difference Error (%) Table 3. Example of MQ-7 Sensor Test Results MQ-7 . g/m. Reference . g/m. Difference Error (%) The MQ-7 sensor is used to monitor carbon monoxide (CO) levels in the Kampung Hijau Pertamina environment. This sensor is sensitive to carbon monoxide gas with a measurement range of 20 ppm to 2000 ppm. In testing this sensor, several measurements were carried out using carbon monoxide gas from the surrounding environment and compared with the reference measuring instrument. From the results of the MQ-7 sensor test above, it can be concluded that the MQ7 sensor obtained test results with an average error rate of 0. 90%, with the highest average value in each test being 4. 93%, while the lowest average value in each test Table 4. Example of MQ-131 Sensor Test Results MQ131 (AAg/m. Reference (AAg/m. Difference Error (%) The MQ131 sensor is used to measure the concentration of Ozone (O. in the air. This sensor is capable of measuring the concentration of Ozone with good accuracy. In testing this sensor, several measurements were carried out using air samples from the surrounding environment and compared with a reference measuring instrument. From the results of testing the MQ131 sensor, the results obtained were with an average error rate of 0. 15%, with the highest average test value at 8. 7%, and the lowest value was -5. The ZH03B sensor is used to measure dust particles and PM10 in the air. This sensor is capable of measuring the concentration of dust particles with good accuracy. In testing this sensor, several measurements were carried out using dust particles from the surrounding environment and compared with a reference measuring instrument. DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x Haryanto. IoT-Based Air Quality Monitoring System Using Rule-Based Method in Pertamina Green Village | 58 From the results of testing the ZH03B sensor above, it can be concluded that this sensor is very sensitive, this sensor gets an average error rate of -0. While the minimum average error value is -5. 1% and the maximum error value is 5. Table 5. Example of ZH03B Sensor Testing ZH03B (AAg/m. Acuan (AAg/m. Selisih Tingkat Error (%) Testing is done by adjusting the sensor reading value based on the normal limits listed in the rule-based method. If the sensor value exceeds a certain limit, the Telegram Bot will send a notification to the user regarding the status of air quality and weather warnings in the surrounding environment. If the ISPU value is Good or the weather is not rainy, the Telegram Bot will not send an automatic message. Here are some examples of the Telegram Bot notification system: Figure 6. Testing on Telegram In this test, the notification system will send a message if the ISPU value read by the sensor falls into the Moderate ISPU value category . - . This notification shows the "Moderate" category because the ISPU value obtained falls into that range. An automatic message will be sent with a delay of 6 - 8 seconds from the sensor reading on the LCD to the Telegram This message is sent to residents as an early warning regarding air pollution conditions so that they can maintain their health. In this test, the notification system will send a message if the ISPU value read by the sensor falls into the Unhealthy ISPU value category . - . The notification shows the "Unhealthy" category because the ISPU value obtained falls into that range. An automatic message will be sent with an interval of 6 - 8 seconds. This message is sent to residents as an early warning regarding air pollution conditions so that they can maintain their health. When the environment is rainy, the system will send an automatic message providing a notification that the environment is rainy. This message is received with a delay of about 7 seconds. Notifications are useful as an early warning for residents so that they can prepare umbrellas or coats before it rains if they want to do outdoor activities. Website Software Testing Website testing aims to ensure that the tools used are properly connected to the Blynkcloud web server. This test is carried out by comparing the sensor values from the LCD panel with the values read on the Blynkcloud website. The values read on the LCD show the sensor reading results in ug/m3 units, while the values on the Blynkcloud website are in the form of ISPU values. In test 1, the parameter used was CO . arbon monoxid. with an average measurement concentration of 2420. 14 ug/m3, and after conversion, the calculated ISPU value was 30, indicating the "Good" category. In test 2, the parameter analyzed was the O3 (Ozon. content with an average measurement concentration of 123. 78 ug/m3, and after conversion, the calculated ISPU value was 51, indicating the "Medium" category. In test 3, the parameter analyzed was the PM10 (Particulate Matter 10 Micrometer. level with an average measurement concentration of 170 ug/m3, and after conversion, the calculated ISPU value was 110, indicating the "Unhealthy" category. The delay test from the sensor reading on the LCD to the Blynkcloud Website showed a test value of /- 4 seconds. DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x 59 | Journal of Intelligent System and Telecommunications. Volume 1 Issue 1. Dec 2024 Hal 51-62 Figure 7. Website Testing Results System Integration Testing aims to assess the performance of the Internet of Things-based air quality monitoring system that has been developed with the rule-based method applied in Kampung Hijau Pertamina. This testing includes data collection using several sensors such as the MQ 7 sensor for carbon monoxide detection, the MQ 131 sensor for ozone detection, the ZH03B sensor for PM10 dust detection, the DHT22 sensor for temperature and humidity detection, and the rain sensor for detecting weather conditions in the surrounding environment. This testing also includes data analysis based on ISPU standards and evaluation of system network performance in real environmental conditions. Air quality data is collected every 30 minutes for 3 days with morning sessions . 30Ae8. , afternoon . 00Ae14. , evening . 00Ae18. , and night . 00Ae22. The test result graph on June 9, 2024 shows the concentration of CO. O3, and PM10, where the highest value at 13:00 was CO at 2290. ug/m3. O3 at 35. 22 ug/m3, and PM10 at 43. 00 ug/m3. After conversion, the ISPU value for CO was 25 (Goo. O3 was 9 (Goo. , and PM10 was 34 (Goo. The Quality of Service (QOS) test using a hotspot connection instead of WiFi includes key parameters such as Throughput 11Kbits/s (Very Good. Index . Packet Loss 0% (Very Good. Index . Delay 192. 734 ms (Good. Index . , and Jitter 192. 591245 ms (Poor. Index . Figure 8. Testing the integrated system for 3 days This test uses a hotspot connection instead of WiFi. The test covers key parameters such as Throughput. Packet Loss. Delay, and Jitter. Quality of Service Testing (Day . obtained the values of several indicators Throughput: 11Kbits/s (Very Good. Index . Packet Loss: 0% (Very Good. Index . Delay: 192. 734 ms (Good. Index . , and Jitter: 192. 591245 ms (Poor. Index . While Quality of Service Testing (Day . obtained the value of Throughput: 22Kbits/s (Very Good. Index . Packet Loss: 0% (Very Good. Index . Delay: 84,857 ms (Very Good. Index . , and Jitter: 84,961 ms (Medium. Index . Quality of Service (QOS) of testing day 3 Throughput: 15Kbits/s (Very Good. Index . Packet Loss: 0% (Very Good. Index . Delay: 147,672 ms (Very Good. Index . , and Jitter: 147,771 ms (Poor. Index . DOI: http://dx. org/10. x/jistel. vXiX e- ISSN x-x Haryanto. IoT-Based Air Quality Monitoring System Using Rule-Based Method in Pertamina Green Village | 60 The results obtained show that the system has been well integrated and the IoT system has also been able to work as previously determined. CONCLUSION Based on the research results, the IoT-based air quality monitoring system with the rulebased method in Kampung Hijau Pertamina showed good performance. The rain sensor worked well, indicated by a decrease in voltage value as the water on the panel increased. The DHT22 sensor has an error rate of 0. 1% for temperature and -0. 4% for humidity. The MQ7 sensor has an error rate of 0. MQ131 is 0. 15%, and ZH03B is -0. In the Quality of Service (QoS) test using the local residents' WiFi network, the IoT system performed less than satisfactory with an average index value of 2. Throughput and delay are in the very good category . , but packet loss and jitter are not good . 75 and 2 respectivel. , which can interfere with the monitoring function. This service is adequate for everyday use, but needs improvement to reduce packet loss and jitter. It is recommended to improve the quality of internet services in the area. In contrast. QoS testing using a hotspot network showed an average value of 3. 25 for 3 days, indicating a satisfactory category. However, the increase in jitter needs to be considered because the device is in a panel box made of iron plate, which triggers a less than satisfactory jitter value. The development of a notification system using Telegram and the Blynkcloud platform facilitates the dissemination of real-time information to users, improving the response to poor air quality conditions. The notification system has a delay of 6-8 seconds when sending automatic messages, while the delay on the Blynkcloud website is around 4 seconds, which is calculated manually using a Based on air quality testing in Kampung Hijau Pertamina, air quality is often at good and moderate levels, mainly due to high levels of pollution from traffic jams, construction of culverts, indiscriminate burning of garbage, and ambient temperature. AUTHORSAo NOTE The authors declare that there is no conflict of interest regarding the publication of this The authors confirmed that the paper was free of plagiarism. AUTHORS' CONSTRIBUTOR ROLE Haryanto: Conceptualization. Methodology. Writing Original Draft. Investigation. Formal Analysis. Mochamad Rafli Rahmadani: Investigation. Writing Original Draft. Dian Neipa Purnamasari: Data Curation. Review & Editing. Investigation. Software Review & Editing. Adi Kurniawan Saputro: Investigation. Hanifudin Sukri: Data Curation. Review & Editing. Investigation. Software Review & Editing. Diana Rahmawati: Conceptualization. Methodology. Writing Original Draft. Investigation. Formal Analysis. REFERENCES