Implementation of Fuzzy Logic in a Cigarette Smoke Detection System Based on MQ-2 Sensor and Internet of Things

Authors

  • Duiki Pramana Sitepu STMIK Kaputama
  • Hotler Manurung STMIK Kaputama
  • Milli Alfhi Syari STMIK Kaputama

DOI:

https://doi.org/10.59934/jaiea.v6i1.2902

Keywords:

Cigarette smoke, ESP32, Exhaust fan, Internet of things, MQ-2 sensor, Sugeno fuzzy logic

Abstract

Violations of smoking bans in smoke-free areas persist because supervision is manual and not continuous, while existing detection systems generally rely on a single binary threshold whose output changes abruptly around the boundary value. This research designs and implements a cigarette smoke detection system based on the MQ-2 gas sensor and the internet of things, using the Sugeno fuzzy logic method as the sensor data processor. The system was developed with the prototype method on an ESP32 microcontroller and is equipped with indicator lamps, a buzzer and a liquid crystal display as local warnings, and a 5V direct current exhaust fan driven through a relay module as an automatic mitigation actuator. Detection data are stored in a MySQL database through a web service, presented on a React based dashboard, and forwarded through the Telegram bot service. Testing shows that the sensor reads 24 PPM without smoke and up to 1542 PPM at five centimetres, classified as safe, alert and danger. The fuzzy method produces a gradual output in the transition regions, in which 48 PPM yields a crisp value of 51 and 298 PPM yields 178. The exhaust fan shortens the air quality recovery time by 63.9 percent.

Downloads

Download data is not yet available.

References

E. Setyawan, U. Chotijah, and H. Dwi Bhakti, “Metode fuzzy sugeno dan internet of things (IoT),” INDEXIA Informatic Comput. Intelegent J., vol. 3, no. 1, pp. 1–9, 2021.

M. W. Aminullah, D. Fitria, I. Akbar, and R. Denata, “Development of an IoT-integrated cigarette smoke detection system using MiCS-5524 sensor,” Int. J. Res. Vocat. Stud. (IJRVOCAS), vol. 4, no. 1, pp. 40–45, 2024, doi: 10.53893/ijrvocas.v4i1.243.

A. S. Sandi, I. A. Ashari, R. A. Setiawan, and R. B. B. Sumantri, “Implementasi sensor MQ-2 sebagai alat deteksi asap rokok menggunakan ATmega328,” METHOMIKA J. Manaj. Inform. dan Komputerisasi Akunt., vol. 5, no. 2, pp. 110–115, 2021, doi: 10.46880/jmika.Vol5No2.pp110-115.

T. Setiadi and N. Syafaat, “Sistem informasi pendeteksi asap rokok menggunakan sensor MQ-2 pada Klinik Berlian Limpung berbasis Arduino Uno,” J. Ilm. Sist. Inf. (JUSI), vol. 1, no. 2, 2022.

A. Anantama, A. Wantoro, I. Ahmad, A. S. Puspaningrum, L. P. Deviana, and M. B. Maharani, “Implementasi metode fuzzy pada sistem sirkulasi udara berbasis internet of things,” J. Tek. dan Sist. Komput. (JTIKOM), vol. 3, no. 2, 2022.

M. Rizky, “Rancang bangun sistem pendeteksi dan monitoring asap rokok pada ruangan tertutup berbasis internet of things,” Undergraduate thesis, 2025.

F. Leonardy and Y. Scorpionius, “Perancangan sistem pendeteksi asap otomatis berbasis Arduino R3 dengan menggunakan metode fuzzy logic Mamdani,” J. Mhs. Tek. Inform., vol. 8, no. 6, 2024.

Haniza, B. Pamungkas, Z. Saputra, and Novitasari, “Alat pendeteksi asap rokok dengan peringatan suara menggunakan sensor MQ-2 dan MQ-135,” vol. 3, no. 1, 2025.

M. Masjun Efendi, Faoziah, and Zaenudin, “Alat pendeteksi asap rokok berbasis internet of things pada ruang guru MTs Mamba’ul Barokah NW Borok,” J. Data Anal. Inf. Comput. Sci. (JDAICS), vol. 1, 2024.

R. Zohara Shoma, S. Noertjahjono, and J. Dedy Irawan, “Penerapan logika fuzzy untuk pengendalian kualitas udara pada ruangan smoking area dengan mikrokontroler,” J. Mhs. Tek. Inform., vol. 4, no. 1, 2020.

S. Fadilah Ritonga and E. Setiawan, “Prototipe pengendalian kualitas udara pada smoking room menggunakan metode fuzzy-PI,” J. Pengemb. Teknol. Inf. dan Ilmu Komput., vol. 9, no. 12, 2025.

S. Rahmadhani, D. W. Wildana, H. W. Arumdanie, and L. Hakim, “Penerapan React JS dan Axios untuk pengembangan front-end aplikasi iCare,” Softw. Dev. Digit. Bus. Intell. Comput. Eng., vol. 2, no. 2, pp. 40–46, 2024, doi: 10.57203/session.v2i02.2024.40-46.

J. T. Simanungkalit and B. M. Rambe, “Penerapan IoT dalam pendeteksi gas (CO) dan kebakaran dengan notifikasi aplikasi Telegram,” J. Minfo Polgan, vol. 14, no. 1, pp. 691–701, 2025, doi: 10.33395/jmp.v14i1.14843.

W. Setianto et al., “Evaluasi kinerja dan skalabilitas platform Blynk untuk aplikasi internet of things (IoT),” 2025.

Downloads

Published

2026-10-15

How to Cite

Pramana Sitepu, D., Manurung, H., & Alfhi Syari, M. (2026). Implementation of Fuzzy Logic in a Cigarette Smoke Detection System Based on MQ-2 Sensor and Internet of Things. Journal of Artificial Intelligence and Engineering Applications (JAIEA), 6(1), 994–1002. https://doi.org/10.59934/jaiea.v6i1.2902