A
Mini Project Report
                           on
PASSWORD BASED DOOR LOCK
     SYSTEM USING 8051
    MICROCONTROLLER
          MICROCONTROLLER AND APPLICATIONS
                    Submitted by:
             Nikhil Ambekar    (Roll No. 01)
             Aniket Chavan     (Roll No. 02)
             Ruchi Gautam      (Roll No. 05)
                Under the guidance of
                Ms. Swati Choudhary
        DEPARTMENT OF ELECTRONICS ENGINEERING
LOKMANYA TILAK COLLEGE OF ENGINEERING NAVI MUMBAI
                                                    1
                                   CERTIFICATE
This is to certify that Nikhil Ambekar, Ruchi Gautam & Aniket Chavan have submitted a
report for Mini Project on “PASSWORD BASED DOOR LOCK SYSTEM USING 8051
MICROCONTROLLER” on _____/_____/____ in the Department of Electronics
Engineering, Lokmanya Tilak College of Engineering, Navi Mumbai for the Third Year
Semester V for the year 2018-19.
Ms. Swati Choudhary                                                External Examiner
(Project Guide)
                                                                                   2
                           ACKNOWLEDGEMENT
We would like to acknowledge and extend our heartfelt gratitude to all those people who
have been associated with this Project and have helped us with it thus making it a worthwhile
experience.
Firstly, we extend our thanks to various people who includes our project Guide Ms. Swati
Choudhary who has shared her opinions and experience through which we have received the
required information which is crucial for our project synopsis. I am also thankful to Head of
Department Prof. Sheeba P.S and all the staff members of Electronics Department for their
highly co-operative and encouraging attitudes, which have always boosted us.
                                                                                           3
                    CERTIFICATE OF APPROVAL
PROJECT ENTITLED: PASSWORD BASED DOOR LOCK SYSTEM
SUBMITTED BY:
    Sr. No.       Roll no.       Name                Sign
      1             01       Nikhil Ambekar
      2             02       Aniket Chavan
      4             05       Ruchi Gautam
Project Guide                                   Head Of Department
(Ms. Swati Choudhary)                           (Dr. Sheeba P.S.)
                                                                    4
                            TABLE OF CONTENTS
    Sr.No.                             Topic    Page.No.
             Abstract                              6
1            Introduction                          7
2            Hardware Description                 8-10
    2.1      Circuit Diagram                       8
    2.2      Circuit Description                   9
    2.3      Working                              10
3            Component List                       11
4            PCB Layout                           12
5            PCB Designing                        13
6            Advantages                           14
7            Applications                         14
8            Conclusion                           15
9            Snapshot of Miniproject              16
10           BIBLIOGRAPHY                         17
                                                           5
                                     ABSTRACT
Traditional lock systems using mechanical lock and key mechanism are being replaced by
new advanced techniques of locking system. These techniques are an integration of
mechanical and electronic devices and are highly intelligent. One of the prominent features of
these innovative lock systems is their simplicity and high efficiency. Such an automatic lock
system consists of electronic control assembly, which controls the output load through a
password. This output load can be a motor or a lamp or any other mechanical/electrical load.
Here, we developed an electronic code lock system using 8051 microcontroller (a Password
based Door Lock System using 8051 Microcontroller), which provides control to the
actuating the load. It is a simple embedded system with input from the keyboard and the
output being actuated accordingly.
                                                                                            6
                               1. INTRODUCTION
In the present scenario of the world, security is a major concern for all, and the security
problem is being faced by every person. The usual means of securing anything is through
mechanical locks, which operate with a specific key or a few keys; but, for locking a large
area many locks are necessary. However, conventional locks are heavy and do not offer the
desired protection as they can be easily broken down by using some tools. Therefore, security
breaching problems are associated with the mechanical locks. Nowadays, many devices’
operations are based on digital technology. For example, digital based door lock systems for
auto door opening and closing, token-based-digital-identity devices are all based on digital
technology. These locking systems are controlled by a keypad and are installed at the side
hedge of the door. Here, intelligent electronic security lock system offers freedom from
physical and mental stress faced by a person while moving away from their home.
This system demonstrates a Password based Door Lock System using 8051 Microcontroller,
wherein once the correct code or password is entered, the door is opened and the concerned
person is allowed access to the secured area. Again, if another person arrives, it will ask to
enter the password. If the password is wrong, then door would remain closed, denying access
to the person.
                                                                                            7
                      2. HARDWARE DESCRIPTION
CIRCUIT DIAGRAM
Password based door lock system using 8051 microcontroller circuit design uses five major
components – a Microcontroller, an L293D Motor Driver, a DC Motor, a 4×4 Matrix Keypad
and a 16×2 LCD. Here, an AT89C52 Microcontroller is used and it is an 8-bit controller.
The Circuit Diagram of password based door lock system is as shown below:
                                                                                        8
CIRCUIT DESIGNING
Reset Circuit Design: The reset pin of the microcontroller is kept active till the power
supply is in the specified range and a minimum oscillation level is maintained. In other
words to ensure the supply voltage does not falls below the threshold level of 1.2V and the
reset pulse width is greater than 100ms (recommended for 89C52), we need to select the
values of resistor and capacitor such that RC >=100ms. Hence, we selected a 10KΩ resistor
and a 10µF electrolytic capacitor.
Oscillator Circuit Design: An 11.0592MHz crystal oscillator is used to provide external
clock signal to the microcontroller. To ensure smooth operation, we need to connect two
ceramic capacitors in the range of 30pF to 40pF. This crystal oscillator is connected between
pin 18 and 19 of the microcontroller. Here, we used two 33pF capacitors.
Interfacing LCD, Keypad and Motor Driver: First, a 10KΩ Potentiometer is connected to
the LCD Display’s Contrast Adjust Pin (Pin 3). RS, RW and E of LCD are connected to P3.0,
GND and P3.2 pins respectively. The eight data lines of the LCD are connected to PORT1.
The four ROW pins of the Keypad are connected to P2.0 to P2.3 and the four COLUMN pins
of the Keypad are connected to P2.4 to P2.7 pins respectively. The IN1 and IN2 of (1A and
2A) of the L293D Motor Driver are connected to PORT0 pins P0.0 and P0.1. Motor is
connected between OUT1 and OUT2 (1Y and 2Y) pins of L293D.
                                                                                              9
