You are on page 1of 32

CUSROW WADIA INSTITUTE OF TECHNOLOGY

PUNE – 411001

PROJECT REPORT
ON

SECURITY ACCESS CONTROL SYSTEM


USING PIC MICROCONTROLLER

Submitted By –

RAKESH DUBE ----------- 3207

SUMEET JADHAV ------------ 3210

UMESH KATAMKAR ------------- 3216

Year : 2008 – 2009

Guided by

Prof. MR. Borekar

1
CERTIFICATE

This is to certify that the following students :

RAKESH DUBE ( 3207 )

SUMEET JADHAV ( 3210 )

UMESH KATAMKAR ( 3216 )

Of Third Year Electronics & Telecommunication Engineering , Cusrow wadia


institute of technology Pune. Have sucessfully completed the project on.

SECURITY ACCESS CONTROL SYSTEM


USING PIC MICROCONTROLLER
In the subject of Electronics System Design, as prescribed by the University of
Pune, during the academic Year 2008 – 2009, within the institute.

PROF. MR. BOREKAR PROF. MR.

Project Guide HOD E&TC Dept.

CWIT , Pune CWIT, Pune

2
ACKNOWLEDGEMENT

We take this opportunity of submitting the assertion to express our deep


regards to the ones who offered us their invaluable guidence in the hour of need.

We whish to express our profound thanks to all concerned staff members


and lab assistants for their co-operation and help in macking this project a
success.

We sincerely acknowledge with deep sense of gratitude to our Design


professor Mr. Borekar for their guidence and encouragement they gave us
during the preparation of this project. We would like to thanks our H.O.D
Mr. for his guidence.

RAKESH DUBE ( 3207 )


SUMEET JADHAV ( 3210 )
UMESH KATAMKAR (3216 )

3
CONTENTS

1 ) INTRODUCTION

2) BLOCK DIAGRAM

3) BLOCK DIAGRAM DESCRIPTION

4) CIRCUIT EXPLANATION AND WORKING

5) CIRCUIT DIAGRAM

6) SPECIFICATIONS

7) CIRCUIT DESIGN

8) PCB LAYOUT

9) APPLICATIONS AND ADVANTAGES

10) BILL OF MATERIAL

11) PRGRAMMING DESIGN

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 :-

This device is built around a PIC16Fxx, which activates an output


when the correct code has been entered on a keypad. This code consist of four
digits in the range of 0 to 9. The code can be changed by the user and is also
remembered when the power is off. A buzzer has been added to provide input
feedback; the number of beep indicates weather the input has been correctly
entered or not. The unit has two outputs. One of these provides a TTL signal,
which is normally ‘low’ and becomes ‘high’ when activated. The other output
consists of relay the output is active for about 10sec after entering the access
code; this is common for use with electronic door locks. The output will go to
the 5V level and the relay will be energized. If the code is correct, the buzzer
sounds a single beep. If it is incorrect, three beeps will follow in short
succession.

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,

1234 * 5678 # 5678 #

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 :-

SR.NO COMPONENTS RATINGS QUANTITY

1 RESISTOR ( 1K ) 1K 3

2 RESISTOR ( 10K ) 10K 3

3 CAPACITORS ( 33 Pf ) 33pF 1

4 CAPACITOR ( .1µF ) .1µF 1

5 CAPACITOR ( 1000 µF,16V ) 1000µF, 16V 1

6 CRYSTAL ( 4 MHz ) 4 MHz 1

7 DIODE ( 1N4007 ) 1N4007 5

8 TRANSFORMER 12V /500 mA 1

9 MICROCONTROLLER PIC 16F84 1

10 VOLTAGE REGULATOR LM7805 1

11 TRASISTOR BC547 2

12 RELAY (12V ) 12V 1

13 D.C BUZZER 12V 1

14 LED

15 PUSH BUTTON

16 IC SOCKET

17 KEYPAD + 12 SWITCHES

17
CIRCUIT DESIGN
POWER SUPPLY DESIGN :-

Since we require 5V regulated supply we are using LM7805 regulator.

To calculate value of filter capacitor :-


For calculating the filter capacitor we use the following formula

C = 5i / Vp f (1)

Where , C = value of filter capacitor

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.

So we choose the two values as

C1 = 0.1µF and C2 = 1000 µF

Hence C = 0.001 F

Now the voltage rating of the capacitor should not be less than

1.4 × Vrms (2)

Where Vrms is the secondary voltage of the transformer and it is 12V


substituting the value in eq. (2)

We get 16.8V thus we choose C2 as an electrolytic capacitor with voltage rating


16V.

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

( 1.4 Vrms – 1.5 ) / Rsm (3)

1.5 is subtracted because of voltage loss in the bridge.

Thus IFSM is calculated to be 30.6A by substituting the values in eq. no. (3)

Thus for the rectifier we choose diodes IN4007.

Values of the capacitors for oscillator :-


Crystal oscillator is kept in metal housing with two pins where you have
written down the frequency at which crystal oscillates. One ceramic
capacitor of 33pF whose other end is connected to the ground needs to be
connected with each pin.

Thus we select two 33pF capacitors.

When we connect relay to the microcontroller we connect a 10k resistor at


the base of Q2 i:e R3 and D5 is the protection diode.

20
APPLICATIONS :-
1) This circuit is eminently suitable as an electronic door lock.

2) This circuit can be used as the switching section of a burglar alarm.

3) This circuit can be used as an ignition blocking device.

ADVANTAGES OF PIC OVER 8051 :-


1) PIC is RISC processor. Thus its instruction set consist of just 35
instructions which can be easily remembered by the programmer.

2) PIC uses the Havard architecture whereas most of the 8051 use the von
Neumann architecture .

3) Instruction cycle of PIC consists of 4 clock pulses whereas instruction cycle


of 8051 consist of 12 clock cycles. Thus PIC is more faster than 8051.

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.

6) Number of interrupts in PIC is 4 and that of 8051 is 6.

21
BILL OF MATERIAL
SR.NO COMPONENTS QTY. RATE TOTAL

1 RESISTOR ( 1K ) 3 1/- 3/-

2 RESISTOR ( 10 K ) 3 1/- 3/-

3 CAPACITORS ( 33Pf ) 2 1/- 2/-

4 CAPACIOR (.1µF ) 2 1/- 2/-

5 CAPACITOR ( 1000 µF,16V) 1 3/- 3/-

6 CRYSTAL ( 4MHz) 1 15/- 15/-

7 DIODE ( 1N4007 ) 5 1/- 5/-

8 LED 3 1/- 3/-

9 PIC 16F84 1 135/- 135/-

10 LM 7805 1 10/- 10/-

11 BC 547 2 2/- 4/-

12 RELAY ( 12V ) 1 10/- 10/-

13 PUSH BUTTON 1 10/- 10/-

14 I.C SOCKET 1 5/- 5/-

15 BUZZER ( 12V ) 1 20/- 20/-

16 TRANSFORMER 1 45/- 45/-

17 KEYPAD + 12 SWITCHES 1 175/- 175/-

18 PCB 1 275/- 275/-

19 OTHERS 400/- 400/-

TOTAL 1130/-

22
PROGRMMING DESIGN

23
24
25
26
27
28
29
30
31
32

You might also like