Original Research
Frontiers in Sustainability ·
Volume 7 - 2026 | https://doi.org/10.3389/frsus.2026.1939212
Development and experimental evaluation of an IoT-based closed-loop system for PM2.5 monitoring and automated electrical ionization actuation
- Natima Udon1
- Sittichai Choosumrong1*corresponding author
- Kampanart Piyathamrongchai1
- Department of Natural Resources and Environment, Faculty of Agriculture, Nature Resources and Environment, Naresuan University, Phitsanulok, Thailand
Abstract
Fine particulate matter (PM2.5) remains a major environmental health concern in Thailand and motivates the development of monitoring systems that can support localized, automated responses. This research presents and experimentally evaluates Cleara-Air, an integrated Internet of Things (IoT) and Web-GIS closed-loop system for real-time particulate-matter monitoring and threshold-based electrical ionization actuation. The system integrates an ESP32 microcontroller, a Sensirion SPS30 particulate sensor, a 4-channel 5V relay, a 220V AC ventilation fan, and a carbon-brush negative-anion generator, with PostgreSQL-based data storage and a responsive Web Map Application. The controller continuously acquires particulate measurements and uses 37.5 μg/m 3 as an operational PM2.5 set-point when the measured concentration exceeds this value, the relay activates the fan and ionization module, and the actuators are deactivated when the concentration subsequently falls below the set-point. The integrated workflow was evaluated through 15 repeated closed-room functional trials in which particulate concentrations were intentionally elevated near the SPS30 sensor. The evaluation examined threshold detection, actuator activation and deactivation, 15-s data transmission, database logging, and Web-GIS status visualization. The repeated tests demonstrated that the programmed sensing-processing-communication-actuation sequence operated as intended under the tested conditions, providing original experimental evidence of the functional performance of the integrated closed-loop architecture. The study evaluates system functionality rather than PM2.5 removal efficacy quantitative treatment-vs.-control experiments, reference-grade sensor calibration, and direct ozone measurements remain necessary before claims regarding mitigation effectiveness or operational safety can be made. The results establish Cleara-Air as an experimentally evaluated prototype framework for integrating real-time environmental sensing, automated control, and geospatial information delivery.
Keywords
1. Introduction
Air pollution, or the condition in which airborne contaminants are present in the atmosphere around humans, has become a significant problem that severely affects the health of populations worldwide, including Thailand, which is facing this problem with increasing severity each year. The World Health Organization reports that air pollution is responsible for the deaths of up to 8.1 million people globally each year (UNICEF, 2024), representing an environmental disaster that poses challenges for many countries. One of the most severe pollutants is fine particulate matter PM2.5 (Particulate Matter with a diameter less than 2.5 microns) (Colmer et al., 2020), which is so small that it is invisible to the naked eye. This allows it to penetrate deep into the respiratory system, reaching the lungs and easily entering the bloodstream, causing serious diseases such as respiratory diseases, cardiovascular diseases, and lung cancer. Although PM2.5 does not cause immediate fatal harm, long-term exposure and accumulation in the body can lead to severe health impacts. The main reasons why Thailand faces the PM2.5 dust problem are due to several combined factors, including fuel combustion from vehicles and the industrial sector, biomass burning in agriculture (Astanti et al., 2026), such as rice straw and agricultural residue burning, forest burning to prepare agricultural land, particularly in northern regions; as well as household energy use, such as burning fossil fuels or wood. In addition, meteorological factors during the winter season are a significant accelerator, especially in northern areas (Waheed et al., 2025) such as Chiang Mai, Lamphun, and Phitsanulok, where calm winds and high atmospheric pressure cause dust to accumulate in the lower atmosphere for extended periods, coupled with temperature inversion phenomena, where cold air lies underneath and warm air sits above, preventing dust from rising into the upper atmosphere. The accumulation of particulate matter therefore significantly increases during this period (Ponsawansong et al., 2023). The impacts of PM2.5 dust are not limited to health alone but also affect the environment. For example, the reduction of visibility and the occurrence of haze, as well as economic impacts, including increased healthcare costs, decreased labor productivity, and effects on the tourism industry (Pisutsan et al., 2025). The air quality index in Thailand is divided into 5 levels, ranging from a minimum value of 0 up to 201 and above. Each level uses colors as symbols to indicate the severity of health impacts on the public. An air quality index value of 100 corresponds to the standard air quality in the general atmosphere. If the air quality index exceeds 100, it means that the concentration of air pollutants surpasses the standard, and the air quality on that day begins to affect the health of the public. Given the severity of the particulate matter situation, all sectors need to urgently accelerate innovation and find immediate coping strategies. Currently, the integration of urban sensing, urban computing, and environmental engineering provides a crucial framework for addressing air pollution. In the realm of urban informatics, utilizing Geographic Information Systems (GIS) to analyze spatial environmental factors enables accurate assessment of particulate matter dispersion. Furthermore, presenting this urban data through interactive Web-GIS dashboards allows the public to monitor air quality in their areas, effectively raising awareness. Concurrently, low-cost air quality sensors connected via the Internet of Things (IoT) enhance the system by enabling real-time PM2.5 monitoring and automated control of mitigation devices. The integration of these technologies is not merely the creation of a monitoring tool, but the development of a proactive practical urban application that provides decision-ready information to policymakers, forming a crucial foundation for smart and sustainable cities. While the health impacts of PM2.5 are extensively documented (e.g., Huang et al., 2025), addressing this issue requires moving beyond passive observation. Several IoT-based platforms have been developed for urban air quality monitoring. For instance, Warlina et al. (2026) developed a portable IoT device for real-time particulate monitoring, while Otanasap et al. (2025) and Mohapatra et al. (2026) proposed AIoT and machine-learning frameworks focusing primarily on PM2.5 prediction. Additionally, Montalvo et al. (2022) demonstrated the integration of low-cost sensors for city-scale monitoring. However, these existing platforms predominantly focus on passive data collection, visualization, or forecasting. The primary novelty of the Cleara-Air system lies in its closed-loop, threshold-based automated actuation architecture. Unlike prior standalone monitors, Cleara-Air seamlessly integrates real-time geospatial data management (PostgreSQL and Web-GIS) with an active edge-computing mitigation response-automatically triggering a mitigation device when PM2.5 exceeds 37.5 μg/m 3. This end-to-end, open-source design provides a transferable framework that transitions urban informatics from mere situational awareness to localized, automated environmental mitigation. To transition from passive monitoring to active mitigation, this research incorporates electrical ionization technology centered on a negative ion generator. When negative ions are released into the air, they attach to airborne particulate matter (PM2.5), modifying the particles' surface charge. This electrostatic interaction increases the probability of particle collision and agglomeration, causing fine dust particles to clump together into larger, heavier aggregates that rapidly settle out of the breathing zone. The system utilizes a carbon-brush negative anion generator to reduce the potential for ozone formation during the mitigation process. Therefore, this research aims to integrate geospatial technology and IoT engineering to develop an architectural prototype named Cleara-Air. The system operates as a closed-loop automated controller that consists of a Sensirion SPS30 sensor, an ESP32 microcontroller, a 4-channel 5V relay, a 220V AC ventilation fan, and the aforementioned carbon-brush negative-anion generator. The prototype continuously acquires PM2.5 measurements. When the concentration exceeds the Thai 24hour standard threshold of 37.5 μg/m 3 because it is a standard number that Thais are familiar with and use as a health warning, but in our system, we use this value merely as an “Operational set-point” for the quick resolution of dust issues and to demonstrate the system's functionality. National Environment Board (2026), the microcontroller automatically triggers the relay to activate the fan and the negative anion generator. Once PM2.5 levels fall below the threshold, the actuation ceases to save energy. All operational data and spatial statuses are transmitted to a PostgreSQL database and visualized on a Web-GIS application in real-time (Arroju et al., 2025; Feng et al., 2016; Santoso et al., 2025). From an urban informatics perspective, the proposed Cleara-Air framework can be positioned across five interconnected dimensions: urban sensing, urban data, urban computing, urban science, and urban applications and systems. The IoT-based Sensirion SPS30 provides the urban sensing layer by continuously acquiring particulate-matter observations, while time-stamped and georeferenced measurements stored in PostgreSQL constitute the urban data layer. The ESP32 edge controller, wireless communication, server-side processing, database management, and threshold-based automated control form the urban computing layer, where observations are transformed into operational information and system responses. GIS and Web-GIS provide the spatial-information component by organizing, contextualizing, and visualizing environmental observations geographically, thereby connecting computer-based data processing with GIScience concepts of spatial representation and analysis. At the application and systems level, these components are integrated into an operational environmental monitoring and automated-actuation platform. In this sense, the present study primarily represents a system-level contribution to urban environmental informatics, demonstrating the integration of sensing, data, computing, GIScience, and application infrastructure. The architecture also provides a foundation for subsequent urban-science investigations; however, analyses of intra-urban spatial variability, relationships with land use and urban morphology, population exposure, environmental inequality, and spatially targeted planning interventions would require deployment of a distributed and calibrated multi-sensor network with appropriate quality-control and spatial metadata (Srisang et al., 2024; Khan et al., 2010; Ramadan et al., 2025; Phasinam et al., 2025; Wang, 2024).
This study aims to (1) design and implement an open-source IoT and Web-GIS architecture for real-time PM2.5 monitoring (2) develop a threshold-based closed-loop controller that links particulate measurements to automated actuation and remote status reporting; and (3) experimentally evaluate the functional performance of the integrated sensing-processing-communication-actuation workflow through repeated controlled operational trials. The research therefore evaluates a defined system behavior under repeatable test conditions rather than presenting software or source code as the sole contribution. The primary research question is whether the integrated Cleara-Air architecture can consistently detect threshold crossings, execute the programmed actuator response, transmit time-stamped measurements and device status, and make the resulting information available through the Web-GIS platform. Quantitative PM2.5 removal efficiency, reference-grade sensor calibration, and ozone characterization are outside the scope of the present experiment and are identified as subsequent validation phases.
2. Materials and methods
The research employed a design-implementation-experimental evaluation framework. The workflow comprised problem definition and study-area characterization, hardware and firmware design, database and Web-GIS development, end-to-end system integration, and repeated controlled functional testing. The experimental evaluation focused on the complete closed-loop pathway from particulate sensing and threshold detection to relay actuation, wireless data transmission, server-side storage, and Web-GIS status visualization. The system boundary therefore included sensing, edge processing, wireless communication, database storage, geospatial visualization, threshold-based actuation, and power supply.
Study area
Phitsanulok Province in lower northern Thailand was selected as the target environment for the system design because it experiences recurrent seasonal particulate pollution and represents a medium-sized regional city in a data-constrained Global South context. A specific coordinate in Phitsanulok (16.8407, 100.4567) was designated as the intended reference point for future deployment. The area is characterized by high mountains, hills, elevated land, and low plains, with high mountains scattered in patches along the northeastern, eastern, and southeastern edges of the province, sloping down toward the west. The local climate, which features an average relative humidity of about 74% throughout the year, was factored into the environmental operating constraints of the prototype. The developed system integrates a Cleara-Air (model Sensirion SPS30) sensor. For the upcoming physical deployment phase, the finalized prototype is planned to be co-located with a commercial off-the-shelf (COTS) reference instrument at the target field site to facilitate comparative measurements and calibration of PM2.5 concentrations.
Figure 1 shows a high density of detected burning hotspots across several areas of Phitsanulok Province during the study period. The hotspot map is presented as contextual spatial information and is not used in this study to infer a causal relationship between burning activity and measured PM2.5 concentrations. Temporal variation in PM2.5 and meteorological variables during January-June 2026 is presented separately in Figure 2.
Figure 2 shows weekly environmental conditions for January - June 2026. Data were acquired from the Open-Meteo API as API-derived model estimates. The plotted variables include wind speed (m/s), wind direction (degrees), relative humidity (%), temperature (°C), rainfall (mm), and atmospheric pressure (hPa).
Conceptual framework/architecture
The Cleara-Air research workflow was structured to connect system design with experimental evaluation. The process included problem definition, study-area characterization, review of relevant PM2.5, ionization, IoT, and GIS concepts, hardware and software architecture design, prototype implementation, database and Web-GIS development, end-to-end integration, and controlled functional testing. Figure 3 summarizes these research stages.
Figure 3 illustrates the research workflow used to develop and evaluate the Cleara-Air prototype. The workflow begins with identification of the environmental monitoring problem and study context, followed by review of the scientific and technical principles relevant to PM2.5 sensing, negative-ion actuation, IoT architecture, and geospatial information systems. These inputs informed the integrated hardware and software design. The implemented prototype uses an ESP32 as the edge controller, an SPS30 particulate-matter sensor for measurement, a relay module for actuator switching, a ventilation fan and negative-anion generator for the predefined actuation sequence, PostgreSQL for time-stamped data storage, and a responsive Web-GIS application for monitoring and remote status visualization. The final stage consists of repeated controlled functional tests used to evaluate whether the integrated sensing, control, communication, and visualization workflow performs according to the predefined operational logic.
Figure 4 shows the prototype's airflow and closed-loop control concept. Ambient air is continuously monitored, with PM2.5 concentrations measured by the Sensirion SPS30 sensor. The ESP32 microcontroller evaluates these readings against the predefined threshold rule. When the PM2.5 level exceeds the Thai 24-h standard of 37.5 μg/m −3, the microcontroller triggers the 4-channel relay to synchronously activate both the 220V AC cooling fan and the ozone-free negative anion generator. During this actuation phase, the generator emits a high density of negative ions into the airflow.
These ions electrostatically attach to suspended fine particulate matter (PM2.5), modifying their surface charge. This interaction promotes electrostatic agglomeration, causing the fine particles to clump together into larger, heavier aggregates that rapidly settle out of the breathing zone. The AC fan facilitates the rapid distribution of these ions into the surrounding environment.
Figure 5 shows the operational workflow of the proposed Cleara-Air system, which consists of three primary modules (1) real-time PM2.5 data acquisition using the SPS30 sensor integrated with an ESP32 microcontroller (2) data storage in a PostgreSQL database and visualization through a Web Map Application for continuous air quality monitoring and (3) automatic activation of the negative anion generator and cooling fan whenever the measured PM2.5 concentration exceeds the predefined threshold of 37.5 μg/m 3.
Research tools
To develop the proposed Cleara-Air prototype for real-time PM2.5 monitoring, control, and mitigation, this study integrates hardware components, air quality sensors, wireless communication, database management, and Web-based Geographic Information System (Web-GIS) technologies into a unified platform in Table 1. The research tools and software used in system development are described below.
Software components
To successfully develop and deploy the Cleara-Air prototype system, a comprehensive suite of software tools was utilized. These tools encompass micro-controller firmware programming environments, advanced code editors, robust relational database management systems, and open-source geospatial mapping platforms. Each software component plays a vital role in ensuring seamless hardware communication, efficient backend data management, and interactive spatial visualization. The specific software tools and their functions are detailed as follows.
Arduino IDE 2.3.10 program is an integrated development environment used for coding, controlling, and compiling program files so that they can be uploaded to an Arduino board. Researchers can choose to use either the Online IDE or the Desktop IDE, depending on appropriateness and convenience in development (Udon, 2026; Udon et al., 2024).
VSCode is a code editor program developed by Microsoft, which is used for writing, editing, and debugging code. This program features a lightweight design and high performance (Ghassabpour et al., 2025).
PgAdmin4 version 9.12 / PostgreSQL18.1 program is an open-source database management software for PostgreSQL that is user-friendly. It serves to assist in managing and developing databases. This program is an advanced development from pgAdmin4, offering a variety of functions, supporting most features of PostgreSQL version 9.2 and above, and can be used on multiple operating systems such as Linux, Unix, Mac OS X, and Windows.
QGIS3.40.6 / Leaflet1.9.4 Geographic Information System (GIS) programs are open-source software that can be used for free, allowing users to create, manage, analyse, and visualize spatial data. They feature an easy-to-use graphical user interface (GUI) and support various types of data.
Hardware components
The physical architecture of the Cleara-Air prototype system integrates reliable IoT components and environmental sensors to achieve real-time particulate matter monitoring and automated mitigation. The hardware selection prioritizes open-source compatibility, low power consumption, and high operational precision. The specific hardware components and their designated functions within the system are detailed as follows.
ESP32 NodeMCU board uses a CP2102 USB-to-UART bridge chip from Silicon Labs. It can automatically enter program upload mode and features a NodeMCU-style circuit design with 4MB (or 32Mbit) of ROM. (Espressif Systems, 2024).
Particulate Matter Sensor – SPS30, High-quality particulate matter (PM) sensor, using Laser Scattering technology to accurately measure the size and quantity of dust, such as PM1.0, PM2.5, PM4.0, and PM10. Commonly used in IoT applications, smart homes, and air purifiers. Features an Auto Cleaning system to reduce dust accumulation and has a long-term stable lifespan (Sensirion, 2019).
Negative Anion Generator, the principle of operation is that the device uses high voltage at the discharge tip to create negative ions in the surrounding air and then releases these ions into the atmosphere. Can generate more than 100 million negative ions per cubic centimeter, which is considered a high ion concentration.
4 Channel 5V relay, because each individual relay may be set to be either high or low triggered, this module is a 4-channel universal 5V relay. Relays are ideal for controllers because they are rated for 250VAC, 10A, and breakout to screw terminals.
Fan Model, the prototype employs a SUNON DP200A axial cooling fan (120 × 120 × 38 mm), operating at 220–240 VAC and 50/60 Hz. The fan provides an airflow of approximately 95–117 CFM, depending on the model variant, with a rated power consumption of 21–22 W.
OLED Display, a screen technology where each individual pixel makes its own light, providing high contrast and deep blacks without a backlight.
Software and tools used for system development include PostgreSQL 18.1, Arduino IDE2.3.10, pgAdmin4 9.12, QGIS 3.40.6, Leaflet 1.9.4, PHP version 8.4, ESP32 WROOM-32 module/WiFi+Bluetooth+dual core CPU/compatible with ESP-32S. The Web-GIS application targets modern web browsers including Google Chrome, Safari, and Firefox.
Figure 6 shows the overall architecture of the Cleara-Air system for real-time PM2.5 monitoring, automated actuation, data storage, and Web-GIS visualization. The system consists of three main components (1) Data Collection, PM1.0, PM2.5, PM4.0, and PM10 are acquired from the SPS30 sensor meteorological and API-derived air-quality information is obtained through the Open-Meteo API and spatial information is provided by GIS. (2) Processing, collected data are transmitted via the Internet to the server, stored in PostgreSQL, and processed using HTML, PHP, Python, JavaScript, C++, and Leaflet. The Cleara-Air hardware includes a power supply, ESP32 microcontroller, SPS30 sensor, OLED display, 4-channel relay, SUNON DP200A fan, and carbon-brush negative-anion generator. (3) Web Application, Processed information is presented through a responsive Web Map Application featuring a dashboard, real-time GIS, and remote-control functions. Comparable IoT-based environmental monitoring and control architectures have demonstrated the value of integrating sensors, communication protocols, databases, and user-facing control interfaces within a unified system (Choosumrong et al., 2023, 2025; Phasinam et al., 2025).
Negative-ion actuation mechanism and integration into the Cleara-Air prototype
The Cleara-Air prototype uses electrical ionization as an automated actuation mechanism linked to real-time PM2.5 measurements. The present study evaluates the sensing, control, database, and Web-GIS workflow it does not assume that the ionization module has established PM2.5 removal efficacy or operational safety.
Negative-ion interaction with airborne particles
Negative ions are electrically charged species that can attach to suspended particles and alter their surface charge. Electrostatic interactions may increase the probability of particle-particle collision and agglomeration, but the magnitude of this effect depends on ion concentration, airflow, particle properties, humidity, chamber geometry, and residence time. In this study, this mechanism is used only as the conceptual basis for automated ionization actuation, quantitative particle decay and removal efficiency require controlled treatment-vs.-control experiments.
Safety and validation considerations
No physiological or health benefits of negative ions are evaluated or claimed in this study. Traditional corona-discharge ionizers may generate ozone and other gas-phase byproducts therefore, ozone must be treated as a potential safety concern rather than as a beneficial treatment agent. The current prototype uses a carbon-brush negative-anion generator instead of the original ozone-generating module to reduce the potential for ozone formation. However, direct ozone concentrations were not measured in this study, and future validation should include ozone monitoring at the device outlet and in the surrounding occupied zone, together with operating-duration limits, safety interlocks, and emergency shutdown criteria (Pantelic et al., 2022; Vaze et al., 2025). The need to consider ozone alongside particulate-control strategies is also reflected in recent PM2.5–ozone literature (Kong et al., 2024; Liu et al., 2025).
Integration into the Cleara-Air prototype
The Cleara-Air prototype integrates the SPS30 particulate-matter sensor, ESP32 controller, relay module, carbon-brush negative-anion generator, and dispersion fan in a closed-loop monitoring and actuation workflow. The SPS30 continuously measures PM2.5, and the ESP32 evaluates the measurement against the 37.5 μg/m 3 threshold. When the threshold is exceeded, the relay activates the negative-anion generator and fan; when the measured concentration falls below the threshold, the actuators are switched off. Sensor measurements and device status are transmitted to PostgreSQL and visualized through the Web-GIS platform. This functional behavior demonstrates automated actuation and data integration, not validated PM2.5 removal efficacy (Nzeyimana et al., 2026).
Web-based monitoring and GIS platform
The Web-Based Monitoring Platform was developed to support real-time air quality monitoring, data management, and remote operation of the proposed Cleara-Air prototype through an Internet-based environment. The platform serves as the central monitoring system by receiving PM2.5 measurements from the ESP32 microcontroller connected to the SPS30 particulate matter sensor. The acquired data are transmitted via a Wi-Fi network to a server, where they are stored in a PostgreSQL database before being processed and presented through a web application. The platform was developed using PHP for server-side processing and database communication with PostgreSQL, while the user interface was implemented using HTML5, CSS3, and JavaScript. Geospatial visualization was implemented using the Leaflet.js library, enabling the development of an interactive Web-GIS interface that displays sensor locations, real-time PM2.5 concentrations, and meteorological information. In addition to real-time monitoring, the platform supports historical data visualization, device status monitoring, remote control of the negative ion generator and cooling fan to assist environmental monitoring and decision-making. The web-based architecture allows users to access the monitoring system through a standard web browser on computers, tablets, or smartphones without requiring additional software installation.
Figure 7 shows the Cleara-Air mobile Web-GIS interface for real-time environmental monitoring and device control. The left screen displays API-derived PM2.5 data from Open-Meteo (11.1 μg/m 3, AQI 35, classified as “Very Good”), ambient temperature (27.1 °C), and relative humidity (91%). The right screen displays sensor readings (PM1.0, PM2.5, and PM10), device connection status, remote controls for the monitoring device and negative-anion generator, and an ionizer operational-status panel. The interface should not be interpreted as reporting validated ionizer removal efficiency.
Database structure
The proposed monitoring platform employs a PostgreSQL relational database to manage environmental observations, device information, weather conditions, and operational status. The database was designed using a relational schema to maintain data consistency and support efficient retrieval of real-time and historical information. Each monitoring device is uniquely identified and linked to PM2.5 measurements through a foreign key relationship. Environmental measurements, including PM1.0, PM2.5, PM4.0, PM10, temperature, humidity, and timestamps, are continuously stored as time-series records. Additional tables record weather information, device operating status, enabling integrated analysis and visualization through the Web-GIS platform. The selection of PostgreSQL as a relational backend is also consistent with general database-selection and management principles for applications requiring structured data relationships and reliable retrieval (Matcha and Reeta, 2025).
Figure 8 shows the Entity Relationship Diagram (ERD) of the Cleara-Air prototype database, consisting of four main tables, Devices, Sensor_Logs, Command_Logs, and Users. Devices stores device information and installation coordinates, Sensor_Logs records PM2.5 measurements and ionizer status, Command_Logs stores device-control commands and Users stores account information. Devices has one-to-many relationships with Sensor_Logs and Command_Logs, while Users has a one-to-many relationship with Command_Logs (Rosa-Bilbao et al., 2025; Wongmetta et al., 2018).
Hardware architecture and operational logic
The prototype development of the Cleara-Air system was designed under the Internet of Things (IoT) architecture and the design achieves initial hardware functionality and end-to-end data transmission capabilities. The prototype's structure is divided into four main parts as follows.
Circuit design and electrical isolation
The prototype separates the low-voltage control circuit from the 220V AC actuator circuit through a relay-based switching interface. On the low-voltage side, the ESP32 microcontroller is connected to the Sensirion SPS30 through the I2C protocol (SDA pin 21 and SCL pin 22) and to a 128 x 64 OLED display. On the high-voltage side, a 4-channel 5V relay receives digital control signals from GPIO 25 (CH1) and GPIO 27 (CH2) to switch power to the carbon-brush negative-anion generator and dispersion fan. The Neutral (N) conductor is connected to the AC devices through the terminal block, while the Line (L) conductor is routed through the relay normally-open (NO) contacts, as shown in Figure 9. This description documents the prototype wiring used in the experiment and should not be interpreted as certification of electrical safety. Formal electrical protection and compliance assessment are required before operational deployment.
Closed-loop control mechanism
The system is programmed to operate automatically based on real-time PM2.5 measurements. When the measured concentration exceeds 37.5 μg/m 3, the ESP32 sends a HIGH logic signal to GPIO 25 and GPIO 27, activating the relay channels for the fan and negative-anion generator. The actuators are switched on to initiate the predefined ionization treatment process. When the measured PM2.5 concentration falls below 37.5 μg/m 3, the controller sends a LOW signal to deactivate the relays and stop the actuation devices. This threshold-based logic reduces unnecessary operation and demonstrates closed-loop control functionality however, it does not by itself demonstrate PM2.5 removal efficacy (González-de-Castro et al., 2026).
EMI protection and auto-recovery
Since the device operating at 220V is an inductive load, it can generate electromagnetic interference (EMI) when the relay switches off, causing the sensor's I2C bus to hang (I2C Hang). Therefore, the system was designed with an Auto-Recovery function in the software. Instead of using a delay command, the system switched to the millis () function, allowing the processor to continuously check its own status. The I2C timeout is set to 1,000 milliseconds, and an error counter logic was implemented. If the sensor fails to send data three times in a row (due to EMI interference), the microcontroller will perform a hard reset within 3 s to clear the I2C bus error state and resume operation immediately without system interruption as a detail in Figure 10.
Data integration and telemetry
During operation, the ESP32 packages PM1.0, PM2.5, and PM10 measurements together with device operational status (ON/OFF) and transmits the records via Wi-Fi to the PostgreSQL server using HTTP POST every 15 s. During the present laboratory evaluation, data transmission and remote switching commands used unencrypted HTTP POST because the backend was hosted on a local server (localhost). Because the system controls mains-powered devices, migration to HTTPS, secure authentication, protected credential storage, and formal electrical protection are required before field deployment. The Web-GIS application retrieves the stored records to display current measurements, historical observations, and actuator status. This integrated data pathway formed part of the experimental evaluation of the closed-loop system. Controlled chamber experiments for PM2.5 removal efficiency and integration with forecasting systems are reserved for subsequent research and are not treated as validated functions of the present system.
Experimental design and functional performance evaluation
The integrated system was evaluated using 15 independent short-term functional trials conducted in a closed room. For each trial, airborne particulate concentration was intentionally increased by introducing powdered flour approximately 15 cm from the SPS30 sensor. The experiment was designed to test the system-level response to threshold crossings rather than the particulate-removal efficiency of the ionization module. During each trial, the evaluation followed the sequence of (1) continuous PM2.5 measurement, (2) detection of a concentration above the 37.5 μg/m 3 operational set-point, (3) relay activation of the fan and negative-anion generator, (4) transmission of sensor values and actuator status to PostgreSQL at 15-s intervals, (5) visualization of the updated status through the Web-GIS interface, and (6) actuator deactivation when the measured PM2.5 concentration subsequently fell below the set-point. The repeated-trial design was used to determine whether the programmed closed-loop workflow was reproducibly executed under the same functional test procedure. Because no untreated control condition, reference-grade co-location instrument, or direct ozone measurement was included, the experiment does not quantify PM2.5 removal efficacy, sensor accuracy, or ozone safety.
3. Results
This section presents and interprets the experimental results of the Cleara-Air system evaluation. The analysis focuses on end-to-end data acquisition and transmission, repeated threshold-based actuation behavior, Web-GIS integration, and the limitations that define the scope of the resulting evidence. The results are interpreted as evidence of closed-loop functional performance under the tested conditions and not as evidence of PM2.5 removal efficacy or operational safety.
System implementation and data transmission
The implemented system acquired PM1.0, PM2.5, PM4.0, and PM10 measurements using the SPS30 sensor. Each observation was time-stamped and transmitted with device status to the PostgreSQL database at 15-s intervals (Figure 11). Sequential record ingestion demonstrates that the sensor, ESP32 edge controller, wireless communication layer, and server-side database operated as an integrated data pipeline during the experiments. The Web-GIS dashboard retrieved the stored records and displayed current measurements, historical observations, and actuator status through a responsive interface (Figure 12). These observations provide experimental evidence that the sensing-to-database-to-visualization pathway functioned under the tested laboratory conditions.
Figure 11 shows the database records demonstrating the system's real-time threshold-actuation mechanism operating at approximately 15-s data transmission intervals. (a) Record ID 258 shows the system activating the mitigation device (ion_status = true) immediately upon detecting a high particulate event (PM2.5 = 75 μg/m 3). (b) Record ID 260 illustrates the subsequent deactivation of the device (ion_status = false).
Threshold-based control performance
The 15 repeated closed-room trials were used to evaluate whether the programmed threshold rule generated the expected sequence of system responses. During the trials, PM2.5 was intentionally elevated using powdered flour positioned approximately 15 cm from the SPS30 sensor. When the measured concentration exceeded the 37.5 μg/m 3 operational set-point, the ESP32 issued the activation command to the relay and the actuator status was updated in the Web-GIS workflow (Figure 13). When the measured concentration subsequently fell below the set-point, the controller issued the deactivation command while particulate monitoring and data transmission continued. The repeated observations therefore support the functional reproducibility of the programmed threshold-based sensing, communication, actuation, and status-reporting pathway under the applied test procedure. Figure 11 provides an example of this experimental sequence, including activation at PM2.5 = 75 μg/m 3 (Record ID 258) and subsequent deactivation (Record ID 260). The underlying sensor and ion-status records are available in the public supplemental repository (Udon, 2026). These results should not be interpreted as a treatment-effect experiment because the study did not include an untreated control or a validated particle-decay analysis.
Web-GIS and urban environmental informatics
The integration of real-time sensing, relational data management, spatial visualization, and remote status reporting extends the prototype beyond a stand-alone air-quality detector. The platform converts sensor observations into spatially referenced and decision-ready information accessible through standard web browsers. This architecture is consistent with urban environmental informatics approaches in which distributed sensors, interoperable databases, and map-based dashboards support situational awareness and local decision-making (Kaginalkar et al., 2022; Montalvo et al., 2022). The use of open-source components supports transferability to municipalities and communities with limited monitoring infrastructure. Conceptually, the integration also illustrates the intersection of computer science, GIScience, and urban science. Computer science provides the computational infrastructure for sensing, communication, data processing, database operations, and automated control, while GIScience contributes spatial representation, geographic referencing, spatial organization, and Web-GIS visualization of environmental observations. These capabilities support urban science by creating an infrastructure through which environmental processes can subsequently be examined in relation to their spatial and urban contexts. The present implementation should therefore be interpreted primarily as urban environmental informatics infrastructure rather than as a city-scale urban-science analysis. Its current contribution is the establishment of an operational pathway from environmental observation to spatially contextualized information and automated response. Nevertheless, one monitoring unit cannot characterize province-wide spatial variability. Future network deployment should incorporate multiple calibrated devices, standardized siting criteria, complete metadata, quality-control flags, and documented procedures for missing or delayed observations before the platform is used for urban digital-twin or operational planning applications (Cowell et al., 2025; Choosumrong et al., 2014).
Limitations and validation requirements
The present study provides original experimental evidence of the functional performance of the integrated closed-loop architecture, but it does not establish PM2.5 removal performance. Formal co-location testing and calibration of the SPS30 against a reference-grade or well-characterized particulate-matter instrument were not conducted therefore, measurement bias, mean absolute error, root mean square error, coefficient of determination, and humidity-dependent uncertainty were not quantified. The study also did not include replicated treatment-vs.-control experiments, particle decay-rate analysis, or comparison with established filtration technologies. Direct ozone concentrations were not measured, and formal electrical and occupational safety certification was not performed. In addition, the current threshold-based control logic uses a bare-comparator rule natural fluctuations around the 37.5 μg/m 3 set-point may therefore cause rapid relay cycling. Before operational deployment, a hysteresis rule (dead-band), minimum on-time requirement, or smoothed input algorithm should be implemented. Communication reliability, latency, uptime, energy consumption, data completeness, secure authentication, credential protection, and maintenance requirements also require long-duration evaluation. These limitations define the boundary of the present research findings the study demonstrates experimentally observed system-level functionality, while treatment efficacy, calibrated measurement performance, ozone safety, and deployment readiness remain subjects for subsequent controlled investigations.
4. Conclusions
This research developed and experimentally evaluated Cleara-Air, an integrated IoT- and Web-GIS-based closed-loop system for particulate-matter monitoring and threshold-based automated actuation. The system combines the SPS30 sensor, ESP32 controller, relay-based actuator interface, wireless communication, PostgreSQL database, responsive Web-GIS interface, ventilation fan, and carbon-brush negative-anion generator. Fifteen repeated closed-room functional trials were used to evaluate the complete sensing-processing-communication-actuation workflow. Under the applied test procedure, threshold crossings were associated with the programmed actuator commands, 15-s transmission of time-stamped measurements and device status, database logging, and Web-GIS status visualization. The findings therefore provide experimental evidence that the integrated closed-loop architecture performs its intended functional sequence under the tested laboratory conditions. The principal contribution of the study is the experimental evaluation of an end-to-end architecture that links local particulate sensing with automated threshold-based control and spatially referenced information delivery. From an urban informatics perspective, the framework connects urban sensing, urban data, urban computing, urban science, and urban applications and systems, with GIScience providing the spatial-information foundation that links these dimensions. IoT sensing provides environmental observations; spatially referenced data and PostgreSQL provide the data infrastructure; edge and server-side computing transform observations into operational information and automated responses; and GIS/Web-GIS provide the spatial context required for environmental information delivery and decision support.
At its present stage, Cleara-Air primarily represents a system-level urban environmental informatics contribution rather than a city-scale urban-science analysis. The architecture establishes the infrastructure needed to connect environmental observations with their geographic context, but a single prototype unit cannot characterize intra-urban spatial variability or broader urban environmental processes. Future deployment of a distributed and calibrated multi-sensor network could extend the system toward urban-science investigations of intra-urban PM2.5 variability, population exposure, relationships with land use and urban morphology, environmental inequalities, and spatially targeted planning interventions. Such an evolution would enable Cleara-Air to progress from a localized prototype toward a scalable urban sensing and decision-support infrastructure for urban environmental monitoring, planning, and resilience.
The evidence supports functional feasibility and repeatability of the integrated workflow, but it does not establish PM2.5 removal efficiency, reference-grade measurement accuracy, ozone safety, or field-deployment readiness. Future research should include SPS30 co-location and calibration, replicated treatment-versus-control experiments, direct ozone monitoring, formal electrical and occupational safety assessment, secure production-server implementation, and long-duration evaluation of communication reliability and energy performance. These subsequent studies would extend the present system-level findings toward validated environmental mitigation performance and operational deployment.
Statements
- Conflict of interest
The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
- Funding
The author(s) declared that financial support was received for this work and/or its publication. This work was partially supported by the Frontier Research and Innovation Cluster Fund, Naresuan University (Grant No. R2569C002).
- Data availability
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.
- Author contributions
NU: Data curation, Visualization, Validation, Investigation, Methodology, Writing – original draft, Software. SC: Validation, Methodology, Conceptualization, Investigation, Writing – review & editing, Supervision, Funding acquisition, Writing – original draft, Software. KP: Data curation, Validation, Software, Writing – review & editing.
- Acknowledgements
The authors gratefully acknowledge all colleagues and research assistants who contributed to the development and support of this study.
References
- Arroju A., Gujar S., Chaudhari S., Vemuri K. (2025). “IoT-based monitoring of construction-related pm and noise pollution using low-cost sensors,” in 2025 12th international conference on future internet of things and cloud (FiCloud), (Piscataway, NJ: IEEE), 144 – 150. doi: doi:10.1109/FiCloud66139.2025.00028
- Astanti Y. D., Santoso D. H., Rahmawati B. D., Akbar A. T., Rusita E., Nandita Z.. (2026). “Internet of things for monitoring air pollution PM 2.5: A bibliometric analysis,” in AIP conference proceedings, (Melville, NY: AIP Publishing LLC), 040002. doi: doi:10.1063/5.0320225
- Choosumrong S., Hataitara R., Panumonwatee G., Piyathamrongchai K., Raghavan V., Nemoto T.. (2025). Development of an IoT-based flood monitoring system integrated with GIS for lowland agricultural areas. Sensors 25: 5477. doi: doi:10.3390/s25175477
- Choosumrong S., Hataitara R., Panumonwatee G., Raghavan V., Nualsri C., Phasinam T.. (2023). Development of IoT-based smart monitoring and control system using MQTT protocol and Node-RED for parabolic greenhouse solar drying. Int. J. Inf. Technol. 15, 2089 – 2098. doi: doi:10.1007/s41870-023-01237-3
- Choosumrong S., Raghavan V., Delucchi L., Yoshida D., Vinayaraj P. (2014). Implementation of dynamic routing as a web service for emergency routing decision planning. Int. J. Geoinformatics 10, 13 – 20. doi: doi:10.52939/ijg.v10i2.373
- Colmer J., Hardman I., Shimshack J., Voorheis J. (2020). Disparities in PM2.5 air pollution in the United States. Science 369, 575 – 578. doi: doi:10.1126/science.aaz9353
- Cowell N. H., Chapman L., Topping D., James P., Bell D., Bannan T.. (2025). Are low-cost sensor networks ready to support urban digital twins? Front. Sustain. Cities 6: 1500516. doi: doi:10.3389/frsc.2024.1500516
- Espressif Systems (2024). ESP32 series datasheet. Available online at: (Accessed September 22, 2026).
- Feng S., Gao D., Liao F., Zhou F., Wang X. (2016). The health effects of ambient PM2.5 and potential mechanisms. Ecotoxicol. Environ. Saf. 128, 67 – 74. doi: doi:10.1016/j.ecoenv.2016.01.030
- Ghassabpour A. K., Abdoli H., Kamali M. A. (2025). “Design a mobile PM2.5 sensor device and calibration using machine learning models,” in 2025 9th international conference on internet of things and applications (IoT), (Piscataway, NJ: IEEE), 1 – 6. doi: doi:10.1109/IoT69654.2025.11297590
- González-de-Castro I., Viana M., Ramasco J. J., Maín-Nadal A., Moreno T. (2026). Air Quality Mapping Using PM2.5 Sensors On Urban Buses. Piscataway, NJ: IEEE Internet of Things Journal. doi: doi:10.1109/JIOT.2026.3672932
- Huang X., Steinmetz J., Marsh E. K., Aravkin A. Y., Ashbaugh C., Murray C. J.. (2025). A systematic review with a burden of proof meta-analysis of health effects of long-term ambient fine particulate matter (PM2.5) exposure on dementia. Nat. Aging 5, 897 – 908. doi: doi:10.1038/s43587-025-00844-y
- Kaginalkar A., Kumar S., Gargava P., Niyogi D. (2022). SmartAirQ: a big data governance framework for urban air quality management. Front. Environ. Sci. 10: 785129. doi: doi:10.3389/fenvs.2022.785129
- Khan M. F., Shirasuna Y., Hirano K., Masunaga S. (2010). Characterization of PM2.5, PM2.5–10 and PM>10 in ambient air, Yokohama, Japan. Atmos. Res. 96, 159 – 172. doi: doi:10.1016/j.atmosres.2009.12.009
- Kong L., Song M., Li X., Liu Y., Lu S., Zeng L.. (2024). Analysis of China's PM2.5 and ozone coordinated control strategy based on the observation data from 2015 to 2020. J. Environ. Sci. 138, 385 – 394. doi: doi:10.1016/j.jes.2023.03.030
- Liu Y., Zheng Y., Geng G., Cheng J., Liu Y., Tong D.. (2025). Strategy for coordinating near-term PM2.5, ozone, and CO2 mitigation in China. Proc. Nat. Acad. Sci. 122: e2513194122. doi: doi:10.1073/pnas.2513194122
- Matcha S., Reeta M. (2025). Database selection and management: choosing the right database (SQL vs. NoSQL) for your application. Database Sel. Manag. 13: 5. doi: doi:10.63345/ijrhs.net.v13.i3.5
- Mohapatra A., Tripathi A. N., Khan U., Kumar R., Singh I. (2026). An IoT–machine learning proof-of-concept framework for real-time urban particulate matter prediction using low-cost sensors. IEEE Access 14, 6683 – 6697. doi: doi:10.1109/ACCESS.2026.3651996
- Montalvo L., Fosca D., Paredes D., Abarca M., Saito C., Villanueva E. (2022). An air quality monitoring and forecasting system for Lima city with low-cost sensors and artificial intelligence. Front. Sustain. Cities 4: 849762. doi: doi:10.3389/frsc.2022.849762
- National Environment Board (2026). Prakat Khana Kammakhan Singwaetlom Haeng Chat Rueang Kamnot Mattrathan Khunnaphap Akat Nai Banrayakat Doi Thuapai Ph.So. 2569 [Notification of the National Environment Board On Setting Ambient Air Quality Standards B.E. 2569]. Bangkok: Royal Thai Government Gazette, 143(Special Section 20 Ng), 20.
- Nzeyimana B. S., Relton C., Gopianan G., Mary M. S. (2026). “Sensor-based approaches for indoor air quality monitoring and control: PM2.5 and PM10,” in Air Quality Monitoring and Management Using Sensors, (Amsterdam: Elsevier), 97 – 127. doi: doi:10.1016/B978-0-443-33973-8.00013-8
- Otanasap N., Tadsuan S., Chalermsuk C. (2025). An AIoT-based air quality monitoring system for real-time pm2.5 prediction in urban environments. ASEAN J. Sci. Technol. Rep. 28, e255168 – e255168. doi: doi:10.55164/ajstr.v28i1.255168
- Pantelic J., Nazarian N., Miller C., Meggers F., Lee J. K. W., Licina D. (2022). Transformational IoT sensing for air pollution and thermal exposure in cities. Front. Built. Environ. 8: 971523. doi: doi:10.3389/fbuil.2022.971523
- Phasinam T., Phasinam K., U-kaew A., Piyathamrongchai K., Hataitara R., Raghavan V.. (2025). Real-time monitoring and positioning of agricultural tractors using a low-cost GPS and IoT device. Int. J. Geoinformatics 21, 111 – 120. doi: doi:10.52939/ijg.v21i1.3799
- Pisutsan P., Poprom N., Panumasvivat J., Assavanopakun P., Polpitakchai C., Yamsiri R.. (2025). Health effects of PM2.5 exposure on short-term international travellers to Thailand. J. Travel Med. 33: taaf095. doi: doi:10.1093/jtm/taaf095
- Ponsawansong P., Prapamontol T., Rerkasem K., Chantara S., Tantrakarnapas K., Kawichai S.. (2023). Sources of PM2.5 oxidative potential during haze and non-haze seasons in Chiang Mai, Thailand. Aerosol. Air. Qual. Res. 23: 230030. doi: doi:10.4209/aaqr.230030
- Ramadan M. N., Ali M. A., Alkhedher M. (2025). Development of a federated learning-enabled IoT framework for indoor air quality and HVAC optimization in healthcare buildings. J. Build. Eng. 107: 112758. doi: doi:10.1016/j.jobe.2025.112758
- Rosa-Bilbao J., Butt F. S., Merkl D., Wagner M. F., Schäfer J., Boubeta-Puig J. (2025). IoT-based indoor air quality management system for intelligent education environments. IEEE Internet Things J. 12, 18031 – 18041. doi: doi:10.1109/JIOT.2025.3539886
- Santoso D. H., Santosa S. J., Sekaranom A. B. (2025). Low-cost sensor based on internet of things for PM 2, 5 air quality monitoring. Indones. J. Geogr. 57: 4159. doi: doi:10.22146/ijg.104159
- Sensirion (2019). Mechanical design and assembly guidelines for SPS30. Available online at: (Accessed September 22, 2026).
- Srisang W., Jaroensutasinee K., Jaroensutasinee M., Khongthong C., Piamonte J. R. P., Sparrow E. B. (2024). PM2.5 IoT sensor calibration and implementation issues including machine learning. Emerg Sci J 8, 2267 – 2277. doi: doi:10.28991/ESJ-2024-08-06-08
- Udon N. (2026). (Code DB/ino/php) Design and Development of an IoT-Based Prototype System for PM2.5 Monitoring and Automated Electrical Ionization Actuation. London: Figshare.
- Udon N., Piyathamrongchai K., Choosumrong S. (2024). “Development of a time series visualization application for PM2.5 level changes using google earth engine,” in 2024 Geoinformatics for Spatial-Infrastructure Development in Earth and Allied Sciences (GIS-IDEAS), (Piscataway, NJ: IEEE), 1 – 5. doi: doi:10.1109/GIS-IDEAS63212.2024.10991033
- UNICEF (2024). Air pollution accounted for 8.1 million deaths globally in 2021, becoming the second leading risk factor for death, including for children under five years. Press Release. Available online at: (Accessed September 22, 2026).
- Vaze N., Gold B., Lindsey D., Moore M. D., Koutrakis P., Demokritou P. (2025). An assessment of the efficacy of commercial air ionizer systems against a SARS-CoV-2 surrogate. Microorganisms 13, Article 593. doi: doi:10.3390/microorganisms13030593
- Waheed F., Ehsan N., Nasir R., Khan W. A., Khokhar M. F., Shahzad L.. (2025). Geo-spatial distribution of air pollutants in urban area and its potential health risk analysis solutions. Urban Clim. 61: 102380. doi: doi:10.1016/j.uclim.2025.102380
- Wang X. (2024). Advancing sustainable air quality through calibration of miniature air quality monitors. Front. Environ. Sci. 12: 1348794. doi: doi:10.3389/fenvs.2024.1348794
- Warlina L., Listyarini S., Mohamed M. A., Umar R., Sambas A. (2026). Development of a real-time iot-based portable particulate matter monitoring device using PMS5003 sensor. Fusion Pract. Appl. 21, 13 – 26. doi: doi:10.54216/FPA.210102
- Wongmetta K., Rachavong P., Choosumrong S. (2018). The analysis and implementation of a flood resilience database in chum-saeng district based on GIS and web GIS. Asian Health Sci. Technol. Rep. 26, 134 – 145. Available online at: (Accessed October 02, 2026).
Citation
Udon, N., et al. (2026). Development and experimental evaluation of an IoT-based closed-loop system for PM2.5 monitoring and automated electrical ionization actuation. Frontiers in Sustainability, Volume 7. https://doi.org/
- Received
- Accepted
- Published
- Volume
- 7 - 2026
Copyright
Copyright © 2026 Udon, Choosumrong and Piyathamrongchai.
License: https://creativecommons.org/licenses/by/4.0/
*Correspondence: Sittichai Choosumrong
Article metrics
- Views
- 0
- Downloads
- 0
- Citations
- 0
- Shares
- 0
