

Features
- Solenoid Door Lock Mechanism
- Unlocks only when all authentication stages are completed successfully.
- 5-Tier Authentication Sequence
- Passcode input (keypad)
- RFID tag authentication
- Fingerprint biometric verification
- Email OTP, OTP is sent via Gmail to the registered Gmail
- Google Authenticator Time-Based OTP (TOTP)
- Admin Mode
- Special bypass mode with admin passcode + admin fingerprint
- Ability to add/register new fingerprints
- User Mode (Layered)
- Complete verification sequence enforced
Components Used
- ESP32, Microcontroller handling entire authentication logic
- Solenoid Lock + Relay, Door locking mechanism
- Keypad, Passcode input
- RFID Reader Module, Layer 2 authentication
- Fingerprint Sensor, Biometric scan
- Buzzer, Status alerts / feedback
- OLED , Shows verification progress
- Wi-Fi + Gmail SMTP, Sends OTP via email
- Google Authenticator API (TOTP), Final authentication layer
How it Works
- User enters passcode → If correct, move to RFID
- User scans RFID card/tag
- User gives fingerprint scan
- ESP32 generates an OTP and sends it via Gmail
- (Email → Gmail inbox of authorized user)
- User enters Google Authenticator TOTP
- If all layers verified → Relay activates solenoid → Door unlocks
- If any layer fails → System resets → Access denied
- Gmail OTP + Google Authenticator TOTP makes the system resistant to brute-force attacks.
Media Availability (Important Note)
This project was built a long time ago.
There are very limited photos/videos of the working system
Working
Old working Clip1 (Insta Story)
Old working Clip2 (Insta Story)
Old working Clip3 (Github)
Circuit

Circuit Diagram
Code & Installation
The complete source code is available in the GitHub repository.
My Learnings
- Integrating multiple authentication modules into a single access control system
- Implementing Gmail SMTP email OTP sending directly from ESP32
- Using Google Authenticator TOTP with secret key handling
- Working with secured credentials and preventing exposure in code
- Designing a multi-stage state machine that controls the authentication flow
- Managing relay-driven solenoid lock circuits while maintaining electrical isolation
- Admin privilege system: bypass authentication + add new fingerprints
