Prototype of a Smoking Activity Detection Device for School Toilets Based on ESP32

Authors

  • Muhamad Wahyu Iqbal Universitas Negeri Jakarta
  • Vina Oktaviani Universitas Negeri Jakarta
  • Loudry Fadhlillah Fahmi Universitas Negeri Jakarta

Keywords:

Telegram Bot, Smoking Detection, ESP32-Cam, MQ-2, PIR HC-SR501

Abstract

This research aims to develop and test a prototype device for detecting indications of smoking activity in the area outside school toilets using an ESP32-Cam microcontroller. The research method used is Research and Development (R&D) with a V-Model approach covering the stages of requirement analysis, specification, system design, component design, coding, unit testing, integration testing, system testing, and acceptance testing. The system integrates an MQ-2 sensor to detect responses to smoke exposure, a PIR HC-SR501 sensor to detect object movement in order to minimize false alarms, and an LCD and buzzer as local warning media. A Telegram Bot is used as a remote notification medium in the form of text messages and image documentation. Integration testing results show 5 True Positive data, 15 True Negative data, 0 False Positive data, and 0 False Negative data from 20 tests limited to a mock-up environment, yielding a system accuracy of 100% and an error rate of 0%. The system successfully identified trigger conditions according to the test scenarios and sent notifications along with images to Telegram with an average delay of 9 seconds. In conclusion, this prototype was successfully designed and functions well in remotely detecting indications of smoking activity on the school toilet mock-up.

References

[1] N. Mufida and K. Isni, “Pengaruh Edukasi Bahaya Merokok Terhadap Tingkat Pengetahuan Masyarakat di Dusun Kandangan 02/03, Margodadi, Seyegan, Sleman,” vol. 4, no. 2, 2022.

[2] D. R. Napitu and Zamli, “Penyuluhan Bahaya Rokok Pada Remaja di Posyandu Remaja di Desa Wakan Kecamatan Amurang Barat,” vol. 1, no. 2, pp. 87–92, 2025.

[3] Z. A. Marhaeni and S. Sobaya, “Perilaku Konsumsi Rokok Remaja di Kabupaten Sleman,” vol. 3, no. 1, pp. 109–120, 2024.

[4] N. N. Salsabila, N. Indraswari, and B. Sujatmiko, “Gambaran Kebiasaan Merokok Di Indonesia Berdasarkan Indonesia Family Life Survey 5 (IFLS 5),” vol. 7, no. 1, p. 13, 2022.

[5] D. A. Wulandari, E. Maniari, E. N. Afifa, E. E. Marito, F. M. Indiyarto, and H. Subhandi Bakhtiar, “Efektivitas Larangan Merokok Terhadap Mahasiswa Fakultas Hukum UPN ‘Veteran’ Jakarta Angkatan 2022,” vol. 2, no. 3, p. 533, 2024.

[6] F. P. Hosana, A. A. Rumayar, and G. E. C. Korompis, “Pengetahuan dan Sikap Peserta Didik tentang Kebijakan Kawasan Tanpa Rokok di SMP Negeri 1 Bitung,” vol. 14, no. 3, pp. 112–120, 2025.

[7] F. Faoziah, Z. Zaenudin, and M. Masjun Efendi, “Alat Pendeteksi Asap Rokok Berbasis Internet of Things Pada Ruang Guru Mts Mamba’Ul Barokah Nw Borok,” Journal of Data Analytics, Information, and Computer Science, vol. 1, no. 4, pp. 223–231, 2024.

[8] I. Alexander Rombang, L. Bambang Setyawan, and G. Dewantoro, “Perancangan Prototipe Alat Deteksi Asap Rokok dengan Sistem Purifier Menggunakan Sensor MQ-135 dan MQ-2,” Universitas Kristen Satya Wacana, pp. 131–144, 2022.

[9] G. Oka Priyatna, A. Ulan Bani, and F. Nugroho, “Rancang Bangun Alat Pendeteksi Pelanggaran Siswa Berbasis IoT (Studi Kasus Pada Sekolah Menengah Kejuruan YAK 1 Kota Bogor),” pp. 668–674, 2025.

[10] S. Rahmat and F. Yanti, “Alat Pendeteksi Keberadaan Manusia Otomatis Berbasis Mikrokontroler Arduino Uno Dengan Menggunakan Sensor PIR (Passive Infrared),” vol. 2, no. 3, pp. 290–304, 2022.

[11] Okpatrioka, “Research and Development (R&D): Penelitian yang Inovatif dalam Pendidikan,” vol. 1, no. 1, 2023.

[12] A. Rahayu, “Metode Penelitian dan Pengembangan (R&D): Pengertian, Jenis dan Tahapan,” vol. 4, no. 3, pp. 459–470, 2025.

[13] P. S. Liu, J. Feng, C. Hasnida, A. Samat, and Z. Ping, “Digital Variant Design V-Model for Rapid Product Development,” pp. 2103–2121, 2025.

[14] A. F. Azmi and A. Voutama, “Prediksi Churn Nasabah Bank Menggunakan Klasifikasi Random Forest dan Decision Tree dengan Evaluasi Confusion Matrix,” Jurnal Ilmiah, vol. 13, no. 1, 2024.

Downloads

Published

2025-10-10

How to Cite

[1]
M. W. Iqbal, V. Oktaviani, and L. F. Fahmi, “Prototype of a Smoking Activity Detection Device for School Toilets Based on ESP32”, IJSMM, vol. 12, no. 1, pp. 334–338, Oct. 2025.