0% found this document useful (0 votes)
90 views

14 Password Based Door Lock System Using 8051 Microcontroller - Compress

This document provides a project report for a password-based door lock system using an 8051 microcontroller. The system allows only authorized persons to access restricted areas by entering a password at a 4x4 keypad. The password is stored in EPROM and can be changed. If an incorrect password is entered more than three times, an alarm is activated. The microcontroller can also automatically open the door when a person is detected by a laser light sensor upon returning. The report describes the hardware components, software, and circuitry required to implement this access control system.

Uploaded by

Gouthami
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views

14 Password Based Door Lock System Using 8051 Microcontroller - Compress

This document provides a project report for a password-based door lock system using an 8051 microcontroller. The system allows only authorized persons to access restricted areas by entering a password at a 4x4 keypad. The password is stored in EPROM and can be changed. If an incorrect password is entered more than three times, an alarm is activated. The microcontroller can also automatically open the door when a person is detected by a laser light sensor upon returning. The report describes the hardware components, software, and circuitry required to implement this access control system.

Uploaded by

Gouthami
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

 

Password Based Door Lock System


Project Report
Submitted in Partial Fullfilment of the Requirements for the
Degree of Bachelor of Technology
in
Electronics and Communicatio
Communication
n Engineering
under
Maulana Abul Kalam Azad University of Technology

By
Mou Chowdhury

Sushama Ganguly

Debosree Sahoo

Ranjabati Ghosh

Under the guidance of


Mr. Anirban Chatterjee
Department of Electronics and Communicat
Communication
ion Engineering
Meghnad Saha Institute of Technology
Kolkata -700150
 

Dedicated to:

Our Parents
 

CERTIFICATE OF APPROVAL
I hereby recommend that the work in preparing the seminar report entitled “PASSWORD BASED
MICRPCONTROLLER ” 
DOOR LOCK SYSTEM USING 8051 MICRPCONTROLLER 

Carried out by:

Mou Chowdhury, Sushama Ganguly, Debosree Sahoo, Ranjabati Ghosh 

may be accepted in partial


pa rtial fulfilment of the requirements for the degree of Bachelor of Technology
in Electronics and Communication Engineering
Engineering of Maulana Abul Kalam Azad University
University of
Technology.

…………………………………………  
………………………………………… 
Mr. Anirban Chatterjee
Assistant Professor, Dept of ECE
Meghnad Saha Institute of Technology
Kolkata-700150

Countersigned,

…………………………………………….. 
…………………………………………….. 
Dr. Sudip Dogra
HOD, Dept of ECE
Meghnad Saha Institute of Technology
Kolkata – 
Kolkata –  700150
 700150

………………………………………………..  
Prof. (Dr.) S. Ray. Chaudhuri
Director
Meghnad Saha Institute of Technology
Kolkata – 
Kolkata  –  700150
 700150
 

ACKNOWLEDGEMENTS

We would like to express our sincere regards to Mr. Anirban Chatterjee Assistant Professor of the
Department of Electronics and Communication Engineering, Meghnad Saha Institute of
Technology for his guidance, valuable advice and constructive suggestions for carrying out this
seminar.

We would like to record our indebtedness to Dr.Sudip Dogra, HOD, Department of Electronics and
Communication Engineering and Prof. Sukumar Roy Chaudhury Director, Meghnad Saha Institute
of Technology for providing us with all the support that were needed.
We would also like to thank a ll the faculty members of ECE department, MSIT for their valuable
suggestions during the course of our work
Finally, our sincere thanks go to our parents for their encouragement and support during this
 project.

............................................... ...............................................
 Name- Mou Chowdhury Name – 
Name –  Sushama
 Sushama Ganguly 
Roll No- 14200316010 Roll No.- 14200316001
Reg. No- 161420120011 Reg. No.- 161420120020

................................................... ................................................
 Name – 
 Name –  Debosree Sahoo Name – 
Name –  Ranjabati
 Ranjabati Ghosh
Roll No.-
 No.- 14200316011 Roll  No.-
No.- 14200316009
Reg. No.- 161420120010 Reg. No.-161420120012  

