Development of a Real-Time Gas Concentration Measurement System Using Internet of Things-Based Monitoring

Transportation and industrial activities have contributed to an increase in the concentration of pollutant gases such as CO, NO 2 , and SO 2 in the air. High concentrations of these gases can adversely affect human health. One approach to addressing this issue is by measuring and monitoring gas concentrations in the air. The advancement of technology, specifically the Internet of Things (IoT), facilitates the monitoring process. Therefore, this research focuses on the development of a gas concentration measurement system, utilizing the MQ-7 sensor for CO, the MiCS-6814 sensor for NO 2 , and the MQ-136 sensor for SO 2 . Additionally, the system is integrated with a website as a platform for monitoring the sensor measurements. The research results indicate that the system has been successfully developed with relative errors of 0.286% for the MQ-7 sensor, 0.325% for the MiCS-6814 sensor, and 0.280% for the MQ-136 sensor. The system underwent testing at three different locations, conducting gas concentration measurements in the environment for 24 hours. The environmental testing revealed measured gas concentration ranges of 2.52-7.67 PPM for CO, 0.00450-0.103 PPM for NO 2 , and 0.0100-0.0652 PPM for SO 2 . The measurement data is accessible and observed in real-time through the website, presented in graphical form, indicating average concentration values of CO, NO 2 , and SO 2 over a 3-hour period. Moreover, the website is equipped with indicator lights that serve as alarms if the environmental gas concentration exceeds predefined thresholds.


INTRODUCTION
Air is a mechanical mixture of various gases present in the Earth's atmosphere.Under normal conditions, the composition of air consists of 78.1% nitrogen gas, 20.93% oxygen gas, and 0.03% carbon dioxide gas, with the remaining percentage comprised of other gases [1].Air is a crucial component of the environment and a fundamental necessity for living organisms, especially humans.This is due to the presence of gases essential for life, particularly oxygen, which plays a primary role in respiration.However, for this process to occur, the air consumed must meet specific cleanliness and health criteria to avoid endangering human health.Therefore, maintaining and protecting air quality becomes imperative.
Among the various pollutants, CO, NO2, and SO2 are identified as primary air pollutants in the external atmosphere [2].CO is a colorless, odorless, and tasteless gas produced by incomplete fuel combustion [3].It is a toxic gas primarily emitted by motor vehicles, contributing approximately 70% to CO emissions [4].Elevated CO levels can adversely affect human health, leading to symptoms such as polycythemia, characterized by a reddish hue in the skin due to increased hemoglobin [5].Exposure to CO can also result in headaches, dizziness, weakness, nausea, vomiting, muscle control loss, decreased pulse rate, decreased respiratory frequency, fainting, and even death [6].NO2 is produced from the oxidation of Nitrogen Oxide gases (NOx) with a reddish-brown color and a sharp, pungent smell [7].The main sources of NOx in the air are the exhaust gases from stationary power generator engines or other engines fueled by natural gas [8].Additionally, motor vehicles contribute significantly to NOx emissions, accounting for 92.5 kg/3785 L [9].The excessive accumulation of NO2 in the air can impact human health, causing lung swelling, respiratory and throat irritation, and chest pain [10].SO2 is a component of Sulfur Oxide gases (SOx) that are soluble in water, colorless, not easily flammable, and possess a sharp smell [7].The primary source of SO2 is the combustion of fuels containing sulfur, such as coal and petroleum.Coal, with varying sulfur content levels, contributes to the quality of the coal.Most industries now use petroleum as fuel, and the ash emitted from combustion contains sulfur [11].Continuous exposure to SO2 can lead to changes in lung function, chronic bronchitis, and even primary lung cancer [12].
Air pollution poses a pressing challenge to achieving sustainable development goals (SDGs), significantly impacting human health [13].It ranks fourth as the most significant factor in human health decline [14].According to State of Global Air (SOGA) data, exposure to air pollutant substances reduces the average life expectancy by around 20 months globally [15].Therefore, there is a need for solutions to anticipate and mitigate the impacts of air pollution.Recognizing the colorless and odorless nature of air pollutants, it becomes challenging for humans to detect their presence, emphasizing the importance of continuous air quality monitoring.The integration of gas sensors and microcontrollers serves as the basis for designing air quality monitoring systems.The advent of the fourth industrial revolution, Industry 4.0, has introduced the Internet of Things (IoT) as a supporting technology for sensorbased electronic devices.IoT technology can provide real-time information and data based on actual conditions, facilitating the monitoring process [16].
The most commonly used type of gas sensor is based on semiconductor materials such as tin oxide (SnO2), zinc oxide (ZnO), tungsten oxide (WO3), and titanium dioxide (TiO2) because they are not only reactive with gases but also cheap and easy to produce [15].These sensors detect gases due to changes in their conductivity when exposed to different gas environments.Operating at high temperatures between 200°C to 400°C, which are maintained by an internal heating element, is essential for activating the necessary chemical reactions on the sensor surface.When gases such as carbon monoxide or hydrogen are present, they adsorb onto the sensor's surface and react with oxygen ions there.For instance, in SnO2 sensors, this reaction reduces the surface oxygen, releasing electrons back into the material and increasing its conductivity.This conductivity change, resulting from the altered electronic properties when surface oxygen is reduced, is measured to determine the presence and concentration of the target gas [17].
Integrating semiconductor gas sensors into IoT platforms enhances air quality monitoring by enabling real-time data transmission, remote access, and advanced visualization techniques.Various data transmission protocols like MQTT, HTTP, or CoAP ensure efficient data transfer to cloud servers [16].Advanced visualization tools such as charts, graphs, heatmaps, and GIS mapping aid in interpreting air quality data trends and correlations.With remote access capabilities, users can monitor air quality parameters from anywhere via web-based dashboards or mobile apps, facilitating timely responses to changing conditions.Leveraging IoT technologies makes air quality monitoring more efficient, scalable, and accessible, leading to improved environmental management and public health outcomes.
Given the aforementioned challenges and issues, this research focuses on developing an IoTbased air quality monitoring system, specifically for CO, NO2, and SO2 parameters.The proposed system utilizes three different gas sensors, specifically MQ-7 for CO, MiCS-6814 for NO2, and MQ-136 for SO2.Each gas sensor is dedicated to detecting one parameter, ensuring specific gas concentration measurements and stable results.Additionally, the system incorporates temperature and humidity measurements, captured by the DHT11 sensor.Realtime monitoring of measurement results is achieved through IoT integration, with data accessible through a dedicated website.This system is envisioned to enhance public access to information regarding gas concentrations in various environments without constraints of time and location.Overall, this research contributes to the ongoing efforts to address air pollution by designing a comprehensive and efficient IoT-based air quality monitoring system.

