Smoke Detection and Room Humidity Monitoring System Using MQ-135 and DHT22 Based on ESP32

Moh Rifaldo Mantali, Bambang Panji Asmara, Iskandar Zulkarnain Nasibu

Abstract


This paper presents a smoke detection and room humidity monitoring system using MQ-135 and DHT22 based on ESP32, supported by physical indicator LEDs and the Blynk Internet of Things dashboard. The system initializes the sensor and indicator pins, establishes a Wi-Fi connection, verifies sensor readings, warms up and calibrates the MQ-135 sensor, and then performs periodic monitoring every two seconds. The MQ-135 output is processed as a relative air-quality indicator, while the DHT22 provides room humidity information. The dashboard configuration was improved by removing Blynk virtual LED widgets and retaining only numerical values, status labels, and explanatory text through virtual pins. All physical LEDs remain active on the hardware to indicate gas and humidity conditions locally. The load-resistor value for the MQ-135 calculation was also corrected to 1 kOhm. Functional evaluation indicates that the prototype can provide local indications and remote monitoring information without relying on virtual LED widgets. The system is suitable for educational early-warning demonstrations, although calibration with reference instruments is required before safety-critical use.

Keywords


ESP32; MQ-135; DHT22; Smoke Detection; Room Humidity Monitoring; Internet of Things; Blynk Dashboard

Full Text:

PDF

References


World Health Organization, “WHO Global Air Quality Guidelines: Particulate Matter, Ozone, Nitrogen Dioxide, Sulfur Dioxide and Carbon Monoxide,” 2021. [Online]. Available: https://www.who.int/publications/i/item/9789240034228

ASHRAE, “Indoor Carbon Dioxide,” 2025. [Online]. Available: https://www.ashrae.org/file%20library/about/position%20documents/pd-on-indoor-carbon-dioxide-english.pdf

Y. I. Chandra, F. Sjafrina, D. R. Irawati, M. Riastuti, and W. S. Br. Purba, “Design of air pollution measurement detection using microcontroller NodeMCU ESP8266 based on IoT,” Int. J. Inf. Syst. Technol., 2022.

S. J. Umar and D. Ab Kadir, “An IoT based portable air quality monitoring system with CO and CO2 detector,” J. Comput. Technol. Creat. Content, 2020.

J. G. Caselles Nunez, O. A. Contreras Negrette, K. de Jesus Beleno Saenz, and C. G. Diaz Saenz, “Design and implementation of an indoor and outdoor air quality measurement device for the detection and monitoring of gases with hazardous health effects,” Eng. Proc., 2025, [Online]. Available: https://doi.org/10.3390/engproc2025083013

Espressif Systems, “ESP32 Series Datasheet, Version 5.2,” Espressif Systems, 2025. [Online]. Available: https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf

Espressif Systems, “Arduino-ESP32 ADC API Documentation,” Espressif Systems. [Online]. Available: https://docs.espressif.com/projects/arduino-esp32/en/latest/api/adc.html

Espressif Systems, “Arduino-ESP32 Wi-Fi API Documentation,” Espressif Systems. [Online]. Available: https://docs.espressif.com/projects/arduino-esp32/en/latest/api/wifi.html

Ltd. Zhengzhou Winsen Electronics Technology Co., “MQ135 Semiconductor Sensor for Air Quality Control Manual, Version 1.4,” 2016. [Online]. Available: https://www.winsen-sensor.com/d/files/PDF/Semiconductor%20Gas%20Sensor/MQ135%20%28Ver1.4%29%20-%20Manual.pdf

Ltd. Aosong Electronics Co., “DHT22/AM2302 Digital Temperature and Humidity Sensor Datasheet,” 2010. [Online]. Available: https://cdn.sparkfun.com/assets/f/7/d/9/c/DHT22.pdf

Blynk Inc., “Virtual Pins: Send and Receive Data from Device,” Blynk Documentation. [Online]. Available: https://docs.blynk.io/en/blynk-library-firmware-api/virtual-pins

Blynk Inc., “Send Data from Hardware to Blynk,” Blynk Documentation. [Online]. Available: https://docs.blynk.io/en/getting-started/how-to-display-any-sensor-data-in-blynk-app

National Institute for Occupational Safety and Health, “Carbon Monoxide: NIOSH Pocket Guide to Chemical Hazards,” CDC. [Online]. Available: https://www.cdc.gov/niosh/npg/npgd0105.html

National Institute for Occupational Safety and Health, “Ammonia: NIOSH Pocket Guide to Chemical Hazards,” CDC. [Online]. Available: https://www.cdc.gov/niosh/npg/npgd0028.html

[15] Hidayat, I., Nasibu, I. Z., Musa, W., Bonok, Z., & Dongka, R. H. (2026). Design and Construction of an ESP32-Based IoT Fire Alarm System to Differentiate Cigarette Smoke and Fire. International Journal of Embedded Computer Engineering, 1(1), 42-51.


Refbacks

  • There are currently no refbacks.


Copyright (c) 2026 International Journal of Embedded Computer Engineering

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