P a g e  | i
 

ABSTRACT

Security is a  prime concern in our day-today life. Everyone wants to be as much security as


 possible. An access control for doors forms a vital link in a security chain. The
microcontroller based Door locker is an access control system that allows only authorized
 persons to access restricted area. The system is fully controlled by the 8 bit microcontroller
AT89C2051 which has a 2Kbytes of RAM for the program memory. The password is stored
in the EPROM so that we can change it at anyan y time. The system has a Keypad by which the
 password can be entered through it. When they entered password equals with the password
stored in memory then the relay gets on and so that the
t he door is opened. If we entered a wrong
for more then three times then the Alarm is switched on. When we go inside and come back
then the microcontroller will sense the person using
usi ng the Laser light, the microcontroller will
automatically open the door for you.

P a g e  | ii 
 

TABLE OF CONTENTS

Acknowledgments.................................................... i 
Abstract..................................................................... ii 

List of Figures
CHAPTER 1. INTRODUCTION.......................................... 1-2
1.1 Password Based Door Lock System

Using 8051 Microcontroller …………………… 


……………………  1

Principle behind the Circuit………………


1.2 Principle behind Circuit ………………   2

CHAPTER 2. HARDWARE COMPONENET………… 3-5

2.1 Resistor ……………………………… 
………………………………  3

2.2 Capacitor.......
Capacitor...................
........................
........................
................
.... 4
2.3 Transistor.........
Transistor.....................
........................
.........................
............... 5

CHAPER 3. HARDWARE AND

SOFTWARE REQUIRED ............... 6-14

3.1 Hardware Requirements……………………………. 


Requirements…………………………….  6
3.1.1. 8051 Microcontroller...........................................
Microcontroller........................................... 7

3.1.2. 8051 Development Board..................................


Board.................................. 8

3.1.3. 8051 Programmer..........................................


Programmer................................................
...... 9

3.1.4. 4*4 Matrix Keypad.....................................


Keypad............................................
....... 10

3.1.5. 16*2 LCD.....................................


LCD...........................................................
...................... 11

3.1.6. L293D Motor Drive Board................................


Board................................ 11
3.1.7. DC Motor.........................................
Motor............................................................
................... 12

3.1.8. 10KΩ Potentiometer ...........................................


........................................... 13

  3.2 Software Requirements …………………………….. 


……………………………..  14
CHAPTER 4. PROPOSE DESIGN……..........
……......................
.....................
......... 15-16

4.1 How to Design Circuit of Password Based


Door Lock System?.........
System?....................
.......................
........................
..............
.. 15

4.1.1 Reset Circuit Design………………………..


Design……………………….. 15 
15 
4.1.2 Oscillator Circuit Design……………………
Design…………………… 15 
15 
4.1.3 Interfacing LCD, Keypad and Motor Driver.. 16
4.1.4 Compilation of Microcontroller Code……….
Code ………. 16

CHAPTER 5. PASSWORD BASED DOOR LOCKING

SYSTEM CIRCUIT OPARATION………


………   17

CHAPTER 6. PASSWORD BASED DOOR

LOCKING SYSTEM ALGORITHM……


……   18

CHAPTER 7. ADVANTGES AND DISADVANTAGES……


……   19-20 
7.1 Advantages…………………………………
Advantages…………………………………   19
7.2 Disadvantages……………………………
Disadvantages……………………………...
... 20

CHAPTER 8. APPLICATION OF PASSWORD


PASSWORD
BASED DOOR LOCK SYSTEM………
………..
.. 21
CHAPTER 9. LIMITATION OF PASSWORD
BASED DOOR LOCK SYSTEM………
………..
.. 21

CHAPTER 10. RUSULT AND ANALYSIS…………………


…………………...
... 22

CHAPTER 11. CONCLUTION…………………………………


…………………………………   23
Reference………………………………………………………......
Reference……………………………………………………… ...... 24

LIST OF FIGURES
1.2 Block Diagram of Password Based
Based Door Lock System ………
Lock ……….. 2

2.1.1 Image of Resistor.......................................................................... 3


2.1.2 Image of Capacitor....................................................................... 4

