Rancang Bangun Sistem Smart Door Lock Berbasis Finite State Machine (FSM) dan Internet Of Things (IoT) Menggunakan Mikrokontroler ESP32
Design and Implementation of a Smart Door Lock System Based on Finite State Machine (FSM) and Internet of Things (IoT) Using an ESP32 Microcontroller
Sistem pengamanan pintu konvensional masih memiliki berbagai kelemahan, seperti risiko kehilangan kunci, duplikasi kunci, serta keterbatasan dalam pemantauan akses secara real time. Oleh karena itu, penelitian ini bertujuan untuk merancang dan mengimplementasikan sistem smart door lock berbasis mikrokontroler ESP32 dengan penerapan metode Finite State Machine (FSM) dan notifikasi Telegram untuk meningkatkan keamanan akses pintu. Sistem yang dikembangkan menggunakan keypad 4×4 sebagai media autentikasi PIN, LCD 16×2 I2C sebagai media informasi, relay dan solenoid door lock sebagai aktuator pengunci pintu, buzzer sebagai indikator peringatan, serta Telegram sebagai media notifikasi jarak jauh berbasis Internet of Things (IoT). Metode FSM diterapkan untuk mengatur alur kerja sistem melalui 11 state, yaitu Idle, Input PIN, Verifikasi, Akses Diterima, Timer, Auto Lock, Akses Ditolak, Wrong Once, Lockout, Change PIN, dan Change Confirm. Pengujian dilakukan terhadap akurasi keypad, validasi PIN, waktu respons sistem, notifikasi Telegram, serta kinerja sistem secara keseluruhan. Hasil pengujian menunjukkan bahwa keypad memiliki tingkat akurasi pembacaan sebesar 100% dan validasi PIN berhasil membedakan PIN yang iii benar dan salah dengan tingkat akurasi 100%. Pengujian waktu respons menunjukkan rata-rata waktu pembukaan kunci sebesar 92,87 ms, waktu aktivasi buzzer sebesar 31,35 ms, dan waktu pengiriman notifikasi Telegram sebesar 1,56 detik. Selain itu, pengujian sistem secara keseluruhan menunjukkan tingkat keberhasilan sebesar 100%, di mana seluruh state dan transisi FSM dapat berjalan sesuai dengan rancangan. Berdasarkan hasil tersebut, dapat disimpulkan bahwa sistem smart door lock berbasis ESP32 dengan metode FSM berhasil diimplementasikan dan mampu bekerja secara cepat, stabil, responsif, serta efektif dalam meningkatkan keamanan akses pintu.
Conventional door security systems still have several limitations, such as the risk of key loss, key duplication, and the inability to monitor access in real time. Therefore, this study aims to design and implement a smart door lock system based on the ESP32 microcontroller using the Finite State Machine (FSM) method and Telegram notifications to enhance door access security. The developed system utilizes a 4×4 keypad for PIN authentication, a 16×2 I2C LCD for displaying information, a relay and solenoid door lock as the door locking mechanism, a buzzer as a warning indicator, and Telegram as a remote notification platform based on the Internet of Things (IoT). The FSM method is implemented to manage the system workflow through 11 states, namely Idle, Input PIN, Verification, Access Granted, Timer, Auto Lock, Access Denied, Wrong Once, Lockout, Change PIN, and Change Confirm. System evaluation was conducted through keypad accuracy testing, PIN validation testing, response time measurement, Telegram notification testing, and overall system performance testing. The results show that the keypad achieved a reading accuracy of 100%, while the PIN validation process successfully distinguished valid and invalid PINs with an accuracy of 100%. Response time testing revealed an average door v unlocking time of 92.87 ms, buzzer activation time of 31.35 ms, and Telegram notification delivery time of 1.56 seconds. Furthermore, the overall system testing demonstrated a success rate of 100%, with all FSM states and state transitions operating according to the designed workflow. Based on these results, it can be concluded that the ESP32-based smart door lock system utilizing the FSM method was successfully implemented and is capable of operating quickly, reliably, responsively, and effectively in improving door access security.