ABSTRACT
The IoT-Enabled Smart Door Access Control System is a face-recognition-based security system designed to automate door entry through face recognition and liveness detection. Traditional locks that use keys, PINs or RFID cards can be lost, shared, copied or stolen, and they cannot confirm who is actually standing at the door. The proposed system uses a webcam connected to a PC running a Flask server. The MTCNN algorithm detects the face, and a FaceNet model (InceptionResnetV1 pretrained on VGGFace2) generates a 512-dimensional embedding that is compared with the embeddings of registered users.
A 5-second passive liveness check using MediaPipe FaceMesh and the Eye Aspect Ratio (EAR) confirms that a real person is present by detecting a blink. When both the face recognition and the liveness checks pass, the server sends an open command (door=1) to a cloud API, and an automatic close command (door=0) follows after 5 seconds. If either check fails, the door remains closed and the attempt is recorded as denied.
An ESP32 microcontroller polls the cloud API every 2 seconds and drives a relay connected to a 12V solenoid lock, while a 16x2 I2C LCD shows the door status as OPEN or CLOSE. Every attempt, granted or denied, is saved together with a snapshot in an SQLite database, giving a complete audit trail. Any failure of the camera, network or API keeps the door closed.
The proposed system provides a low-cost, contactless, auditable and fail-safe access control solution. It can be applied in homes, offices, laboratories, server rooms, hostels, hospitals and other restricted areas. Overall, the project demonstrates how artificial intelligence, embedded systems and IoT communication can be integrated to create a practical smart security system.
INTRODUCTION
Door security is essential for homes, offices, laboratories, hostels and server rooms. Conventional mechanical locks, keypads and RFID cards depend on something the user carries or remembers, which can be lost, shared or duplicated. Biometric authentication using the face removes this dependency because the face is always with the user. However, simple face recognition systems can be fooled by a printed photograph or a phone screen, so liveness detection is needed to confirm that a real person is present.
The IoT-Enabled Smart Door Access Control System combines deep-learning face recognition, blink-based liveness detection and an IoT-connected lock. A Flask web application running on a PC handles user registration, door access and the database view. During registration, 10 face samples are captured for each user and their embeddings are stored. During access, the system runs a 5-second verification and grants access only if the face matches a registered user and a live blink is detected.
The access decision is sent through an internet API. An ESP32 microcontroller reads the command from the API and switches a relay that operates the 12V solenoid lock. A 16x2 I2C LCD displays the current door status. A server-side timer closes the door automatically 5 seconds after it is opened.
The system follows a fail-safe principle. If the camera cannot be opened, the verification is interrupted, the Wi-Fi connection is lost or the API fails, the door remains closed. In addition, every access attempt is logged in an SQLite database with the person’s name, result, reason and a snapshot, so that the administrator can review the complete access history.
The main objective of this project is to demonstrate a practical method of controlling a door lock using face recognition with anti-spoofing protection and IoT communication. The system combines computer vision, deep learning, web development, cloud communication and embedded programming. Such a system can serve as a useful prototype for secure access control in homes, institutions and industries.
Similar projects you might like