METHOD
The methodology for developing the gas concentration measurement system with IoT-based monitoring in this research involves the utilization of several tools and supporting materials.These include the MQ-7 sensor, MiCS-6814 sensor, MQ-136 sensor, DHT11 sensor, Arduino UNO, NodeMCU ESP8266, and an I2C-connected 16x2 LCD.The development process aims to create a comprehensive system for monitoring gas concentrations in real-time, facilitated by a connected website.Sensor Selection MQ-7, MiCS-6814, MQ-136, and DHT11 Sensors: These sensors are chosen based on their specific capabilities.The MQ-7 sensor is dedicated to measuring carbon monoxide (CO), the MiCS-6814 sensor for nitrogen dioxide (NO2), the MQ-136 sensor for sulfur dioxide (SO2), and the DHT11 sensor for capturing temperature and humidity data.

Microcontroller and Development Board
Arduino UNO: The Arduino UNO serves as the primary microcontroller, responsible for interfacing with and processing data from the gas sensors and DHT11 sensor.NodeMCU ESP8266: This development board facilitates the integration of the IoT aspect, enabling communication between the monitoring system and the connected website.

Display Component
LCD 16x2 I2C: The LCD display is used for visualizing data locally, providing real-time feedback on gas concentrations and environmental conditions.

Website Development
IoT-Based Monitoring Website: A website is developed to serve as the user interface for accessing real-time gas concentration data.The website is designed to establish a connection with the monitoring system and display the measurement results efficiently.

Integration and Communication
Arduino-Website Integration: The Arduino UNO and NodeMCU ESP8266 are integrated to enable seamless communication between the gas sensors, DHT11 sensor, and the website.The communication protocol ensures that data is transmitted in real-time to the website for display.

Circuit Design
The circuit integration of instrument in this work is show in FIGURE 1.

Calibration System
The gas sensors are calibrated to ensure accuracy and reliability in measuring gas concentrations.Calibration may involve adjusting sensor parameters and compensating for environmental factors.We conduct the calibration using the standard instrument in Meteorology, Climatology, and Geophysics Agency (BMKG), Cibeureum, West Java.