2.1.3 Image of Transistor...................................................................... 5

3.1.1.1 Image of 8051 Microcontroller................................................. 7

3.1.2.1 Image of 8051 Development Board ......................................... 8

3.1.4.1 Image of Matrix keypad ........................................................... 10 

3.1.5.1 Image of LCD............................................................................ 11

3.1.6.1 Image of L293D Motor Drive Board....................................... 12

3.1.7.1 Image of DC Motor.................................................................. 13

Potentiometer................................................................
3.1.8.1 10KΩ Potentiometer 13
 

CHAPTER 1

INTRODUCTION

In day of day life security of any object or place is


i s plays a major role. This project has
considered about that and created a secure access for a door which needs a password to open
the door. Using keypad it enters a password to the system
s ystem and if it is entered correctly
correctl y door is
open by motor which is used to rotated the handle of the door lock. It will give three attempts
to enter the password when it is entered
e ntered incorrectly at the first ttime.
ime. Some features like
adding new users and changing old password are configure by the k keypad.
eypad. LCD module is
used to display messages to the user. Now a day’s most of the system are aut omated in order
to face new challenges and present day requirements to achieve good result. Automated
systems have less manual operation, so that the
t he flexibility, reliabilities are hi
high
gh and accurate.
Hence every field prefers automated control systems, especially in the field of electronics.

1.1  Password Based Door Lock System Using 8051


Microcontroller
Password Based Door Lock System using 8051 Microcontroller is a simple project
where secure password will act as a door unlocking system. Traditional lock system
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
feat ures of these
innovative lock system 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 lamp or any
other mechanical/electrical load.

Here, we developed an electronic code lock system using 8051 microcontroller.


Which provides control to the actuating the load. It is simple embedded system with
input from the keyboard and the output being actuated accordingly.

This system demonstrates a Password based Door Lock System using 8051
Microcontroller, where in 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 close, denying access to the person.

P a g e  | 1

1.2  Principle behind the Circuit


The main component is the circuit is 8051 controller. In this project a 4*4 Matrix
Keypad is used to enter the password. The password which is entered is compared
with the predefined password.

If the entered password is correct, then the system opens the door by rotating door
motor and display the status of door on LCD. If the password is remains
remai ns closed and
displays “PWD is is wrong” on LCD.
1.2 Block Diagram of Password B
Based
ased Door Lock System

P a g e  | 2

CHAPTER 2

HARDWARE COMPONENTES

2.1 Resistor
A resistor is a passive
a passive two-terminal
 two-terminal electrical
 electrical component that implements electrical
implements electrical
resistance as a circuit element. In electronic circuits, resistors are used to reduce
current flow, adjust signal levels, to divide voltages, bias
voltages,  bias active elements, and
terminate transmission
terminate  transmission lines, among
lines, among other uses. High-power resistors that can
dissipate many watts
many watts of electrical power as heat, may be used as part of motor
controls, in power distribution systems, or as test loads for  generators. Fixed
 generators. Fixed resistors
have resistances that only change slightly with temperature, time or operating voltage.
Variable resistors can be used to adjust circuit elements (such as a volume control or a
lamp dimmer), or as sensing devices for heat, light, humidity, force, or chemical
activity.

Resistors are common elements of  electrical


 electrical networks and electronic
and electronic circuits and are
ubiquitous in electronic
in electronic equipment. Practical
equipment. Practical resistors as discrete components can be
composed of various compounds and forms. Resistors are also implemented
within integrated
within  integrated circuits. 
circuits. 

The electrical function of a resistor is specified by its resistance: common commercial


resistors are manufactured over a range of more than nine orders
nine  orders of magnitude. The
magnitude. The
nominal value of the resistance falls within the manufacturing
the  manufacturing tolerance,
tolerance, indicated
 indicated on
the component.

2.1.1 Image of Resistor

P a g e  | 3

2.2 Capacitor

A capacitor is a passive
a passive two-terminal
 two-terminal electronic
 electronic component that stores electrical
stores electrical
energy in an electric
an electric field. The
field. The effect of a capacitor is known as
as capacitance.
 capacitance. While
 While
