IoT-MQTT Architecture for Indoor Air Quality Monitoring
Keywords:
Air quality, indoor spaces, IoT, IAQI, MQTT.Abstract
Indoor Air Quality (IAQ) is a crucial factor in mitigating respiratory diseases, as individuals spend up to 90% of their time indoors, especially in academic spaces where occupants remain for extended periods. However, traditional IAQ monitoring systems commonly rely on proprietary commercial ecosystems, restricting accessibility, interoperability, and adaptability. This study presents an IoT-MQTT architecture based on open-access technologies for near-real-time IAQ monitoring, which considers parameters such as carbon dioxide (CO2), total volatile organic compounds (TVOC), temperature, and relative humidity. It was developed through a four-phase methodology encompassing technological research and surveillance, design, development, and testing. The system integrates three sensing nodes built upon the ESP32 microcontroller with CCS811 and DHT22 sensors, embedding a custom linear offset compensation algorithm within its firmware for thermo-hygrometric variables. Technical and operational validation testing of the architecture was conducted in a 60.48 m² university classroom over five consecutive days, utilizing a 10-second sampling interval to transmit data to a broker hosted on ThingSpeak, alongside local replication on a Raspberry Pi with persistence in Supabase. The system successfully detected microclimatic variations linked to occupancy and ventilation, revealing peaks up to approximately 1300 ppm of CO2 and 220 ppb of TVOC under high occupancy and limited air exchange conditions. The results demonstrate the feasibility, stability, and replicability of the architecture based on affordable open-access technologies, establishing a solid architectural foundation for the future implementation of automated environmental ventilation control strategies in academic environments.
References
Figols González, M., Díaz de Garayo Balsategui, S., & Aláez Sarasibar, X. (2020). La monitorización de la calidad del aire interior como herramienta de evaluación y mejora de la salubridad de un espacio (Indoor air quality monitoring as a tool for evaluating and improving the healthiness of a space). Anales de Edificación, 6(3), 13–20. https://doi.org/10.20868/ade.2020.4610
Chávez-Bracamontes, R., Mancilla-Peña, F., Sepúlveda-Rubio, S., & Mejía-Cárdenas, C. (2023). Wireless CO₂ and ozone monitoring with IoT technology for indoor air quality. En Memorias del Congreso Nacional de Control Automático 2023 (Acapulco, Guerrero, México, 25–27 de octubre de 2023). Asociación Mexicana de Control Automático. https://doi.org/10.58571/CNCA.AMCA.2023.1045
Videa Galo, M., & Rodríguez Corea, N. (2023). Evaluación de medidas para reducir la transmisión de COVID-19 en espacios cerrados, Tegucigalpa, Honduras. Revista Médica Hondureña, 91(2), 94–99. https://doi.org/10.5377/rmh.v91i2.16614
Prather, K. A., Wang, C. C., & Schooley, R. T. (2020). Reducing transmission of SARS-CoV-2: Masks and testing are necessary to combat asymptomatic spread in aerosols and droplets. Science, 368(6498), 1422–1424. https://doi.org/10.1126/science.abc6197
Velarde, F., Mamani-Paco, R., & Andrade-Flores, M. (2020). Estimación de la probabilidad de contagio de COVID-19 por aerosoles en ambientes cerrados: Aplicaciones a casos en la ciudad de La Paz, Bolivia. Revista Boliviana de Física, 37(37), 22–30. http://www.scielo.org.bo/scielo.php?script=sci_arttext&pid=S1562-38232020000200004
Bohórquez, M. C., Chapa, J. L., López, D., Manrique, M. A., Miranda, C., & Tendero Caballero, R. (2021). Use of filters and special materials in classrooms, based on the assessment of the presence of CO₂ as an indicator of COVID reduction and control in closed spaces. Building & Management, 5(3), 51–62. https://doi.org/10.20868/bma.2021.3.4714
Zhao, M., Wang, M., Zhang, J., Ye, J., Xu, Y., Wang, Z., Ye, D., Liu, J., & Wan, J. (2020). Advances in the relationship between coronavirus infection and cardiovascular diseases. Biomedicine & Pharmacotherapy, 127, 110230. https://doi.org/10.1016/j.biopha.2020.110230
Montero Gutiérrez, P., Cerezo Narváez, A., Pastor Fernández, A., Otero Mateo, M., & Quesada Silva, P. (2023). Monitoring and control of basic air quality conditions in a university education facility. DYNA, 98(5), 1–7. https://doi.org/10.6036/10819
Daza Pérez, M. Á., Martínez Benavidez, D. X., & Caro Hernández, P. A. (2015). Contaminación microbiológica del aire al interior y el síndrome del edificio enfermo. Biociencias, 10(2), 37–50. https://dialnet.unirioja.es/servlet/articulo?codigo=5460365
Rodríguez Muñoz, N. A., & Ortega Ávila, N. (2024). Medidores de CO₂: ¿Útiles para reducir el contagio de la COVID-19? Milenaria, Ciencia y Arte, (23), 43–46. https://doi.org/10.35830/mcya.vi23.461
World Health Organization. (2023). Chronic obstructive pulmonary disease (COPD). https://www.who.int/es/news-room/fact-sheets/detail/chronic-obstructive-pulmonary-disease-(copd)
Instituto Nacional de Estadística y Geografía. (2023). Estadística de defunciones registradas de enero a junio de 2022 (preliminar) (Comunicado de prensa núm. 29/23).https://www.inegi.org.mx/contenidos/saladeprensa/boletines/2023/DR/DR-Ene-jun2022.pdf
Ghaleb, T. A., Bin-Thalab, R. A., & Abdullah Alselwi, G. A. A. (2021). How Internet of Things responds to the COVID-19 pandemic. PeerJ Computer Science, 7, e776. https://doi.org/10.7717/peerj-cs.776
Singh, R. P., Javaid, M., Haleem, A., & Suman, R. (2020). Internet of Things (IoT) applications to fight against COVID-19 pandemic. Diabetes & Metabolic Syndrome: Clinical Research & Reviews, 14(4), 521–524. https://doi.org/10.1016/j.dsx.2020.04.041
Al-Fuqaha, A., Guizani, M., Mohammadi, M., Aledhari, M., & Ayyash, M. (2015). Internet of Things: A survey on enabling technologies, protocols, and applications. IEEE Communications Surveys & Tutorials, 17(4), 2347–2376. https://doi.org/10.1109/COMST.2015.2444095
Al Hanif, A., & Ilyas, M. (2024). Effective feature engineering framework for securing MQTT protocol in IoT environments. Sensors, 24(6), 1782. https://doi.org/10.3390/s24061782
Mishra, B., & Kertesz, A. (2020). The use of MQTT in M2M and IoT systems: A survey. IEEE Access, 8, 201071–201086. https://doi.org/10.1109/ACCESS.2020.3035849
Mosquera Escobar, C. (2023). Desarrollo de un sistema de monitoreo remoto de la calidad del aire en espacios interiores [Trabajo de grado, Universidad de Antioquia]. https://bibliotecadigital.udea.edu.co/bitstream/10495/33202/1/MosqueraCristian_2023_MonitoreoRemotoAire.pdf
Guijarro Miragaya, P., Estay Leal, T., Patrón Saade, L., & Tendero Caballero, R. (2021). The CO₂ assessment in a school classroom for an optimal natural ventilation strategy. Building & Management, 5(3), 29–43. https://doi.org/10.20868/bma.2021.3.4712
Quiroga Barrios, D. A. (2023). Implementación de una red inalámbrica de sensores de CO₂ usando IoT como sistema de alerta ante una ventilación deficiente frente al COVID-19 en aulas de clase [Trabajo de grado, Universidad Antonio Nariño]. https://redcol.minciencias.gov.co/Record/UAntonioN2_3e88f0c47105dbdc2403f6bb9dbbd598
Chung-Yen Chen, Ping-Hui Chen, Jia-Kun Chen, & Ta-Chen Su. (2021). Recommendations for ventilation of indoor spaces to reduce COVID-19 transmission. Journal of the Formosan Medical Association, 120(12), 2055–2060. https://doi.org/10.1016/j.jfma.2021.08.007
Gómez D'Orazio, L., Medina, S., & Montezanti, D. (2023). Integración de una red de sensores con una plataforma IoT para control inteligente de aulas. Instituto de Investigación en Informática LIDI (III-LIDI), Facultad de Informática, Universidad Nacional de La Plata–Comisión de Investigaciones Científicas de la Provincia de Buenos Aires. http://sedici.unlp.edu.ar/bitstream/handle/10915/149527/Documento_completo.pdf-PDFA.pdf?sequence=1&isAllowed=y
Soledispa Villegas, J. T. (2020). Análisis de niveles muy altos de CO₂ en las aulas de clases mediante el sensor MQ-135 [Trabajo de titulación, Universidad de Guayaquil]. http://repositorio.ug.edu.ec/handle/redug/58211
Romero López, Y., Álvarez González, R., Maya Ramírez, R. L., & Sánchez Gálvez, A. M. (2022). Desarrollo de un sistema embebido para advertir sobre las condiciones de riesgo de contagio de COVID-19 mediante el monitoreo de la calidad del aire. Research in Computing Science, 151(12), 171–180. https://rcs.cic.ipn.mx/2022_151_12/Desarrollo%20de%20un%20sistema%20embebido%20para%20advertir%20sobre%20las%20condiciones%20de%20riesgo.pdf
Gómez-Meza, J. S., Matute-Arias, S. V., & Negrete Peña, T. J. (2022). Diseño de un prototipo IoT para el monitoreo de material particulado en espacios reducidos utilizando ESP32 con servidor hospedado en la nube. Sinergia Académica, 4(3), 1–18. https://dialnet.unirioja.es/servlet/articulo?codigo=8079673