Real-Time Monitoring Implementation:
Continuous Data Streaming: The system is configured to continuously stream data from the gas sensors and DHT11 sensor to the website.This real-time data streaming enables users to monitor gas concentrations and environmental conditions instantaneously.

RESULT AND DISCUSSION
Calibrating gas sensors is crucial for ensuring accurate and reliable measurements.For the MQ-7 sensor, calibration is performed using a standard instrument, the CO Analyzer CO-30r Los Gatoss, which provides precise readings of carbon monoxide (CO) concentrations.The calibration process involves adjusting the MQ-7 sensor based on the known values obtained from the CO Analyzer, enhancing its accuracy in detecting CO levels.Similarly, the MiCS-6814 sensor is calibrated using a NOx Analyzer Model 42i-TL.This analyzer serves as a reference for nitrogen dioxide (NO2) concentrations.The calibration aligns the MiCS-6814 sensor readings with the values obtained from the NOx Analyzer, ensuring reliable detection of NO2 levels in various environments.For the MQ-136 sensor, calibration is conducted using an SO2 Analyzer Model 43i-TLE Thermo.This analyzer provides accurate sulfur dioxide (SO2) concentration readings.The MQ-136 sensor is adjusted based on the known values from the SO2 Analyzer, optimizing its performance in measuring SO2 concentrations effectively.The result of calibration for each sensor is shown in FIGURE 2.
The characterization process involves testing three gas sensors using smoke samples from motor vehicles.The sensors-measuring carbon monoxide (CO), nitrogen dioxide (NO2), and sulfur dioxide (SO2)-are configured with an Arduino UNO and placed in a chamber connected to the vehicle's exhaust.After starting the engine and allowing it to idle for optimal temperature, the sensors measure gas concentrations over intervals of 1 to 10 minutes, with a 1-minute increase.The process is repeated three times for validation.This method ensures the accurate assessment of sensor performance in detecting CO, NO2, and SO2 in motor vehicle emissions.The setup experiment for gas sensor implementation on vehicle's exhaust measurement is shown in FIGURE 3. The result of vehicle's exhaust measurement show that, the longer the duration of gas storage in the chamber, the higher the accumulated concentrations of CO, NO2, and SO2 gases.CO is formed due to incomplete fuel combustion, particularly when insufficient oxygen is available.The MQ-7 sensor effectively operates within the range of 5.42-5.76PPM for CO.Similarly, the concentration of NO2 increases with prolonged gas storage, as it forms during hightemperature combustion, leading to the oxidation of NOx [17].The MiCS-6814 sensor performs well in the range of 0.0924-0.0927PPM for NO2 when exposed to motor vehicle exhaust.Furthermore, the concentration of SO2 also rises with extended gas storage, as sulfur in the fuel reacts with oxygen during combustion.The MQ-136 sensor functions effectively within the range of 0.0638-0.0643PPM for SO2 when exposed to motor vehicle exhaust.In conclusion, the gas concentrations measured by the sensors exhibit a direct relationship with the duration of motor vehicle exhaust storage.This is because longer storage time implies prolonged combustion, resulting in increased concentrations of CO, NO2, and SO2 gases.The changing gas concentrations over time indicate the sensors' ability to detect gases effectively as shown in FIGURE 4.
We also develop website for real-time monitoring of gas sensor measurement in the following link https://monkurasmart.weebly.com/.The website serves as a user-friendly platform for observing and analyzing the levels of carbon monoxide (CO), nitrogen dioxide (NO2), and sulfur dioxide (SO2) in the environment.Through the website, users can navigate and observe the variations in gas concentrations over time.Additionally, the platform includes a feature displaying the average values of CO, NO2, and SO2 concentrations during a 3-hour monitoring period.Furthermore, the website incorporates an indicator light system, functioning as an alarm if the gas concentrations in the environment surpass predefined thresholds.In essence, the development of this website enhances accessibility to the gas sensor data, providing a convenient and efficient means for users to monitor air quality in real-time and make informed decisions based on the presented information.
For real-time gas monitoring, we conducted measurement in the environment around spesific area.The testing took place in Ujungharapan Street Location, Bekasi Regency, West Java, during different time intervals throughout the day.The chosen measurement times, spanning from early morning to late afternoon, were 05:00-05:15, 08:00-08:15, 11:00-11:15, 14:00-14:15, and 17:00-17:15.This diversified approach allows for a comprehensive understanding of gas concentrations in the specified location across various hours, capturing potential fluctuations and patterns in air quality throughout the day.The graphs in FIGURE 5  attributed to atmospheric conditions, particularly superadiabatic conditions causing vertical air movement and turbulence [18].The results indicate the sensor's effectiveness in detecting gas concentrations, with the highest concentrations observed in the evening, possibly due to increased vehicular activity during that period [4].This aligns with previous studies indicating a strong and significant correlation between gas concentrations and vehicular traffic.The objective of conducting measurements in multiple locations was to capture the diverse environmental factors that could influence air quality.Real-time, continuous monitoring at these locations provided dynamic data on the concentration of pollutants, specifically CO, NO2, and SO2, allowing for a comprehensive assessment of air quality variations.The continuous nature of the measurements enabled the identification of patterns and fluctuations in gas concentrations, offering valuable insights into the impact of vehicular activity on air quality.The result of realtime monitoring is shown in FIGURE 6.
The results obtained from the measurements indicate that the instruments effectively captured the dynamic changes in gas concentrations over time.The sensors, including MQ-7 for CO, MiCS-6814 for NO2, and MQ-136 for SO2, exhibited a responsive and proportional behavior to fluctuations in gas concentrations.The real-time, continuous monitoring allowed for the observation of how the concentrations of these gases evolved throughout the testing period.
For instance, the data from the CO sensor (MQ-7) demonstrated a clear correlation between the sensor's response and the changing levels of carbon monoxide in the air.As expected, higher concentrations of CO were registered during peak traffic hours or in areas with increased vehicular activity, while lower concentrations were observed during periods of