some capacitance exists between any an y two electrical conductors in proximity in
a circuit, a
 circuit, a capacitor is a component designed to add capacitance to a circuit. The
capacitor was originally known as a condenser. The original name is still widely
still widely used
in many languages, but
languages, but not in English.

The physical form and construction of practical capacitors vary


var y widely and
many capacitor
many  capacitor types are in common use. Most capacitors contain at le least
ast
two electrical
two electrical conductors often in the form of metallic plates or surfaces separated by
a dielectric medium. A conductor may be a foil, thin film, sintered bead of metal, or
an
an electrolyte.
 electrolyte. The
 The non conducting dielectric acts to increase the capacitor's charge
capacity. Materials commonly used as dielectrics include glass,
include glass, ceramic,
 ceramic, plastic
 plastic
film, paper,
film,  paper, mica,
 mica, and
 and oxide
 oxide layers. Capacitors
layers. Capacitors are widely used as parts of  electrical
 electrical
circuits in many common electrical devices. Unlike a resistor,
a  resistor, an
 an ideal capacitor does
not dissipate energy.

When two conductors experience a potential


a potential difference,
difference, for
 for example, when a
capacitor is attached across a battery, an electric
an electric field
fielddevelops
develops across the dielectric,
causing a net positive charge
positive charge to collect on one plate and net negative charge to collect
on the other plate. No current actually flows through the dielectric, however, there is a
flow of charge through the source circuit. If the condition is maintained sufficiently
long, the current through the source circuit ceases. However, if a time-varying voltage
is applied across the leads of the capacitor, the source experiences an ongoing current
due to the charging and discharging cycles of the capacitor.

2.1.2 Image of Capacitor

P a g e  | 
 |  4

2.3 Transistor

A transistor is a semiconductor
a semiconductor device used to amplify
to amplify or  switch electronic
 switch electronic signals
and electrical
and  electrical power. It
power. It is composed of  semiconductor
 semiconductor material usually with at least
three terminals
three  terminals for connection to an external circuit. A voltage
A  voltage or  current
 current applied to one pair
of the transistor's terminals controls the current through another pair of terminals. Because
the controlled (output) power
(output) power can be higher than the controlling (input) power, a transistor
can amplify
can  amplify a signal. Today, some transistors are packaged individually, but many more are
found embedded in integrated
in integrated circuits. 
circuits. 

The transistor is the fundamental building block of modern electronic


modern electronic devices, and
devices, and is
ubiquitous in modern electronic systems. Julius
systems. Julius Edgar Lilienfeld
Lilienfeld patented
 patented a field-effect
a field-effect
transistor in 1926 but it was not possible to actually construct a working device at that
t hat time.
The first practically implemented device was a point-contact
a point-contact transistor invented in 1947 by
American physicists
American  physicists John
 John Bardeen, Walter
Bardeen, Walter Brattain, and
Brattain, and William
 William Shockley. The
Shockley. The transistor
revolutionized the field of electronics, and paved the way for smaller and
cheaper  radios, calculators,
 radios, calculators, and
 and computers,
 computers, among
 among other things. The transistor is on thethe list
 list of
IEEE milestones in electronics, and Bardeen, Brattain, and Shockley shared the 1956 Nobel
1956  Nobel
Prize in Physics for their achievement.

Most transistors are made from very pure silicon


pure  silicon or  germanium, but
 germanium, but certain
other  semiconductor
 semiconductor materials can also be used. A transistor may have only one kind of

charge carrier,
 junction in a field
transistora field effect
devices. transistor, or
transistor,
Compared with or the vacuum
may
the have two
 vacuum kinds of charge
tube, transistors
tube,  transistors arecarriers iin
generally n bipolar
smaller,
and require less power to operate. Certain vacuum tubes have advantages over transistors at
very high operating frequencies or high operating voltages. Many types of transistors are
made to standardized specifications by multiple manufacturers

2.1.3 Image of Transistor

P a g e  | 5

CHAPTER 3
HAEDW
HAE DWARE
ARE AND SOFT
SOFTWWARE REQU
REQUIRE
IRED
D

3.1 Hardware Requireme


