The project below is related to the smart locker system, that me and my team built using Raspberry Pi, a Pi camera and real time face detection using Machine learning model like OpenCV, it also includes setting up hardware such as solenoid and relays to manage the locks. I also used Pi relay HAT which can manage multiple relays from a Single PI and fix the constraint of PINS in PI.
How the System Works (Step-by-Step)
1. System Initialization
When the Raspberry Pi boots, the application launches a fullscreen GUI interface. The camera module is initialized and GPIO pins are configured to control the electronic lock.2. User Registration > Admin logs in using a secure 6-digit PIN > New user is added through the GUI > System captures face images using Pi Camera > User name is entered using an on-screen keyboard > Captured face data is stored locally for recognition
3.Face Detection & Recognition
- Live camera continuously scans the environment
OpenCV processes frames in real-timeDetected faces are compared with stored datasetIf match confidence is high, user is verified
4. Access Control (Unlock Process) (a) If user is recognized: GPIO pin activates relay module Electronic lock is triggered Locker remains unlocked for 5 seconds Lock automatically re-engages after timeout
(b If user is not recognized: Access is denied System continues scanning
5. User ManagementAdmin can view all registered users Individual users can be deleted Database updates instantly without reboot
6. Security Layer Admin access is protected using 6-digit PIN authentication Only authorized admin can modify users Face dataset is stored locally (no cloud dependency)
Features
(a) Real-time face recognition system(b) Raspberry Pi Camera live streaming(c) Secure admin panel with PIN protection(d) User registration with face capture(e ) On-screen keyboard for input(f) User management (add/delete)(g) Auto unlock timer (5 seconds)(h) Fullscreen kiosk-style GUI(i) ESC key exit support
Hardware Requirements
Raspberry Pi 4 (recommended)Raspberry Pi Camera Module
- Relay / MOSFET driver moduleElectronic door lock12V external power supply
Software Requirements>> Python 3>> Raspberry Pi OS>> OpenCV>> Face recognition libraries>> RPi.GPIO or equivalent library
Applications
This system is suitable for: >> Smart lockers >> Office access control systems >> Lab security systems >> Personal secure storage >> Embedded biometric authentication setups
System Architecture (Summary)
Camera → Face Detection → Face Recognition Model → Verification → GPIO Trigger → Lock Control
Conclusion
This project shows how embedded vision and Raspberry Pi can be used to build a practical biometric access control system with minimal hardware and full local processing.
For scaling this system into production-grade solutions or customized industrial deployment, you can explore resources here: https://digitalmonk.biz/hire-raspberry-pi-developer/










Comments