ESP32-CAM Face Recognition Door Lock Using Relay and 12V Solenoid Lock
Project Overview
The ESP32-CAM Face Recognition Door Lock System is a smart security project that uses AI-based face recognition to control a 12V solenoid door lock. When the camera detects and recognizes an authorized face, the system activates a 1-channel relay module, which powers the solenoid lock and unlocks the door automatically.
This project demonstrates how computer vision, IoT hardware, and embedded systems can be combined to build a secure smart door access system. It is an excellent Arduino and IoT project for students, makers, and smart home enthusiasts.
The system uses the ESP32-CAM module for image processing and face detection. Once a registered face is recognized, the microcontroller sends a signal through GPIO4 to trigger the relay module. The relay then completes the circuit of the 12V battery and solenoid lock, allowing the door to unlock.
Components Required
-
ESP32-CAM Module
-
FTDI Programmer (for uploading code)
-
1-Channel Relay Module
-
12V Solenoid Door Lock
-
12V Battery / Power Supply
-
Jumper Wires
-
Breadboard (optional)
Circuit Description
The ESP32-CAM acts as the main controller of the system.
Connections:
Relay Module → ESP32-CAM
-
VCC → 5V
-
GND → GND
-
IN → GPIO4
Solenoid Lock → Relay
-
COM → Battery Negative
-
NO → Solenoid Lock Negative
Power Connections
-
Solenoid Lock Positive → Battery Positive
When the relay receives a HIGH signal from GPIO4, the relay closes the circuit, powering the solenoid lock and unlocking the door.
Code:
Working Principle
-
The ESP32-CAM camera continuously scans for faces.
-
The system compares the detected face with the stored database of authorized faces.
-
If a recognized face is detected:
-
GPIO4 goes HIGH.
-
The relay module activates.
-
The 12V solenoid lock opens the door.
-
-
If the face is not recognized, the relay remains OFF and the door stays locked.
This setup provides a contactless and secure authentication system.
Key Features
Applications
-
Smart Home Security Systems
-
Office Access Control
-
School Laboratory Entry Systems
-
Hostel / Dormitory Security
-
Smart IoT Door Locks
Comments
Post a Comment