Requirements
nts

● 8051 Microcontroller  

● 8051 Development Board 


Board 

● 8051 Programmer  

● 4*4 Matrix Keypad 


Keypad  

● 16*2 LCD

● L293D Motor Drive Board 


Board  

● DC Motor

● 10KΩ Potentiometer  

● Connecting Wires 
Wires 

● Power Supply

● If 8051 Development Board is not used, then the following components are needed
● 11.0592 MHz Quartz Crystal

● 2* 33pF Ceramic Capacitors

●2*10 KΩ Resistor (1/4 Watt) 


Watt) 

●10 µF Capacitor (Polarized)


(Polarized)

● Push Button 
Button 

● 2*1 KΩ Resistors (for pull up) 


up)  

P a g e  | 6

 
3.1.1 8051 Microcont
Microcontroller
roller

8051 microcontroller is designed by Intel in 1981. It is an 8-bit microcontroller. It is built


with 40 pins DIP (dual inline package), 4kb of ROM storage and 128 bytes of RAM storage,
2 16-bit timers. It consists of are four parallel 8-bit ports, which are programmable as well as
addressable as per the requirement. An on-chip crystal oscillator is integrated in the
microcontroller having crystal frequency of 12 MHz.

Let us now discuss the architecture of 8051 Microcontroller.

In the following diagram, the system bus connects all the support devices to the CPU. The
system bus consists of an 8-bit data bus, a 16-bit address bus and bus control signals. All
other devices like program memory, ports, data memory, serial interface, interrupt control,
timers, and the CPU are all interfaced
i nterfaced together through the system bus.

3.1.1.1 Image of 8051 Microcontroller


Microcontroller

P a g e  | 7
 

3.1.2 8051 Development Board

INTRODUCTION: 

With this board you can develop and prototype with any of 8051 40 pin microcontrollers. The
RS232 driver on board allows easy connection with PC or other embedded hardware . The
 board have User buttons and status LEDs. The
The bridge rectifier allow this board to be powered
with both AC and DC power supply adapters.

MAIN FEATURES:

   RS232 Tx, Rx interface with MAX232 IC on socket


   DIL40 ZIF Socket ( Zero Insertion Force) microcontroller socket - To Reduce
Microcontroller Damages
   ULN 2803 To Drive Stepper Motor & Relays
   Quartz crystal 11.0592Mhz
   Reset button
   Power plug-in jack
   GND bus

  Vcc bus.

I/O Features

   On board Regulated Power Supply 5v,12v supplies


   Easy to test with Burg Connecters wires
   A Serial Port for ISP
   An RS232 Serial Port
   7Seg Multiplexed Display
   DC Power Supply Connector(12v Ac or Dc)
   24Cxx I2C EEPROM
   RTC DS1307

  8 LED array
   Matrix Key Pad
   4 Interrupt Switchers
   Example Programs for LED,7seg,LCD,RS232 ,Matrix Key Pad, ADC
   Easy To flash 89V51RD2 Through Flash Magic Software

3.1.2.1 Image of 8051 Development Board


P a g e  | 8 

3.1.3 8051 Programmer

The microcontroller program comprises a set of instructions


in structions written by the program designer.
There are four classes of instructions:
1. Arithmetic operations

2. Logic operations

3. Data transfer operations

4. Branch operations.

3.1.3.1 Arithmetic operations

Arithmetic is a branch of  mathematics


 mathematics that consists of the study of  numbers, especially
 numbers, especially the
 properties of the traditional operations
traditional operations on them — 
addition, subtraction,
addition, subtraction, multiplication
 multiplication and division.
and division. Arithmetic
 Arithmetic is an elementary part of  number
 number
theory, and
theory, and number theory is considered to be one of the top-level
top-level divisions
 divisions of modern
mathematics, along
mathematics,  along with algebra,
with algebra, geometry,
 geometry, and
 and analysis.
 analysis. The
 The terms arithmetic and higher
arithmetic were used until the beginning of the 20th century as synonyms for number
theory and are sometimes still used to refer to a wider part of number theory.

3.1.3.2 Logic operations

