Password Based Access Control System using Microcontroller
1. 1
Table of Contents
ACKNOWLEDGEMENT.......................................................................................................0
ABSTRACT...........................................................................................................................0.5
CHAPTER1: INTRODUCTION .............................................................................................1
1.1 Objectives.......................................................................................................................1
CHAPTER 2: METHODOLOGY............................................................................................2
2.1 Circuit Diagram..............................................................................................................2
2.2 Working Principle ..........................................................................................................3
CHAPTER 3: RESULTS AND ANALYSIS...........................................................................4
3.1 Description of Hardware .................................................................................................4
3.2 Codes...............................................................................................................................7
3.3 Result and Testing………………………………………………………………………10
CHAPTER 5: CONCLUSION.................................................................................................11
1.2 Applications and scope of project ..................................................................................11
1.3Conclusion.......................................................................................................................12
1.4 limitations........................................................................................................................13
5.2 Appendices ......................................................................................................................14
BIBLIOGRAPHY / REFERENCES........................................................................................15
2. 2
INTRODUCTION
Password Based Access Control System using Microcontroller is used in the places where we need
more security. It can also used to secure doors, cell phones, computers and other equipments.
The system comprises of a push button keypad connected to the 8 bit microcontroller ATmega328P.
This is one of the popular Microcontrollers. It has only 20 pins and there are 15 input/output lines. The
microcontroller has a flash memory of 32Kbytes, 1 Kbyte EEPROM and 2 Kbytes RAM. The
microcontroller continuously monitors the keypad and if somebody enters a password it will check the
entered password with the password stored in the memory and if they match then the microcontroller
will switch on the corresponding device.
The system will allow access to the person who knows the password and it will not allow access to
unauthorized people. The system has an advanced option that it will be lock automatically after 30
seconds of the door is opened.
OBJECTIVE:
The Main objective of this project is to modernize the advanced security system using microcontroller
as well as the automaticity of the locking system is the main focusing factor of this project.
3. 3
WORKING PRINCIPLE
The authentication method used here is a four digit numeric code which is entered through the keypad.
The code entered this way is then compared to the password stored in memory. The microcontroller
continuously monitors the keypad for a match with the stored password. As and when there is a match
the output line is enabled which can then be used to trigger an LED. A message is displayed if the
entered code doesn’t match the stored password. An LCD display is also used to display whether the
entered password is correct or not and to know that access has been granted or not.
Fig. BLOCK DIAGRAM
When the circuit is switched on a message on the LCD prompts us to ‘enter password’. The entered
code is read from the keypad and checked against the original password stored in the microcontroller
memory. If it is a match an LED is switched ON and if it is not a match, a message on the LCD
prompts us to re-enter the password. The whole procedure is then repeated.
The Microcontroller asks the user to define a four-digit password through the Keypad. Once a
password is set and later somebody tries to unlock the device, the Microcontroller reads the keypad
entry and compares the four digit password with the predefined password and if it is equal then the
LED connected to the lock output key glows and if we enter a wrong password an alarm will be
switched ON.
The Password is stored in the RAM and the password can be changed using the same keypad. The
power supply section is very important. It should deliver constant output regulated power supply for
successful working of the project. Regulated 5 volt supply is taken through the USB port of a
laptop/desktop.
4. 4
Description of Hardware
Resistor
The resistor is an electronic component that has electrical friction. This friction opposes the flow of
electrons and thus reduces the voltage (pressure) placed on other electronic components by restricting
the amount of current that can pass through it.
Capacitor
A capacitor stores electrical energy when charged by a DC source. It can pass alternating current (AC),
but blocks direct current (DC) except for a very short charging current, called transient current.
Inductor
The Inductor prevents current from making any sudden changes by producing large opposing voltages.
Magnetic coupling can be used to transform voltages and currents, but power must Remains the same.
Coils and transformers can be used to select frequencies. Is an electronic component which Blocks
Alternating Current and Passes Direct Current. Current in an Inductor cannot change instantly and
Quick Current change produces large Voltage.
Diode
Diode allows current to pass in only one direction. A pn-junction diode is formed by joining together
n-type and p-type silicon. When the anode and cathode of a pn-junction diode are connected to
external voltage Such that the potential at anode is higher than the potential at cathode, the diode is
said to be forward biased.
In a forward-biased diode current is allowed to flow through the device.
5. 5
Transistor
A Three lead semiconductor device that acts as an electrically controlled switch, or a current amplifier.
NPN:
A small input current and a positive voltage applied to its base (with VB>VE)
Allows a large current to flow from collector to emitter.
PNP:
A small output current and a negative voltage to its base (with VB<VE) allows a
Much larger current to flow from emitter to collector.
8 Bit MCU (ATmega8L)
8 Bit Microcontroller unit ATmega328P is one of the popular Microcontrollers. It has only 20 pins and
there are 15 input/output lines. The microcontroller has a flash memory of 32Kbytes, 1 Kbyte
EEPROM and 2 Kbytes RAM.
Voltage Regulator
A voltage regulator is designed to automatically maintain a constant voltage level. A voltage regulator may be a
simple "feed-forward" design or may include negative feedback control loops. It may use an electromechanical
mechanism, or electronic components.
Relay
A relay is usually an electromechanical device that is actuated by an electrical current. The current
flowing in one circuit causes the opening or closing of another. Relays are used in a wide variety of
applications throughout industry, such as in telephone exchanges, digital computers and automation
systems. There are three basic functions of a relay they are On/Off Control, Limit Control and Logic
Operation.
6. 6
PRESET
Preset resistors are used in circuits when it is necessary to alter the resistance. Dark/light and
temperature sensors usually have these components as the preset resistor allows the circuit to be made
more or less sensitive (they can be turned up or down - reducing or increasing resistance).
16×2 LCD Modules
LCD (Liquid Crystal Display) screen is an electronic display module and find a wide range of
applications. A 16x2 LCD display is very basic module and is very commonly used in various devices
and circuits.
A 16x2 LCD means it can display 16 characters per line and there are 2 such lines. In this LCD each
character is displayed in 5x7 pixel matrix. This LCD has two registers, namely, Command and Data.
The command register stores the command instructions given to the LCD. A command is an
instruction given to LCD to do a predefined task like initializing it, clearing its screen, setting the
cursor position, controlling display etc. The data register stores the data to be displayed on the LCD.
The data is the ASCII value of the character to be displayed on the LCD.
CONNECTOR AND PCB BOARD
Connectors are those devices that allow electrically operated equipment to be connected to the primary
alternating current power supply.
A printed circuit board (PCB) mechanically supports and electrically connects electronic components
using conductive tracks, pads and other features etched from copper sheets laminated onto a non-
conductive substrate. PCBs can be single sided (one copper layer), double sided (two copper layers) or
multi-layer. Conductors on different layers are connected with plated-through holes. Advanced PCBs
may contain components - capacitors, resistors or active devices embedded in the substrate.
10. 10
Result and Testing
After the completion of assembling the hardware and interfacing we tested it for the desirable output
but due to some technical programming codes we are not able to close the door after the time interval
of 30 seconds. It took a long time for its working and finally we got succeeded on our work.
According to our final test to all the hardware (LCD, Microcontroller, IC, and Preset) we are able to
adjust all the things and made ready to run the program according to the desire what we want. The
preset is also checked that the led connected to it produces the sufficient contrast to the LCD screen or
not.
For the final touchup to the hardware we used PCB board to interface the hardware and we printed our
names on it.
11. 11
Applications and Scope
Being used one of the advanced Technologies of automaticity the project has many merits and can be
used in many sectors. The following are the areas under which the password based door lock system
can be used:
Car parking areas:
In car parking we can use this system so that there would be less chance of Robbery and more
Security.
Modern homes:
Modern homes can be In-built with this technology so that there would be restriction of
unwanted access and house would be safe.
Motels:
Hotels with a good facility of safe and advanced parking can be regarded as modern hotels so
in such hotel security is key factor and advanced door lock system can be implemented in such
places.
Banks
Banks are the places to keep people’s money which must be safe and protected in order to
maintain such security we can use automatic door lock system in every department and lockers
used in banks.
`
Locker used in Banks and Homes
Lockers used in banks and homes to keep our ornaments, money and other special things
should be safe and sound so in order to maintain such we can use this system to protect all
these things being one of the advanced and automatic technologies.
12. 12
Conclusion
The digital code lock performed as expected. We were able to implement all the functions specified in
our proposal. The biggest hurdle we had to overcome with this project was interfacing the micro
controller with the hardware components. We feel that this digital code lock is very marketable
because it is easy to use, comparatively inexpensive due to low power consumption, and highly
reliable. This digital code lock is therefore particularly useful in applications such as door locks and
equipment locks. This simple digital code lock using microcontroller can be enhanced by incorporating
new means of authentication. Most prevalent form of digital lock is that using a numerical code for
authentication; the correct code must be entered in order for the lock to deactivate.
Such locks typically provide a keypad, and some feature an audible response to each press.
Combination lengths are usually between 4 and 6 digits long. Another means of authenticating users is
to require them to scan or "swipe" a security token such as a smart card or similar, or to interact a
token with the lock. As biometrics become more and more prominent as a recognized means of
positive identification, their use in security systems increases. Some new digital locks take advantage
of technologies such as fingerprint scanning, retinal scanning and iris scanning, and voiceprint
identification to authenticate users.
Radio frequency identification (RFID) is the use of an object (typically referred to as an RFID tag)
applied to or incorporated into a product, animal, or person for the purpose of identification and
tracking using radio waves. Some tags can be read from several meters away and beyond the line of
sight of the reader. This technology is also used in modern digital locks.