Welcome to VLock+, a personal home automation project designed, developed, and deployed by Aniket Chowdhury (Hashtag).
This project automates door locking/unlocking using a servo-controlled mechanism with multiple control options, including buttons and a remote keypad system, and includes advanced features like passcode entry, LCD display, and fault safety handling.
VLock+ is a smart door lock system that allows secure access using:
- Keypad passcode entry with secret admin features.
- Manual override buttons.
- Door handle button for unlocking.
- An LCD for visual interface and interaction.
- Safety features including manual reset and retry mechanism if door fails to close.
- Permanent Passcode Storage โ passcode is saved in EEPROM and persists even after power loss.
- Self-initializing EEPROM โ first boot automatically stores default passcode if EEPROM is blank.
The project is installed in my personal room and is built with modular expansion in mind, with a secondary Nano board handling keypad input over serial.
- ๐ Secure Lock/Unlock using 6-digit Passcode
- โป Passcode Change Mode with Secret Admin Code
- ๐พ EEPROM Passcode Storage โ saves any changed passcode permanently until updated again
- ๐ก Automatic EEPROM Initialization with default passcode on first boot
- ๐ก Backlight Toggle on LCD via Keypad
- ๐ Manual Reset Button (hidden for safety)
- ๐๏ธ Multi-Button Unlock from different positions
- ๐ช Servo-controlled Door Mechanism
- ๐ Auto Retry if door fails to close properly
- ๐ Soft Restart functionality via keypad
- ๐ Buzzer Feedback for all actions and alerts
- ๐ Relay Trigger (Solenoid) Control for enhanced locking
- ๐ง Smart UI Timeout and Override Logic
| Component | Description |
|---|---|
| Arduino UNO | Main controller board |
| Arduino Nano | Secondary board (keypad input via Serial) |
| 20x4 I2C LCD | Display for passcode UI and system feedback |
| Servo Motor | Controls door lock mechanism |
| Buzzer | Audio feedback |
| Relay Module | Controls solenoid or magnetic lock |
| Keypad (4x4) | External keypad for passcode entry |
| Buttons | Multiple buttons for manual unlock |
| Hinge Switch (BTN) | Safety sensor to confirm door closure |
| LEDs (Red/Green/Blue) | Status indicators |
| EEPROM | Non-volatile memory to store passcode |
- Main Passcode:
123456(stored in EEPROM after first boot) - Change Passcode Code:
#1234#
setup(): Initializes all hardware components, loads passcode from EEPROM (or sets default on first boot), and starts UI.loop(): Main execution loop to listen for keypad input and button presses.keypad(): Handles all key inputs and UI logic.unlocking(): Validates passcode and handles passcode change flow.door_open()/door_close(): Controls servo and relay for door operations.CheckDoorSafety(): Ensures door is physically closed and retries if not.keygen(): Receives keypad input via SoftwareSerial from Nano.debounceButton(): Safe button press handler with long press detection.homescreen()/startup(): Display UI management.warningBuzz()/RestartBuzz(): Buzzer alerts for feedback.loadOrInitPasscode(): Loads saved passcode from EEPROM, or initializes it with default on first boot.savePasscodeToEEPROM(): Updates stored passcode without overwriting unchanged data.
| Key | Action |
|---|---|
| A | Lock the door |
| B | Unlock (asks for passcode) |
| C | Toggle LCD backlight |
| D | Restart system (only when open) |
| #1234# | Initiate passcode change mode |
- EEPROM corruption prevention โ passcode updates use
EEPROM.update()to avoid unnecessary wear. - Manual Reset Button is hidden behind door panel.
- Retry Mechanism: If the hinge switch doesnโt confirm door closure, the system retries up to 3 times.
- Timeout: UI auto-closes passcode input after 60 seconds.
- Override: Unlock button can bypass passcode in emergencies.
- Upload this code to Arduino UNO.
- Upload Nano Keypad Code to your Nano board.
- Wire the Nano to UNO via SoftwareSerial (Nano TX โ UNO RX D2).
- Connect components as per the pin definitions in the code.
- On first boot, the default passcode will be automatically saved to EEPROM.
- Power up and observe startup melody + door auto-unlock on boot.
- Use keypad to lock/unlock and test passcode change โ new codes are stored permanently in EEPROM.
๐จ Name: Aniket Chowdhury (aka Hashtag)
๐ง Email: micro.aniket@gmail.com
๐ผ LinkedIn: itzz-hashtag
๐ GitHub: itzzhashtag
๐ธ Instagram: @itzz_hashtag
This project is released under a Modified MIT License. It is intended for personal and non-commercial use only.
๐ซ Commercial use or distribution for profit is not permitted without prior written permission. ๐ค For collaboration, reuse, or licensing inquiries, please contact the author.
This is a solo passion project, built with countless nights of tinkering, testing, and debugging.
If you find it useful or inspiring, feel free to โญ the repository or connect with me on social media!
โIf the mind can create, the hands can translate.โ โ Hashtag