Deployment of a Machine Learning Based Indoor Air Quality Predictor on NodeMCU ESP32 Using EloquentTinyML

Yaddarabullah Yaddarabullah, Umar Al Faruq

Abstract


Indoor air quality monitoring increasingly requires local intelligence because indoor exposure conditions can change faster than centralized systems can respond. However, many machine learning based indoor air quality predictors remain difficult to deploy on microcontrollers due to memory limits, computation constraints, network dependence, and the lack of a reproducible edge deployment workflow. This study develops an end-to-end TinyML framework for deploying a lightweight indoor air quality predictor on a NodeMCU ESP32 using EloquentTinyML and TensorFlow Lite Micro. A synthetic IAQ dataset was generated from eight environmental variables, namely temperature, humidity, PM2.5, PM10, NO2, SO2, CO, and room type, and the indoor air quality score was derived from pollutant weighted features before balancing comfort labels using SMOTE. The proposed compact MLP contains eight inputs, one hidden layer with twelve neurons, ReLU activation, dropout regularization, and a single regression output. Five-fold validation produced an average root mean square error of 5.794, mean absolute error of 4.394, and R2 of 0.877, while the converted model required only 121 trainable parameters. These results indicate that compact TinyML deployment can provide a feasible proof-of-concept for local indoor air quality estimation, although physical sensor validation remains necessary.

Keywords


Indoor air quality, TinyML, NodeMCU ESP32, EloquentTinyML, TensorFlow Lite Micro, embedded machine learning, SMOTE

Full Text:

PDF

References


World Health Organization. (2021). WHO global air quality guidelines: Particulate matter (PM2.5 and PM10), ozone, nitrogen dioxide, sulfur dioxide and carbon monoxide. Geneva: World Health Organization.

Hayward, I., Hirst, E., Stewart, G., & Acton, W. J. F. (2024). Low-cost air quality sensors: Biases, corrections and challenges in their comparability. Atmosphere, 15(12), 1523. DOI: 10.3390/atmos15121523.

Chojer, H., Branco, P. T. B. S., Martins, F. G., Alvim-Ferraz, M. C. M., & Sousa, S. I. V. (2020). Development of low-cost indoor air quality monitoring devices: Recent advancements. Science of the Total Environment, 727, 138385. DOI: 10.1016/j.scitotenv.2020.138385.

Soro, S. (2021). TinyML for ubiquitous edge AI. arXiv preprint arXiv:2102.01255.

Abadade, Y., Temouden, A., Bamoumen, H., Benamar, N., Chtouki, Y., & Hafid, A. S. (2023). A comprehensive survey on TinyML. IEEE Access, 11, 96892-96922. DOI: 10.1109/ACCESS.2023.3294111.

David, R., Duke, J., Jain, A., Janapa Reddi, V., Jeffries, N., Li, J., Kreeger, N., Nappier, I., Natraj, M., Regev, S., Rhodes, R., Wang, T., & Warden, P. (2021). TensorFlow Lite Micro: Embedded machine learning for TinyML systems. Proceedings of Machine Learning and Systems, 3, 800-811.

EloquentArduino. (2024). EloquentTinyML: An eloquent interface to TensorFlow Lite for Microcontrollers. Arduino Libraries Documentation.

Espressif Systems. (2025). ESP32 Series Datasheet. Shanghai: Espressif Systems.

Chawla, N. V., Bowyer, K. W., Hall, L. O., & Kegelmeyer, W. P. (2002). SMOTE: Synthetic minority over-sampling technique. Journal of Artificial Intelligence Research, 16, 321-357.

Warden, P., & Situnayake, D. (2019). TinyML: Machine learning with TensorFlow Lite on Arduino and ultra-low-power microcontrollers. Sebastopol, CA: O Reilly Media.

Banbury, C., Reddi, V. J., Torelli, P., Holleman, J., Jeffries, N., Kiraly, C., Montino, P., Kanter, D., Ahmed, S., Pau, D., Thakker, U., Torrini, A., Warden, P., Cordaro, J., Di Guglielmo, G., Duarte, J., Gibellini, S., Parekh, V., Tran, H., Tran, N., Wenxu, N., & Xuesong, X. (2021). MLPerf Tiny benchmark. arXiv preprint arXiv:2106.07597.

Hymel, S., Banbury, C., Situnayake, D., Elium, A., Ward, C., Kelcey, M., Baaijens, M., Majchrzycki, M., Plunkett, J., Tischler, D., Grande, A., Moreau, L., Maslov, D., Beavis, A., Jongboom, J., & Reddi, V. J. (2023). Edge Impulse: An MLOps platform for Tiny Machine Learning. Proceedings of Machine Learning and Systems, 5.

Guo, Z., Wang, X., & Ge, L. (2023). Classification prediction model of indoor PM2.5 concentration using CatBoost algorithm. Frontiers in Built Environment, 9, 1207193. DOI: 10.3389/fbuil.2023.1207193.

Yu, W., Nakisa, B., Loke, S. W., Stevanovic, S., Guo, Y., & Rastgoo, M. N. (2024). Indoor PM2.5 forecasting and the association with outdoor air pollution: A modelling study based on sensor data in Australia. arXiv preprint arXiv:2405.07404.

Desouza, P., Kahn, R., Stockman, T., Obermann, W., Crawford, B., Wang, A., Crooks, J., Li, J., & Kinney, P. (2022). Calibrating networks of low-cost air quality sensors. Atmospheric Measurement Techniques, 15, 6309-6328. DOI: 10.5194/amt-15-6309-2022.

Chen, T., & Guestrin, C. (2016). XGBoost: A scalable tree boosting system. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 785-794. DOI: 10.1145/2939672.2939785.

Breiman, L. (2001). Random forests. Machine Learning, 45, 5-32. DOI: 10.1023/A:1010933404324.




DOI: https://doi.org/10.31326/jisa.v9i1.2847

Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 Yaddarabullah Yaddarabullah, Umar Al Faruq

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.


JOURNAL IDENTITY

Journal Name: JISA (Jurnal Informatika dan Sains)
e-ISSN: 2614-8404, p-ISSN: 2776-3234
Publisher: Program Studi Teknik Informatika Universitas Trilogi
Publication Schedule: June and December 
Language: English
APC: The Journal Charges Fees for Publishing 
IndexingEBSCODOAJGoogle ScholarArsip Relawan Jurnal IndonesiaDirectory of Research Journals Indexing, Index Copernicus International, PKP IndexScience and Technology Index (SINTA, S4) , Garuda Index
OAI addresshttp://trilogi.ac.id/journal/ks/index.php/JISA/oai
Contactjisa@trilogi.ac.id
Sponsored by: DOI – Digital Object Identifier Crossref, Universitas Trilogi

In Collaboration With: Indonesian Artificial Intelligent Ecosystem(IAIE), Relawan Jurnal IndonesiaJurnal Teknologi dan Sistem Komputer (JTSiskom)

 

 


JISA (Jurnal Informatika dan Sains) is Published by Program Studi Teknik Informatika, Universitas Trilogi under Creative Commons Attribution-ShareAlike 4.0 International License.