e01ch07.PDF
(
161 KB
)
Pobierz
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
SMALL CIRCUITS
COLLECTION
007
Code Lock
vides a TTL signal, which is nor-
mally ‘low’ and becomes ‘high’
when activated. The other output
(K1) consists of a relay (Re1). By
changing the jumper from JP2 to
JP1 the output can be changed
from the ‘level’ output (continu-
ous switch signal) to the pulse
output on the processor. In the
latter case, the output is active
for about one second after enter-
ing the access code; this is com-
mon for use with electronic door
locks.
The keyboard layout is
as follows:
G. Baars
This is a device, built around a PIC16F84-04, which acti-
vates an output when the correct access code has been
entered on a keypad. This code consists of six digits in the
range 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 beeps
indicates whether the input has been entered correctly or
not. This circuit is eminently suitable as an electronic door
lock, the switching section of a burglar alarm or as an igni-
tion blocking device.
The code lock has two outputs. One of these (K2) pro-
1
2
3
4
5
6
7
8
9
*
0
#
The output is inactive when the circuit is powered up or has
been reset. When the * key is pressed, followed by the 6
digit code, the output will go to the 5 V level and the relay
will be energised. If the code is correct, the buzzer sounds
+12V
+5V
+12V
IC2
78L05
K1
K3
R1
R2
C3
C1
C2
C4
Bz1
RE1
D1
100
µ
25V
100n
100n
47
µ
16V
C5
D
2
100n
1N4148
V23057-B0002-A201
S1
S2
S
3
IC1
14
JP2
1
2
3
K5
K4
6
4
RB0
RB1
RB2
RB3
RB4
RB5
RB6
RB7
MCLR
T1
S4
S5
S
6
7
17
R3
470
RA0
Ω
8
18
RA1
4
5
6
9
1
RA2
RA3
JP1
BD139
10
2
S7
S8
S
9
11
3
K2
RA4
12
16
15
7
8
9
OSC1
13
OSC2
S10
S11
S
12
2345
R4
5
*
0
#
C6
PIC16F84
4x 4k7
27p
1
004003 - 11
32
Elektor Electronics
12/2001
SMALL CIRCUITS
COLLECTION
COMPONENTS LIST
+
JP2
123
BZ1
HOLE35EC1
V4
K1
IC2
Resistors:
R1 = 3k
Ω
JP1
C3
C1
0
-
S1
S2
S3
3
C2
C4
C5
C6
D2
R2 = 4k
7
+
456
R3 = 470
Ω
R4 = 4-way SIL array 4k
7
S4
S5
S6
K4
K5
Capacitors:
C1 = 47µF 16V radial
C2,C4,C5 = 100nF
C3 = 100µF 25V radial
C6 = 27pF
T1
78 9
K2
S7
S8
S9
R4
*
#
0
HOLE35EC3
K3
V1
S10
S11
S12
Semiconductors:
D1 = 1N4148
D2 = LED
T1 = BD139
IC1 = PIC16F84-04/P, programmed, order
code
006501-1
IC2 = 78L05
Miscellaneous:
S1-S12 = pushbutton, 1 make contact, e.g.
ITT/Schadow type D6
K1,K2,K3 = 2-way PCB terminal block, lead
pitch 5mm
JP1,JP2 = jumper
Re1 = 12V relay, e.g.,
Siemens V23057-B0002-A201
Bz1 = buzzer 5VDC
K4,K5 = 7-way SIL pinheader
Disk, source code files, order code
006001-1
(see Readers Services pages)
PCB, order code
004003-1
(see Readers
Services pages)
a single beep. If it is incorrect, three beeps will follow in
short succession. When the code has been incorrectly
entered 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.
When the code lock is used for the first time, the access
code is 123456. This can be changed to, for example,
654321 by first pressing * followed by #, then the original
code, then the new code and finally the new code a sec-
ond time for confirmation. When the new code has been
correctly entered (when the old code corresponds with the
one stored in memory and the doubly entered new one are
both the same) a single beep will sound after entering the
last digit and the new code will be internally stored. If
something has gone wrong, the original code remains valid
and the three-beep error signal will sound.
By pressing ‘**’ on the keypad, the level output of the
processor will go to 0 V and the relay in ‘level’-setting will
deactivate. When the pulse output is used, the code ‘**’ is
never necessary. If the code lock is used to turn something
off using the access code, a relay with a change-over or
break contact may be used. A burglar alarm may, for exam-
ple, be activated with ‘**’ and can only be disarmed by
entering the access code. The TTL-output (K2) can be
used to drive an enable signal, with which something can
be blocked. If just the TTL output is used then there is no
need to fit the relay.
A 12 V power supply is indicated, but in principle any
voltage between 8 V and 15 V is allowed, provided of
course that the relay is suitable for this voltage. In the inac-
tive state, the current consumption of the circuit is about
2.5 mA.
The PCB shown here (available ready-made via Read-
ers’ Services) reduces the construction of the circuit to a
simple, routine job. In order to make the whole assembly
as genera-purpose as possible, the PCB was designed
such that the processor part and the keyboard may be sep-
arated. Interconnection of the two parts is achieved with a
short length of ribbon cable between K4 and K5.
Apart from the ready-made PCB, a programmed PIC and
a disk containing the project source code are also avail-
able from
Elektor Electronics
Reader’s Services.
(004003-1)
12/2001
Elektor Electronics
33
Plik z chomika:
gasma
Inne pliki z tego folderu:
bge.jpg
(26 KB)
detail1.htm
(5 KB)
detail2.htm
(4 KB)
detail3.htm
(4 KB)
detail4.htm
(6 KB)
Inne foldery tego chomika:
1974
1975
1976
1977
1978
Zgłoś jeśli
naruszono regulamin