Design of Smart Home Security System Based on the Esp32 Microcontroller and the Internet of Things

Authors

  • M. Aldi Setiawan UNIVERSITAS ISLAM LAMONGAN
  • Arief Budi Laksono Universitas Islam Lamongan
  • Rifky Aisyatul Faroh Universitas Islam Lamongan
  • Ulul Ilmi Universitas Islam Lamongan

DOI:

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

Keywords:

ESP32, IoT, MQ-2 Sensor, Mamdani Fuzzy Logic

Abstract

Home security requires an automated system capable of protecting occupants from burglary and gas leakage hazards. This study aims to design and develop a Smart Home security system based on the ESP32 microcontroller and the Internet of Things (IoT) by implementing the Mamdani fuzzy logic method to determine gas leakage conditions. The research employed an experimental approach consisting of system design, implementation, functional testing, and integration testing. The proposed system integrates an ESP32 as the main controller, RFID and keypad for dual authentication, an MQ-2 sensor for gas detection, a servo motor for door locking, a buzzer as an alarm, and the MQTT protocol for smartphone-based monitoring. The test results indicate that all system components functioned as intended. The MQ-2 sensor successfully detected gas leakage and processed gas concentration data using Mamdani fuzzy logic to produce adaptive gas condition decisions, while MQTT enabled real-time system monitoring. The developed system effectively enhances door access security and provides early detection of potential gas leaks.

Downloads

Download data is not yet available.

References

A. B. Laksono, “Sistem Smarthome Menggunakan Aplikasi Smartphone Android Berbasis Mikrokontroller Melalui Bluetooth,” 2019.

A. Bachri, A. B. Laksono, and B. Adams, “Design and Build an IoT-Based 3-Phase Electric Motor Protection System,” JEEMECS (Journal of Electrical Engineering, Mechatronic and Computer Science), vol. 8, no. 1, pp. 1–16, 2025, [Online]. Available: http://jurnal.unmer.ac.id/index.php/jeemecs

A. Bachri, A. B. Laksono, and A. M. Abdillah, “Rancang Bangun Smart Inverter dan ATS Tenaga Panel Surya Berbasis Internet of Things (IoT),” JASIEK (Jurnal Aplikasi Sains, Informasi, Elektronika dan Komputer), vol. 6, no. 1, pp. 23–32, Jun. 2024, doi: 10.26905/jasiek.v6i1.11169.

G. Vardakis, G. Hatzivasilis, E. Koutsaki, and N. Papadakis, “Review of Smart-Home Security Using the Internet of Things,” Electronics (Basel)., vol. 13, no. 16, Aug. 2024, doi: 10.3390/electronics13163343.

A. Leo, A. Azis, and Emidiana, “Kunci Pintu Otomatis Mengunakan Rfid,” Jurnal Ampere, vol. 6, no. 1, 2021, doi: 10.31851/ampere.

I. P. Sari, A. H. Hazidar, M. Basri, F. Ramadhani, and A. A. Manurung, “Penerapan Palang Pintu Otomatis Jarak Jauh Berbasis RFID di Perumahan,” Blend Sains Jurnal Teknik, vol. 2, no. 1, pp. 16–25, May 2023, doi: 10.56211/blendsains.v2i1.246.

N. Amalia and Muhammad, “Rancang Bangun Sistem Keamanan Pintu Menggunakan Modul RFID Berbasis IoT,” Jurnal Sains dan Teknologi, vol. 1, no. 2, 2024, [Online]. Available: https://jurnal.komputasi.org/index.php/jst/article/view/20/

S. K. Risandriya and F. Marbun, “Developmant of Gas Hazard Environment Prediction Based on Fuzzy-KNN and MQ2 Sensor in Microcontroller,” Journal of Telecommunication Network, vol. 16, no. 2, 2026.

N. M. Egi, S. Karim, and Suswanto, “Sistem Deteksi Kebocoran Gas Lpg Menggunakan Wemos D1 R1 Dengan Sensor MQ-2,” Antivirus : Jurnal Ilmiah Teknik Informatika, vol. 16, no. 2, pp. 190–199, Nov. 2022, doi: 10.35457/antivirus.v16i2.2404.

M. Y. Laksono and D. Febriawan, “Perancangan dan Implementasi Sistem Smart Regulator Berbasis Internet of Things untuk Deteksi Kebocoran Gas LPG,” 2025. [Online]. Available: https://djournals.com/jieee