A logical operation is a special symbol or word which connects two or more phrases of
information. It is most often used to test whether a certain relationship between the phrases is
true or false.

In computing, logical operations are necessary because they can be used


us ed to model the way
that information flows through electrical circuits,
electrical  circuits, such
 such as the circuits inside a CPU.
a CPU. These
 These
types of operations are called Boolean
called Boolean operations.
The elements in a circuit which behave according to Boolean logic are called
called logic
 logic gates.
gates.  
P a g e  | 
 |  9

3.1.3.3. Data transfer operations

Data transfer instructions move the content of one register to another. The register the content
of which is moved remains unchanged. If they have the suffix “X” (MOVX), the data is
exchanged with external memory. 
memory.  

3.1.3.4. Branch operations

There are two kinds of branch instructions: Unconditional jump instructions: upon their
execution a jump to a new location from where the program continues execution is executed.
Conditional jump instructions: a jump to a new program location is executed only if a
specified condition is met. Otherwise, the program normally proceeds with the next
instruction.  
instruction.

3.1.4 . 4*4 Matrix Keypad

Before we interface the keypad with microcontroller, first we need to understand how it
works. Matrix keypad consists of set of Push buttons, which are interconnected. Like in our
case we are using 4X4 matrix keypad,
ke ypad, in which there are 4 push buttons in each of four rows.
And the terminals of the push buttons are connected according to diagram. In first row, one
terminal of all the 4 push buttons are connected together
to gether and another terminal of 4 push
 buttons are representing each of 4 columns, same goes for each row. So we are getting 8
terminals to connect with a microcontroller
3.1.4.1 Image of Matrix keypad

P a g e  | 
 |  1 0  

3.1.5. 16*2 LCD

We come across LCD
across LCD displays everywhere around us. Computers, calculators, television sets,
mobile phones, digital watches use some kind of display to display
displa y the time. An LCD is an
electronic display module which uses liquid crystal to produce a visible image. The 16×2
LCD display is a very basic module commonly used in DIYs
in  DIYs and circuits. The
16×2 translates o a display 16 characters per line in 2 such lines. In this LCD each character
is displayed in a 5×7 pixel matrix.

3.1.5.1 Image of LCD

3.1.6. L293D Motor Drive Board

This
driverMotor Driver Board
IC designed is designed
to provide to Work
bidirectional with
drive L293DofIC.
currents upThe L293D at
to 600-mA is voltages
a popularfrom
motor
4.5 V to 36 V. With Terminal Blocks for connecting motors & power supply and Berg Sticks
for control signals from microcontroller. This can control 2 DC Motors, their
thei r direction using
control lines and their speed using PWM.
Features

  Wide Supply-Voltage Range: 4.5 V to 36 V


  Separate Input-Logic Supply
  Pin compatible with L293D
  Internal ESD Protection
  Thermal Shutdown

  High-Noise-Immunity Inputs
  Output Current 0.6 A Per Channel
  Peak Output Current 2 A Per Channel
  Output Clamp Diodes for Inductive Transient Suppression

P a g e  | 
 |  1 1  

 
3.1.6.1 Image of L293D Motor Drive Board

3.1.7 DC Motor

A DC motor is any of a class of rotary


r otary electrical machines that converts direct current
electrical energy into mechanical energy.
energ y. The most common types rely on the forces
 produced by magnetic fields. Nearly all types of DC motors
motors have some internal mechanism,
either electromechanical or electronic, to periodically change the direction of current flow in
 part of the motor.

DC motors were the first type


t ype widely used, since they could be powered from existing direct-
current lighting power distribution systems. A DC motor's speed can be controlled over a
wide range, using either a variable supply voltage or by changing the strength of current in itsit s
field windings. Small DC motors are used in tools, toys, and appliances. The universal
The  universal
motor can operate on direct current but is a lightweight brushed
lightweight  brushed motor used for portable
 power tools and appliances. Larger DC motors are used in propulsion
propulsion of electric vehicles,
elevator and hoists, or in drives for steel rolling mills. The advent of power electronics has
made replacement of DC motors with AC
with  AC motors possible
motors possible in many applications.

