Summary of Password Based Door Lock System using 8051 Microcontroller
This article describes a password-based automatic door lock using an AT89C51 (8051) microcontroller, 4×3 keypad, LCD, relay, and DC motor. The system compares entered codes to a stored password, opens the door on a match (motor forward), waits, then reverses the motor to close; on mismatch it denies access. It covers hardware and software requirements, circuit design (power, reset, oscillator), coding and simulation steps, operation algorithm, advantages, applications, and limitations.Parts used in the Password Based Door Lock System:
- AT89C51 controller
- 8051 programming board
- Programming cable
- DC battery or 12V,1A adaptor
- 4×3 matrix keypad
- 16×2 LCD
- 5V Relay
- DC motor
- BC547 Transistor
- 10k resistor (1/4 watt)
- 330 Ω resistor (1/4 watt)
- 10uF electrolytic capacitor
- 33pF capacitors (2)
- 12MHz Crystal
- Pot 10k (1/4 watt)
- Connecting wires
Password Based Door Locking System Circuit Operation
Once the circuit is powered ON, microcontroller sends commands to the LCD to display “enter password” on LCD. Now we need to enter the password using the keypad. Once password is entered, it displays 5 stars on LCD to indicate that controller read password successfully.
Now the controller compares the entered password with predefined password. If the password is matched, then the microcontroller makes P0.0 HIGH and P0.1 LOW, so the motor driver gets the input signals for forward motion of the motor.
As a result, the Door Motor rotates in forward direction to open the door. After a delay of 10seconds, the microcontroller makes P0.0 LOW and P0.1 HIGH, so the motor driver gets the input signals for reverse motion. As a result, the Door motor rotates in reverse direction to close the door.
If the password is not matched, then microcontroller maintains both P0.0 and P0.1 LOW. Hence, the door motor is stationary so that door remains closed.
NOTE: While giving the connections, make sure that there is no common connection between AC and DC supplies.
Password Based Door Lock System Algorithm
- Initially, declare the PORT1 to LCD data pins and control pins (RS and E) to P3.0 and P3.2. Also, declare PORT2 to keypad. Also use P0.0 and P0.1 for motor driver.
- Then, display the message “enter password” on LCD.
- Now read the five digit password from the user.
- Compare the entered password with the stored password.
- If password is correct, then make P0.0 pin HIGH and P0.1 pin LOW to open the door. During this time, display “Door opening” on LCD.
- After some time, make P0.0 pin LOW and P0.1 pin HIGH to close the door and after this display “Door closing” on LCD.
- If the password is wrong, then display “Wrong Password” on LCD.
- After some delay again ask to enter password.
[Also Read:Adjustable Timer With Relay Output]
Advantages of Password Based Door Lock System
- This project provides security
- Power consumption is less
- Used commonly available components
- Project is simple and easy
Applications of Password Based Door Lock System
- This simple circuit can be used at residential places to ensure better safety.
- It can be used at organizations to ensure authorized access to highly secured places.
- With a slight modification this Project can be used to control the switching of loads through password.
Limitations of Password Based Door Lock System
- It is a low range circuit, i.e. it is not possible to operate the circuit remotely.
- If you forget the password it is not possible to open the door.
Quick Solutions to Questions related to Password Based Door Lock System:
- What microcontroller is used in the project?
The AT89C51 8051 microcontroller is used. - How is the user input provided?
User input is provided via a 4×3 matrix keypad. - How does the system indicate password entry on the LCD?
It displays five stars on the LCD to indicate the controller read the password. - What happens when the entered password matches the stored password?
The microcontroller makes P0.0 HIGH and P0.1 LOW to drive the motor forward to open the door, then reverses after a delay to close it. - What happens when the entered password is wrong?
The microcontroller keeps P0.0 and P0.1 LOW so the door motor remains stationary and displays Wrong Password on the LCD. - What power supply is recommended for the controller?
A regulated 5V DC supply is required, typically from a 7805 regulator fed by a 9V battery or 12V,1A adapter. - Which software tools are used for coding and simulation?
Keil uVision is used to write and compile code, Flash Magic for programming, and Proteus for simulation. - How is the reset circuit designed for the 89C51?
Reset uses an RC such that RC >= 100ms; the article selects a 10k resistor and 10uF capacitor. - What components form the oscillator circuit?
A 12MHz crystal with two ceramic capacitors (20pF to 40pF range) connected between pins 18 and 19 form the oscillator. - What are the main advantages of this project?
It provides security, low power consumption, uses commonly available components, and is simple to build.
Related projects
An Application-Driven Microcontroller Curriculum
Understanding how to apply microcontrollers lies at the core of modern embedded systems education. This student project takes an experiential approach to...
LED ProjectsBuild this microcontroller controlled rainbow flying disc – and then throw it!
Hello all and welcome to this super simple and inexpensive instructable. If you like throwing frisbees AND you like flashing lights AND...
LED ProjectsLED Scrolling Display Project Working With Circuit Diagram
We normally use a simple static LED display screen to convey a message. Earlier, when we want to display large data, we...
LED Projects8051 MICROCONTROLLER
8051 Microcontroller based electronic locker system CIRCUIT DESCRIPTION Security is a prime concern in our day-today life. Everyone wants to be as...
LED ProjectsDigital Temperature Sensor Circuit
Temperature sensors are widely used in electronic equipments to display the temperature. You can see the digital clock displaying the room temperature...
LED Projects · PIC16F67630 volts Panel Volt Meter Using PIC MCU
This is a simple application of internal 10-bit ADC(analog to digital converter) of PIC16F676 microcontroller.you can use this circuit to measure up...