Scalable IOT Air-Quality Monitoring for Smart Cities: ESP32 Sensor Nodes and Random Forest Forecasting
Rasal Atul Balasaheb1, Dr. G. B. Dongre2, Prof. Vithhal Bhosale3
1 CSMSS Chh.Shahu college of engineering kanchanwadi, Chh. Sambhajinagar
.2 CSMSS Chh.Shahu college of engineering kanchanwadi, Chh. Sambhajinagar
3CSMSS Chh.Shahu college of engineering kanchanwadi, Chh. Sambhajinagar
Abstract -
In Rapid urbanization and increasing vehicular emissions have intensified the need for reliable air-quality monitoring frameworks in smart-city environments. This work presents a scalable IoT-based air-quality monitoring and prediction system built around ESP32 sensor nodes equipped with MQ-135, PM2.5, temperature, and humidity sensors. The nodes continuously measure on-site environmental parameters and transmit the data to a cloud platform for storage, visualization, and further analysis. To enhance the system’s decision-making capability, a Random Forest model is trained to predict short-term air-quality trends, with a focus on PM2.5 levels due to their significant health impact. Experimental trials were conducted over several weeks using live sensor data collected from multiple indoor and outdoor locations. The proposed system demonstrated stable real-time performance with average communication latency below 300 ms. The Random Forest model achieved an R² score of 0.92, outperforming linear regression and decision tree baselines. The RMSE value reduced by nearly 28% when compared to single model predictions, indicating better noise tolerance and improved reliability for low-cost sensor data. Additionally, calibration against reference readings showed an average measurement deviation of ±6–8%, which is acceptable for economical sensor deployments. The findings confirm that the combination of ESP32-based sensing and Random Forest forecasting provides a practical, low-cost, and scalable approach for smart-city air-quality management. The system can be expanded easily to larger sensor networks, making it suitable for pollution surveillance, environmental research, and community health applications. Management.
Key Words: Air Quality Monitoring, Prediction Model, Random Forest, Wireless Sensor Network