P a g e  | 
 |  1 2  

3.1.7.1 Image of DC Motor

3.1.8 10KΩ Potentiometer 


Potentiometer 
A potentiometer is a three-terminal
three-terminal resistor
 resistor with a sliding or rotating contact that forms an
adjustable voltage
adjustable voltage divider. If
divider. If only two terminals are used, one end and the wiper, it acts as
a variable resistor or  rheostat. 
 rheostat. 
The measuring instrument called a potentiometer
a  potentiometer is essentially a voltage
a voltage divider used for
measuring electric
measuring  electric potential (voltage); the component is an implementation of the same
 principle, hence its name.

Potentiometers are commonly used to control electrical devices


devic es such as volume controls on
audio equipment. Potentiometers operated by a mechanism can be used as
 position transducers,
 position  transducers, for
 for example, in a joystick.
a  joystick. Potentiometers
 Potentiometers are rarely used to directly
control significant power (more than a watt)
a watt),, since the power dissipated in the potentiometer
would be comparable to the power in the controlled load.

3.1.8.1 10KΩ Potentiometer 


Potentiometer 

P a g e  | 
 |  1 3  

3.2 Software
Sof tware Requirem
Requirements
ents

● Keil µ Vision IDE 


IDE  

● Willar Programmer  
● Proteus (for circuit diagram and simulation)
3.2.1 Keil µ Vision IDE

The µVision IDE combines project management, run-time environment, build facilities,
source code editing, and program debugging in a single powerful environment. µVision is
easy-to-use and accelerates your embedded software development. µVision supports multiple
screens and allows you to create individual window layouts anywhere on the visual surface.
surfa ce.

The µVision
The  µVision Debugger provides
Debugger provides a single environment in which yoyouu may test, verify, and
optimize your application code. The debugger includes traditional features like simple
s imple and
complex breakpoints, watch windows, and execution control and provides full visibility
visibilit y to
device peripherals

P a g e  | 
 |  1 4  

CHAPTER 4

PROPOSE DESIGN

4.1 How to Design Circuit of Password Based Door Lock System


Password based door lock system using 8051 microcontroller circuit design uses five major
components- a Microcontroller, an L293D Motor Drive, 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. This
controller required a supply voltage of +5V DC. In order of provide regulated 5V DC voltage
to the controller we need to use 7805 power supply circuit. We can use 9V DC battery or
12V, 1A adaptor as a power source.

4.1.1 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 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
10µF electrolytic capacitor.

4.1.2 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

P a g e  | 
 |  1 5  

4.1.3 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.

4.1.4 Compilation of Microcontroller Code

Once the circuit is designed and drawn on a piece of paper, the next step is to write and
compile the code. Here, we used the keli µ Vision software to write program in C language.

Prior to writing the code, general steps needs to be followed like creating a new project and
selecting the target device or the required microcontroller. Once the code is written, we need
to save it with c extension and then add it to the source file group under the target folder. The
code is then complied by pressing F9 key.

Once the code complied a hex file is created. In the next step, we use proteus software to
drew the circuit. The code is dumped into the microcontroller using an external programmer
and Willar Sofware.

P a g e  | 
 |  1 6  

 
CHAPTER 5 

PASSWORD BASED DOOR LOCK SYSTEM CIRCUIT OPARETION

Once the circuit is powered ON, microcontroller sends commands to the LCD to display
“enter password” on
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
HIGH and P0.1 LOW, so motor
drive gets the inputs 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 10
seconds, the microcontroller makes P0.0 LOW and P0.1 HIGH, so the motor drive gets the
input signals for reverse motion. As a result,
r esult, the Door motor rotates in reverse directi
direction
on 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 connection, make sure that there is no common connection between
AC and DC supplies.

P a g e  | 
 |  1 7  

 
 

CHAPTER 6

PASSWORD BASED DOOR LOCK SYSTEM ALGORETHM

► 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. 
driver. 

► Then, display the message “enter password” on LCD. 


LCD. 

►  Now read the five digit password from the user.


user.  

► Compare the entered password with the stored password. 


password.  

