Professional Documents
Culture Documents
PUNE – 411001
PROJECT REPORT
ON
Submitted By –
Guided by
1
CERTIFICATE
2
ACKNOWLEDGEMENT
3
CONTENTS
1 ) INTRODUCTION
2) BLOCK DIAGRAM
5) CIRCUIT DIAGRAM
6) SPECIFICATIONS
7) CIRCUIT DESIGN
8) PCB LAYOUT
12) REFERENCES
4
SECURITY ACCESS CONTROL SYSTEM USING PIC
INTRODUCTION :-
Security is prime concern in our day – to – day life. Every one wants
to be as secure to be possible. An access control system forms a vital link in a
security chain. The microcontroller based digital lock presented here is an access
control system that allows only authorized person to access a restricted area. The
system comprises a small electronic unit with a numeric keypad, which is fixed
outside the entry door to control a solenoid - operated lock. When authorized
person enter pre determined number ( password ) via the keypad the relay operated
for a limited time to unlatch the solenoid - operated lock so the door can be
pushed or pulled open. At the end of the preset delay, the relay energizes and the
door gets locked again. If the entered password is correct the unit gives a longer
beep of one second. And if the enter password is wrong it gives three small
beeps. When the code has been incorrectly enter four times in a row, the code
lock will switch to alarm mode. In this state , all key presses are ignored for one
minute and at the same time the buzzer will sound the alarm signal. This function
thwarts any attempt by ‘hackers’ to quickly try a large number of codes in
sequence. The secret code can be changed any time after entering the current code
(Master code ).
5
6
BLOCK DIAGRAM
7
BLOCK DIAGRAM DESCRIPTION
1) KEYPAD :-
The keypad used is a 3×4 keypad. The code is entered through this keypad.
The code consist of four digits in the range of 0 – 9. The keypad is as
shown below.
8
2) PIC 16F84 :-
PIC ( Peripheral Interface Controller ) is the IC while was
developed to control the peripheral device, dispersing the function of the main
CPU. PIC has the calculation function and the memory like the CPU and is
controlled by the software. However the throughput , the memory capacity aren’t
big. It depends on kind of PIC but the maximum operation clock frequency is
about 20 Mhz and the memory capacity to write the program is about 1K to 4K
words. The clock frequency is related with the speed to read the program and to
execute the instruction. Only at the clock frequency, the throughput can not be
judge. It changes with the architecture in the processing parts for architecture, the
one with the one with the higher clock frequency is higher about the throughput.
The point, PIC convenient for is that the calculation, the memory, the input /
output part and so on, are incorporated in to one piece of the IC. The efficiency,
the function is limited but can compose the control unit only by the PIC even if
it doesn’t combine the various IC’s so, the circuit can be compactly made.
9
PIN DIAGRAM OF PIC IC 16F84 :-
10
3) POWER SUPPLY :-
Two supply voltages are required for the circuit. A DC or AC 12V
mains adapter is connected to bridge rectifier ( D1- D4 ) via CN4 connector.
PIC is supplied with a regulated 5V from a 7805 fixed voltage regulator.
The unregulated voltage of approximately 12V is required for the relay
driving circuit.
11
LM 7805 ( 3 TERMINAL VOLTAGE REGULATOR ) :-
Three terminal positive voltage regulators. This is used to make
the stable voltage of +5V for microcontroller. The LM7805 is three terminal
positive regulators are available in the TO-220/D-PAK package and with several
fixed voltages, making them useful in the wide range of applications. Each type
employs internal current limiting , thermal shutdown and safe operating area
protection, making it essentially indestructible. If adequate heat sinking is provided
they can deliver over 1A output current through designed primarily as fixed
voltage regulators.
4) BUZZER :-
The buzzer is connected to pin 2 ( RA3 ) of the
microcontroller. It beeps to indicate key and password entry. The buzzer
gives a small beep whenever a key is pressed. In the case of wrong
password entry the buzzer gives a long beep, and in the case of right
password entry the buzzer gives three short beeps.
12
RELAY :-
A single pole double throw ( SPDT ) relay is connected to pin
17 ( RA0 ) of the microcontroller through a driver transistor. The relay
requires 12V at a current around 50mA, which can not be provided by the
microcontroller. So the driver transistor is added. The relay is used to
operate the external solenoid forming part of a locking device. Normally the
relay remains off. As soon as the pin of microcontroller goes high, the relay
operates. One relay for external solenoid and one for the external alarm to
control any other device. It close the voltage less point of contact while the
door lock works to control the electro magnetic door lock or equipment
outside.
13
CIRCUIT EXPLANATION AND WORKING :-
ALARM MODE :-
When the code has been entered four times in the row, the code
lock will switch to alarm mode. In this state, all key presses are ignored for one
minute and at the same time the buzzer will sound the alarm signal. This function
thwarts any attempt by ‘hackers’ to quickly try a large number of codes in a
sequence.
14
OPERATING :-
The output is inactive when the circuit is powered up. # is used
as ‘enter’ after you type in the valid code. The initial code ( master code ) is 1234
power on. You could active the output typing with :
1234#
* is used to change the code. Type in actual code then press * , then type in
the new code, for example,
Will change the code to 5678. The code changes immediately after typing the
4th digit. A 12V power supply is indicated, but in principle any voltage between
8V and 15V is allowed, provided of course that the relay is suitable for this
voltage. In the inactive state, the current consumption of the circuit is 2.5mA.
15
CIRCUIT DIAGRAM :-
16
SPECIFICATIONS :-
1 RESISTOR ( 1K ) 1K 3
3 CAPACITORS ( 33 Pf ) 33pF 1
11 TRASISTOR BC547 2
14 LED
15 PUSH BUTTON
16 IC SOCKET
17 KEYPAD + 12 SWITCHES
17
CIRCUIT DESIGN
POWER SUPPLY DESIGN :-
C = 5i / Vp f (1)
i = load current
f = frequency of AC supply
Vp = bridge output
Since we are using LM7805 the dropout voltage for LM7805 is ( min. value ) 2V
and allowing 10% of ripple we get the value of Vp as –
Vp = 5+2+0.7
= 7+0.7
Vp = 7.7V
18
The supply is designed such that it provides a load current of 1A.
I = 1A
The frequency of the AC supply is 50Hz substituting these values in eq. no. (1)
we get the value of C as
C = 0.013 F
But this value of C is very large and in such cases we can use two capacitors
and connect them in parallel.
Hence C = 0.001 F
Now the voltage rating of the capacitor should not be less than
Rectifier Ratings :-
1) The maximum average current ( I ) should not be less than maximum load
current ( IL ). But IL = 1A thus we select I = IL = 1A
2) Peak inverse voltage rating ( Vrrm ) should not be less than 2.8 × Vrms plus
a safety margin upto 50% higher to allow for line transients thus if we
take Vrrm = 1000V we get after solving about 533.6V.
19
3) Let Rs be the source resistance due to transformer winding and let its min.
value be Rsm = 05Ω the maximum instantaneous surge current is given by
Thus IFSM is calculated to be 30.6A by substituting the values in eq. no. (3)
20
APPLICATIONS :-
1) This circuit is eminently suitable as an electronic door lock.
2) PIC uses the Havard architecture whereas most of the 8051 use the von
Neumann architecture .
4) PIC16F84 is an 18 pin IC and 8051 is 40 pin IC. Thus PIC occupies less
space on PCB and the PCB is more compact.
5) 8051 has 4 ports port 0, port 1, port 2, port 3 for I / O operations and PIC
has 2 ports i.e port A and port B for I / O operations.
21
BILL OF MATERIAL
SR.NO COMPONENTS QTY. RATE TOTAL
TOTAL 1130/-
22
PROGRMMING DESIGN
23
24
25
26
27
28
29
30
31
32