WORKING
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.
ALGORITHM:
1. 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.
2. Then, display the message “enter password” on LCD.
3. Now read the five digit password from the user.
4. Compare the entered password with the stored password.
5. 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.
6. 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.
7. If the password is wrong, then display “Wrong Password” on LCD.
8. After some delay again ask to enter password.
                                                                                              10
                              3. COMPONENT LIST
1. 8051 Microcontroller
2. PCB board
3. 4×4 Matrix Keypad
4. 16×2 LCD
5. L293D Motor Driver Board
6. DC Motor
7. 10KΩ Potentiometer
8. Connecting wires
9. Power Supply
10. 11.0592 MHz Quartz Crystal
11. 2 x 33pF Ceramic Capacitors
12. 2 x 10 KΩ Resistor (1/4 Watt)
13. 10 µF Capacitor (Polarized)
14. 2 x 1 KΩ Resistors (for pull up)
                                                  11
                                   4. PCB LAYOUT
1. First design your circuit in Proteus ISIS
2. After you got sure that your circuit is perfect and ready for designing, then click on the
Tools and then Netlist to ARES.
3. After clicking, Proteus ARES will be opened.
Now in Proteus ARES, select the block option from left toolbar and also make sure that you
selected Board Edge in the below drop down menu.
4. Now make a rectangular block in the workspace, this block is actually the boundary of
your PCB. You can set its proper dimensions and can also re-size it manually using the
mouse.
5. Now select the component option from the left toolbar, it will show all the components
used in your circuit.
6. Place all these components in the workspace one by one.
7. Using the circuit, it gives us the routes automatically and we don’t need to panic any more
just need to follow these route, if we are doing manually routing.
8. To do auto routing, click on Tools and then Auto Router and a property box will open
where you can set many different option for routing like the width of route and the PCB
layers etc.
9. After selecting your properties just click on Begin Routing.
And then a magic will start and you PCB will become ready.
                                                                                           12
                                 5. PCB DESIGNING
Step1: Design the PCB circuit with a Software
Draw the schematic circuit diagram with the PCB layout software such as Proteus, CAD
software, Eagle and Multisim software. Here we have selected Proteus software to design the
circuit.
Step2: Film generation
The film is generated from the finalized circuit board diagram of the PCB layout software
which is send to the manufacturing unit where the negative image or mask is printed out on a
plastic sheet.
Step3: Select Raw Material
The bulk of the printed circuit board is made with an unbreakable glass or fiberglass having
copper foil bonded unto one or both the sides of the board. Thus, the PCBs made from
unbreakable paper phenolic with a bonded copper foil are less expensive and are often used
in household electrical devices.
Mostly 0.059 industry standard thick, copper clad laminate, either single or double sided
board is required.
Step4: Preparing Drill Holes
Machines and carbide drills are used to put holes on the printed circuit board. There are two
types of machines available to drill the PCBs; they include hand machines and CNC
machines. The hand machines require human intervention or effort to drill the holes, whereas
CNC machines are computer-based machines that work-based on the machine timetables or
programs that run both automatic as well as manually. The drilled pattern is stored in the
computer like drill bit sizes, number of holes per panel, drilled stack, drilled time per load,
etc.
Step5: Apply Image
The printed circuit layout can be printed in different ways on PCBs like manual pen, dry
transfers, pen plotters and printers. The laser printers are a better way to print the layouts on
printed circuit boards. The following steps are used to print the PCB layout through a laser
printer:
Step6: Stripping and Etching
This process involves removing the unwired copper on the PCBs by using different types of
chemicals like ferric chloride, ammonium per-sulphate, etc. Make the solvent by mixing 1%
of sodium hydroxide and 10 grams of sodium hydroxide pellets to one liter of water and mix
it until everything is dissolved. Next, the PCB is put on a chemical bowl and cleaned up with
a brush. during this process, if the PCB is still greasy, due to applied sunflower or seed oil,
the developing process may take about 1 minute.
                                                                                              13
                             6. ADVANTAGES
   This project provides security
   Power consumption is less
   Used commonly available components
   Project is simple and easy
                            7. APPLICATIONS
 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.
                                                                                          14
                                 8. CONCLUSION
Password based door lock system is used in the places where we need more security. It can
also used to secure lockers and other protective doors. The system comprises a number
keypad and the keypads are connected to the 8 bit microcontroller AT89S52. The
microcontroller continuously monitor the keypad and if somebody enters the password it will
check the entered password with the password which was stored in the memory and if it they
are same then the microcontroller will switch on the corresponding device. The system will
allow the person who knows the password and it will not allow who don’t know the password.
For future improvements we can add fingerprint sensor so entry will be allowed for the
authorized person using their fingerprints. We can add fire, wind and LPG sensors so that in
case of accident, the doors will automatically open.
                                                                                         15
9. SNAPSHOT OF MINI PROJECT
                              16
                         10. BIBLIOGRAPHY
 www.atmel.com
 www.electronicshub.org
 www.keil.com
 http://www.edgefxkits.com/remote-password- operated-load-control-by-android-
  applications
 http://www.edgefxkits.com/password-based-circuit- breaker
 https://www.elprocus.com/password-based-electronic-lock-system/
                                                                                 17