CONCLUSION
In conclusion, the development and implementation of the IoT-based air quality monitoring system, utilizing sensors such as MQ-7 for CO, MiCS-6814 for NO2, and MQ-136 for SO2, have proven to be effective in capturing real-time variations in gas concentrations.The threehour testing period conducted at different locations, namely Jalan Raya Mangunjaya, Jalan Raya Raflesia, and Jalan HM Joyo Martono, provided valuable insights into the dynamic nature of air pollution in these environments.The instruments exhibited responsive behavior, accurately reflecting changes in carbon monoxide, nitrogen dioxide, and sulfur dioxide levels.
The detailed location analysis revealed disparities in vehicular activity, with Jalan HM Joyo Martono experiencing higher traffic volume compared to the other two locations.The continuous, real-time measurement and monitoring capabilities of the system contribute SPEKTRA: Jurnal Fisika dan Aplikasinya Volume 9 Issue 1, April 2024 significantly to our understanding of air quality dynamics, enabling informed decision-making for environmental management.As air pollution remains a global concern, the proposed IoTbased system offers a promising solution for enhancing public access to timely and accurate information, ultimately supporting efforts to mitigate the impact of air pollution on human health and the environment.

FIGURE 1 .
FIGURE 1. Circuit of Gas Sensor
illustrate the increasing concentrations of CO, NO2, and SO2 gases over time in the Ujungharapan Street Location, Bekasi Regency, West Java.The lowest concentrations for CO, NO2, and SO2 were observed during the 05:00-05:15 testing period, while the highest concentrations occurred during the 17:00-17:15 testing period.The relationship between light intensity, temperature, and humidity with gas concentrations exhibited varying patterns.The CO concentrations demonstrated a direct correlation with light intensity and temperature during certain test conditions, while inversely correlating during others.The NO2 and SO2 concentrations exhibited similar relationships with light intensity, temperature, and humidity as observed in the CO testing.Fluctuations in these environmental factors influencing gas concentrations are SPEKTRA: Jurnal Fisika dan Aplikasinya Volume 9 Issue 1, April 2024

SPEKTRA: Jurnal Fisika dan Aplikasinya Volume 9
Issue 1, April 2024 reduced traffic or in locations with fewer emissions.Similarly, the NO2 sensor (MiCS-6814) and the SO2 sensor (MQ-136) displayed coherent responses to variations in nitrogen dioxide and sulfur dioxide concentrations, respectively.The sensors' ability to detect and quantify these gases in real-time provided valuable insights into the environmental dynamics and sources of pollution.

FIGURE 6 .
FIGURE 6. Realtime monitoring gas concentration measurement in 3 different location over certain period of hours.