M. Khatami, A. Sujatmiko, and A. Asrori, “An Analysis of Emissions Exhaust Gas on 4-Stroke Engine Based on Iot Gas Analyzer,” Journal of Engineering Design and Technology 104 Journal of Engineering Design and Technology, vol. 23, no. 2, pp. 104–110, 2023, [Online]. Available: http://ojs2.pnb.ac.id/index.php/LOGIC

Popy Vitria Eviolina, Yudi Kristyawan, and Edi prihartono, “Sistem Deteksi Kebocoran Gas LPG Berbasis Arduino di Universitas Dr. Soetomo Surabaya,” Router : Jurnal Teknik Informatika dan Terapan, vol. 3, no. 2, pp. 184–196, Jun. 2025, doi: 10.62951/router.v3i2.620.

H. Purwanto, A. N. Putra, D. F. Shiddieq, and T. Wiharko, “Alat Deteksi Kebocoran Gas Menggunakan Sensor MQ-2 Berbasis Arduino Uno,” Smart Comp: Jurnalnya Orang Pintar Komputer, vol. 13, no. 1, Jan. 2024, doi: 10.30591/smartcomp.v13i1.4976.

R. A. Faroh, S. Nabilah, N. A. Affandy, N. Nafi’iyah, and M. Said, “Analisis peramalan data kekeringan lahan pertanian di kabupaten lamongan menggunakan metode Fuzzy Time Series-Markov Chain,” AKSIOMA: Jurnal Matematika dan Pendidikan Matematika, vol. 16, no. 2`, pp. 305–318, Sep. 2025, doi: 10.26877/bd1eqb34.

U. Ilmi and Rifky Aisyatul Faroh, “A Study of Mathematical Problems as Control Agents in the Industrial Sector,” Sainmatika: Jurnal Ilmiah Matematika dan Ilmu Pengetahuan Alam, vol. 21, no. 2, pp. 170–184, Dec. 2024, doi: 10.31851/sainmatika.v21i2.16282.

M. Z. Arif and R. P. Astutik, “Sistem Pendeteksi Kebocoran Gas pada LPG dan Suhu Ruangan Berbasis Protokol MQTT Menggunakan Metode Fuzzy Logic Gas Leak Detection System in LPG and Room Temperature Based on MQTT Protocol Using Fuzzy Logic Method,” 2024. [Online]. Available: http://jurnalnasional.ump.ac.id/index.php/JRRE

C. Austin, M. Mulyadi, and S. Octaviani, “Implementasi IoT dengan ESP 32 Untuk Pemantauan Kondisi Suhu Secara Jarak Jauh Menggunakan MQTT Pada AWS,” Jurnal Elektro, vol. 15, no. 2, 2022.

A. B. Laksono, “Rancang Bangun Sistem Pemberi Pakan Ayam Serta Monitoring Suhu dan Kelembaban Kandang Berbasis Atmega328,” JE-Unisla, 2017, doi: https://doi.org/10.30736/je.v2i2.86.

“Keputusan Direktur Jenderal Pembinaan Pengawasan Ketenagakerjaan.”

S. A. Arrahma and R. Mukhaiyar, “Pengujian Esp32-Cam Berbasis Mikrokontroler ESP32,” JTEIN: Jurnal Teknik Elektro Indonesia, vol. 4, no. 1, pp. 60–66, Feb. 2023, doi: 10.24036/jtein.v4i1.347.

U. Ilmi, “Rancang Bangun Alat Penghitung Bibit Ikan Mujair Otomatis Berbasis Mikrokontroler,” JE-Unisla, vol. 4, no. 2, p. 283, 2019, doi: https://doi.org/10.30736/je.v4i2.382.

P. Suwarno and I. Suharjo, “Rancangan Bangun Smart Home Untuk Deteksi Dini Kebakaran Mengunakan Mikrokontroler Berbasis Android,” JISAI (Jurnal Information System & Artifical Intelligence, 2022, doi: https://doi.org/10.26486/jisai.v3i1.94.

Downloads

Published

2026-10-15

How to Cite

Setiawan, M. A., Arief Budi Laksono, Rifky Aisyatul Faroh, & Ulul Ilmi. (2026). Design of Smart Home Security System Based on the Esp32 Microcontroller and the Internet of Things. Journal of Artificial Intelligence and Engineering Applications (JAIEA), 6(1), 1487–1495. https://doi.org/10.59934/jaiea.v6i1.3008