As theft is increasing day by day, security is becoming a major concern. In this project, we will make a digital door lock system with keypad using an Arduino Uno. It will open your door only when the right password (*#C9) is entered and it will start beeping for a wrong password.
Project Overview
The "Sentinel-Strike Digital Deadbolt" is a robust physical security implementation that combines Digital Authentication with high-torque mechanical actuation. Utilizing a 4x4 Matrix Keypad as the primary Human-Machine Interface (HMI) and an Arduino UNO as the central logic controller, this system manages the movement of a Tower Pro MG996R servo. Unlike basic prototypes, this system provides multi-sensory feedback via a 16x2 LCD for instructions and an Active Piezo Buzzer for auditory alert states, creating a complete security gateway solution for residential or laboratory doors.
Technical Deep-Dive
- High-Torque Actuation (MG996R):
- Stall Torque Management: The MG996R is chosen specifically for its metal-gear construction and high stall torque (up to 11kg/cm). This is critical for driving a physical deadbolt mechanism, which may encounter friction or misalignment.
- PWM Pulse Train: The Arduino’s
Servo.hlibrary generates a 50Hz PWM signal. The duty cycle is precisely mapped to angular positions (e.g., 0° for "Locked" and 90° for "Unlocked"), ensuring consistent mechanical repeatability.
- Multi-Stage Password Validation:
- String Persistence: The system uses a predefined "Secret Key" (
*#C9). As the user inputs characters, the firmware stores them in a dynamic character array. - Comparison Logic: Upon reaching the final character, the Arduino performs a bitwise comparison. A match triggers the
servo.write()routine, while a mismatch triggers an Error State, activating the Red LED and a rhythmic "Beep" sequence on the buzzer.
- String Persistence: The system uses a predefined "Secret Key" (
- Visual Interface Logic (16x2 LCD):
- Real-Time Status Prompting: The LCD provides critical UX feedback, such as "Enter Password," "Access Granted," or "Wrong Password! Try Again." This reduces user error and provides a professional feel to the hardware interface.
- I2C/Parallel Interfacing: The project utilizes the standard 4-bit parallel interface or an I2C backpack to minimize the pin count, ensuring enough I/O remains for the 8 pins required by the 4x4 keypad matrix.
- Security State Machine:
- The firmware is designed as a Finite State Machine (FSM). It transitions between
IDLE,INPUT,VERIFYING, andACTUATING. This architecture ensures that if the user stops typing mid-password, the system can implement a Timeout Reset, clearing the buffer for the next attempt.
- The firmware is designed as a Finite State Machine (FSM). It transitions between
Engineering & Construction
- Current Draw Protection: One of the most important engineering details in this build is the power source. Because the MG996R can draw over 1A of current during high-torque movements, the project emphasizes using an External 5V/2A DC Power Supply rather than drawing power directly from the Arduino’s pin, which would cause a brownout-reset.
- Hardware Debouncing: Keypad membranes are prone to "Ghosting." The implementation uses the
Keypad.hlibrary's integrated debouncing logic, which ignores rapid electrical transitions (0-5ms) to ensure only intentional keypresses are registered. - Mechanical Integrity: The deadbolt attachment is decoupled from the servo horn using a small linkage. This protects the servo's internal gears from being sheared if the door is forced open, providing a "Mechanical Fuse" layer to the system security.
- Future Resilience: The architecture is ready for Biometric Integration. By replacing the keypad logic with an R307 fingerprint sensor or an RFID module, the same MG996R actuation logic can be scaled for more advanced non-contact entry systems.