► If password is correct, then make P0.0 pin HIGH and P0.1 pin LOW to open the
LCD. 
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
LCD. 
after this display “Door closing” on LCD. 

► If the password is wrong, then display “Wrong Password” on LCD. 


LCD. 

► After some delay again ask to enter password 


password  

P a g e  | 18
 

CHAPTER 7

ADVANTG
ADVANTGES
ES AN
ANDD DIS
DISADV
ADVANTAGES
ANTAGES

7.1 Advantages

▪ Pick-proof:  Because there is no place for a key with these locks,


locks, the prevent break-ins
 because burglars are unable to pick or ‘bump’ the lock. Criminals methods
methods of breaking and
entering are improving and the majority of criminals can pick an ordinary key lock.

▪ No More Keys:  You won’t have to carry around a large set of  keys  keys and they will be less
likely to be lost or stolen. Also, if you are a landlord, you don’t have to give residents keys or
replace them if they lose them.

▪ Control: In a company building, you can control and restrict who goes into what part of
the building. Also residents and landlords of apartments and flat, can control who can enter
their room with one PIN code and it reduces the risk
ris k of anything getting stolen. It is
incredibly easy to change the PIN code whenever you like. The combination
The combination door locks from
The Workplace Depot have over 8,000 possible code combinations with a simple code
change facility.

▪ Aesthetica lly Pleasing:  Door locks can come


Aesthetically come in a range of stylish colours that look smart
and professional. At The Workplace Depot, we sell mechanical digital
di gital door locks in a choice
of 3 colours, brass, chrome and satin chrome.

▪ Perfect for the elderly or disabled:  The extra investment into a door lock could
could bring
massive advantages to those who are unable to get to the door quickly and/or who struggle
with keys.

P a g e  | 19 

7.2 Disadvantages

▪ Forgetful:  You may be the one to forget your keys now and then, and it can be easy
eas y to
forget you PIN code for the lock and when your in a rush to get into the room or building or it
is night time and dark, you don’t want to be changing the code in the middle of the night or
when it’s raining! 
raining! 

▪ Keep the PIN code safe and the lock clean:  Only tell the code to people who you trust, as
you don’t want a code to your property to be local news. When the lock has been used a few
too many times, the coating may start to come away or mucky fingerprints may start to occur
on the buttons. Keep the lock maintained and clean to stop unwanted people finding out the
code!

▪ Power Failure: Some digital door locks are powered by electricity,


electrici ty, if your house or
 building has a power failure, then the door
door lock will not work which restricts you from
entering the building. Buying a mechanical or battery powered lock will not affect you if
there is a power failure.

▪ Limit the PIN Code Length:  Some digital door locks have a PIN code length up to 10
digits – 
digits –  this
 this is not what you want! Digital Door Locks will be much more secure if they are
only 4 digits long. Purchase a quality lock that you can change the PIN code on, don’t buy
locks that are provided with a PIN code because people can find out the code.
P a g e  | 20 

CHAPTER 8

APPLICATION OF PASSWORD BASED DOOR LOCK SYSTEM

safety.  
● 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
password 
through password 

CHAPTER 9

LIMITATION OF PSSWORD BASED DOOR LOCK SYSTEM

● It is a low range circuit, i.e. it remotely. 


i t is not possible to operate the circuit remotely. 
● If you forget the password it is not possible to open the door  

P a g e  | 21

CHAPTER 10

RESUL
RESU LT AND AN
ANAL
ALYSIS
YSIS

► When it is entered a 4 digit password by the user it will display on LCD as “****”.
Therefore anyone else can’t see what the user enters.
► If it is the correct password, LCD displaying a message “Well come” and the
t he door will be
opened.

► After 1minuts time door is locked automatically.

► If it is entered password incorrectly LCD displaying “password error”

► If it is a wrong password user received another 3attempts to enter the correct one. If he
couldn’t enter password correctly by these attempts he have to wait 3 minutes time more to re
logged in to the system.

► After opening the door if user wants to change his password, after pressing
press ing “0” key and
giving user id user can change his password.

► If user wants to add more people to the


the system after opening the door pressing “#” key,
user can add more users. System will give user id to each password.

You might also like