This is only a preview of the September 1995 issue of Silicon Chip. You can view 34 of the 104 pages in the full issue, including the advertisments. For full access, purchase the issue for $10.00 or subscribe for access to the latest issues. Articles in this series:
Articles in this series:
Articles in this series:
Items relevant to "Notes On The Train Detector For Model Railways":
Items relevant to "Build A Jacob's Ladder Display":
Articles in this series:
|
Build a keypad
combination lock
This keypad combination lock can be used to
arm/disarm a house or car alarm, or to activate
a solenoid-operated door strike. It accepts codes
up to 12 digits long and is easy to program.
Design by JEFF MONEGAL
Keypad combination locks are a
great idea in security applications,
since they are far more convenient to
use than keys. What’s more, the code
can be quickly and easily changed
at the user’s whim to restrict people
who previously had access or just to
maintain security.
By contrast, keys can be easily copied or lost, while locks are expensive
and time-consuming to change.
The Keypad Combination Lock described here can be used in a range of
security applications. These include:
(1) turning burglar alarms on and off;
(2) activating solenoid-operated locking mechanisms in security doors and
16 Silicon Chip
gates; (3) controlling ignition killers
and fuel cutout systems in cars and
boats; and (4) operating power doors
on garages.
When used with a home burglar
alarm, the keypad would typically be
mounted just inside the front door.
Alternatively, the keypad could be
mounted in a weatherproof case just
outside the door. That way, you could
reduce the entry and exit delays to
a bare minimum or simply wire the
alarm for instant triggering.
Main features
Unlike previous circuits, this unit
is based on a dedicated kepad com-
bination lock IC and this has greatly
simplified the circuitry. Called the
UA3730, this 18-pin CMOS device contains all the necessary logic circuitry
to monitor the keypad matrix, plus the
necessary output logic for latched and
momentary operation.
In addition, the chip includes onboard memory which is used to store
the code. Up to 12 numbers can be
stored in memory (for 1012 possible
combinations) but this will depend on
the level of security required. Unlike
previous systems, the code can be
quickly changed (provided you have
access to the PC board), since there
are no wire links to solder in or DIP
switches to set.
In most cases, a simple 4-digit code
will give you adequate security while
retaining the benefits of a number
that’s easy to remember. This number
of digits provides odds of greater than
10,000 to one against someone guessing the correct code. Of course, you
can use more than four digits for even
greater security (although it’s never
D6
1N4004
IN
+12V
C3
1000
D1
IC2
78L05
GND
OUT
C4
10
D3
I
G
R6
1k
A
R8
14 10k B
8
7
5
R3
1k
16
IC1
UA3730
11
10
17
B
E
C
K
R4
1k
B
1
2
3
C2
10
D5
1N4004
SIREN
E
Q2
BD140
C
R4
1k
B
ALARM
ON/OFF
E
18
4
B
O
13
S
MEMORY
SET
LK1
K
A
Q3
BC548
15
6
P
LED2
C
E
PLASTIC
SIDE
C
PIEZO
BUZZER
C5
0.1
9
3x1N4148
D2
KEYPAD
1
1 2 3
2
4 5 6
3
7 8 9
4
* 0 #
5 6 7
E
R7
4.7k
Q1
BD140
C
R1
12k
R5
1k
A
C1
270pF
LOCK
SOLENOID
D4
1N4004
LED1
K
VIEWED FROM BELOW
KEYPAD COMBINATION LOCK
Fig.1: the circuit is based on IC1 which is a UA3730 keypad combination lock
IC. This device scans the keypad and, when the correct code is entered, the
Alarm On/Off output toggles and the Lock Solenoid output goes high for two
seconds. The piezo buzzer echoes the key presses.
a good idea to use your telephone
number).
The keypad used is a standard 3
x 4 unit as used in some telephone
diallers. It includes the digits 0-9
plus “✳” and “#” keys. Only the digits
(0-9) can be used as part of the code
but you can use the same digit more
than once.
Three outputs are provided by the
Keypad Combination Lock: (1) Lock
Solenoid (momentary); (2) Alarm On/
Off (latched); and (3) Siren. The unit
is easy to operate – all you have to
do is enter the correct code and press
the “#” key. A small piezo transducer
“beeps” briefly (for 0.2s) each time a
key is pressed.
Because it can only register one key
at a time, you can’t fool the unit by
simultaneously pressing all the keys
at once. In addition, the IC includes
a time-out feature so that you only
have one minute to complete the code
entry after the first key is pressed.
If you take longer than one minute,
the IC resets and you have to start all
over again.
When the correct code is entered,
the Door Lock output goes high
for two seconds (to open the door)
and lights a red indicator LED. By
contrast, the Alarm On/Off output
alternately toggles between high
(+12V) and open circuit (O/C); ie, it
changes state each time the correct
code is entered.
The Alarm On/Off output can be
used for switching burglar alarms or
other equipment on and off, either
directly or via a relay.
Wrong code
If the wrong code is entered, the
transducer beeps once but only on
the first two attempts. After the third
incorrect attempt, the Siren output
goes low for 60 seconds to sound
an external siren or trigger a central
alarm system. During this period, the
transducer beeps once every second
and the circuit lights an orange indicator LED.
The circuit subsequently automatically resets at the end of the 1-minute
alarm period. Alternatively, the circuit
can be reset at any time during the
alarm period by entering the correct
code.
Note that the use of any output is
entirely optional. You might elect to
Features Of The Keypad Combination Lock
•
•
•
•
Based on a dedicated combination lock IC.
•
•
•
LED indicators for Lock Solenoid and Siren outputs.
•
Programmed code can be maintained in the event of power failure using three
dry cells to provide battery backup.
Accepts codes up to 12 digits long for 1012 possible combinations.
Code is stored by the IC and is programmed from the keypad.
Three outputs: (1) Lock Solenoid (momentary); (2) Alarm On/Off (latched);
and Siren (1-minute alarm).
Siren output activated if three incorrect codes entered in sequence.
Piezo buzzer echoes key presses; beeps once every second for duration of
Siren output.
September 1995 17
+12V
GND
SIREN
DOOR LOCK
D6
0.1
LED2
Q2
D5
1k
1k
10uF
LK1
S P
PIEZO
BUZZER
Q3
IC1
UA3730
12k
270pF
10uF
1k
Q1
D4
1000uF
IC2
4.7k
1k
1k
1
D1
D2
D3
10k
ALARM ON/OFF
LED1
2 3 7 4 5 16
TO CORRESPONDING
NUMBERS ON KEYPAD
7 6 5 4 3 2 1
TO CORRESPONDING
NUMBERS ON PCB
BACK OF KEYPAD
Fig.2: install the parts on the PC board
as shown in this layout diagram. The
two LEDs can either be mounted on the
PC board, or they can be installed along
with the keypad on the front panel of a
case or switch plate.
use only the Lock Solenoid output, for
example, and leave the Alarm On/Off
and Siren outputs disconnected.
Supply requirements
Because it is a CMOS device, the
UA3730 has a typical quiescent current of just 5µA. This makes it suitable
for battery backup using dry cells,
since these will last for the length of
their shelf-life. In fact, battery backup
18 Silicon Chip
Take particular care when wiring the keypad, as some of the leads of the
7-way cable from the PC board have to be crossed over as shown here. Just
be sure to connect the wiring exactly as shown in Fig.2.
for the IC is desirable since the
memory is volatile. This means
that the programmed code is lost
if the power is interrupted, with
the unit reverting to its default
code of 0#.
The circuit itself is powered
from a 12V DC source, with the
current requirements dictated by
the external load. A typical door
lock solenoid will require a supply capable of delivering about
400mA but many applications
will require only 100mA or less.
Battery backup is not a feature
of the original circuit but it can be
easily added, as we shall see later
on. Note that the suggested circuit
using dry cells is only suitable
for maintaining the programmed
code in the IC until regular power
is restored.
Circuit details
Refer now to Fig.1 for the circuit details. Apart from the IC
and the keypad, there are just
two transistors, a 3-terminal regulator, a piezo transducer and a few
minor parts.
R1 and C1 are the timing components for IC1’s on-board oscillator.
In operation, IC1 scans the keyboard
matrix and decodes the key presses.
The internal logic of the IC then de
cides whether or not the correct code
has been entered and whether or not
it has been entered in the required
1-minute period.
Pins 17, 16 & 15 are the device
outputs. Normally, pin 17 of IC1 is
high and so PNP transistor Q1 is off.
However, each time the correct code
is entered, pin 17 goes low for two
seconds and so Q1 briefly turns on
and supplies current to the door lock
solenoid. It also supplies current to
LED 1 via a 1kΩ limiting resistor.
At the same time, pin 16 changes
state. If it was high before the code
was entered, it switches low and Q2
turns on. Conversely, if it was low, it
switches high and Q2 turns off; ie, pin
16 behaves as a latching output.
The third output, pin 15, is normally high but switches low for one
minute if three incorrect codes are
entered in a row. This lights LED 2
and also drives an external siren circuit via diode D5 and current limiting
resistor R4. At the end of the 1-minute
period, IC1 resets and pin 15 switches
high again.
Pin 14 is the piezo driver output.
Each time a key is pressed, this output generates a 3kHz signal for 0.2s
which drives Q3. Q3 in turn drives
the piezo transducer (B1) with this
3kHz pulse signal. R7 is necessary
to provide a DC current path for the
transistor.
In addition, pin 14 generates a 0.2s
burst at 3kHz each time an incorrect
code is entered. It also generates a
3kHz burst every second for a period
of one minute if three incorrect codes
are entered (ie, while pin 15 is low).
Pin 13 is used to control the pro-
This view shows
the programming
jumper in the store
(S) position. It
must be placed in
the program (P)
position when a
new code is to be
programmed into
the UA3730 IC.
gramming function of IC1. Normally,
this pin is left floating but is grounded
(by installing link LK1) to program in
a new code. The programming link is
then removed again after the new code
has been entered.
This task has been made easy by
installing a pair of adjacent 2-way pin
headers on the PC board. A jumper is
then used to short out two of the pins
in one position to provide the programming link. The other position is
simply used to store the jumper when
programming has been completed.
The Lock Solenoid output of the
circuit can be used to drive a 12V
door strike such as the unit shown
here (available from locksmiths).
Power for the circuit comes from
an external 12V supply (battery or DC
plugpack) and is applied to 3-terminal regulator IC2 via reverse polarity
protection diode D6. The 5V regulated
output from IC2 is then applied to pin
9 of IC1. Capacitors C3, C4 & C5 decouple the input and output terminals
of the regulator respectively.
Note that transistors Q1 & Q2 are
powered directly from the +12V rail.
Construction
All the parts except the buzzer and
the keypad are mounted on a PC board
measuring 105 x 60mm. This board
carries a screen printed overlay so that
you can see at a glance where each
part fits. Fig.2 shows the assembly
details.
No particular order need be followed when installing the parts on
the PC board but take care to ensure
that all polarised parts are correctly
oriented. In particular, note that the
two BD140 transistors are installed
with their metal faces towards the
LEDs.
There are four wire links on the
board. Install these at the locations
shown and install the two 2-way pin
headers at the LK1 position. Separate
pin headers are also installed for the
buzzer terminals. Resistors R2 and
R3 are shown as 2.2kΩ types on the
PC board screened overlay but we
recommend that you reduce them to
1kΩ, in line with the circuit diagram.
Depending on the application, the
two LEDs can either be installed directly on the PC board, as shown in
Fig.2, or connected to the board via
flying leads. Make sure that the LEDs
are correctly oriented – the anode lead
is usually (but not always) the longer
of the two. It is a good idea to check
PARTS LIST
1 PC board, 105 x 60mm,
copyright Oatley Electronics
1 keypad
1 12V piezo transducer
1 plastic cable tie
1 200mm-length 7-way ribbon
cable
1 18-pin IC socket
3 2-way pin headers
1 jumper (for pin headers)
1 80mm-length of tinned copper
wire (for links)
Semiconductors
1 UA3730 CMOS electronic lock
(IC1)
1 78L05 3-terminal regulator
(IC2)
2 BD140 PNP transistors
(Q1,Q2)
1 BC548 NPN transistor (Q3)
1 5mm red LED (LED1)
1 5mm orange (LED2)
3 1N4148 signal diodes (D1-D3)
3 1N4004 silicon diodes (D4-D6)
Capacitors
1 1000µF 16VW electrolytic
2 10µF 16VW electrolytic
1 0.1µF monolithic
1 270pF ceramic
Resistors
1 12kΩ
1 10kΩ
1 4.7kΩ
5 1kΩ
WHERE TO BUY A KIT
A kit of parts comprising the PC
board, all on-board parts, the
keypad and the piezo transducer
is available from Oatley Electronics
for $20 plus $4 p&p. A suitable
plastic case (see photo) costs an
extra $4. Contact Oatley Electron
ics, PO Box 89, Oatley, NSW 2223.
Phone (02) 579 4985 or fax (02)
570 7910.
Note: copyright the PC board
associated with this design is
retained by Oatley Electronics
this point with your multimeter before
the LEDs are installed. The red LED is
used for LED 1 (alarm on/off), while
the orange LED is used for LED 2 (ie,
siren indication).
The IC is best left until last. It is
installed in an IC socket and must be
oriented so that its pin 1 is adjacent
to R1 (12kΩ).
September 1995 19
Adding Battery Backup & Alarm On/Off Indication
+12V
R3
1k
TO PIN16
IC1
E
B
Q2
BD140
C
Programming
1k
LED3
12V
RELAY
D9
1N4004
Fig.3: this diagram shows how to add LED indication
and a relay to the Alarm On/Off output. If you don’t
need the relay, just leave it (and D9) out.
+12V
D6
1N4004
IN
C3
1000
IC2
78L05
GND
2x1N4004
D7
OUT
C4
10
D8
C5
0.1
TO PIN9
IC1
4.5V
Fig.4: here’s how to add battery backup to the circuit. Note
that this circuit is only intended to maintain the code in the
UA3730 IC in the event of a power failure.
Once the board assembly is completed, it can be wired to the keypad via a
7-way ribbon cable. A cable length of
150mm should be sufficient for most
applications.
You will need to take extreme care
when making the connections to the
keypad, since some of the leads must
be crossed over to reach their correct
terminals. Just ignore the screened “1”
on the PC board and connect the leads
as shown in Fig.3.
A plastic cable tie is used to anchor
the keypad cable to the PC board, to
stop the leads from coming adrift.
Finally, the piezo transducer can be
wired into circuit. Be sure to connect
the red lead to the positive terminal.
The Keypad Combination Lock is now
ready for testing.
Testing
All you have to do here is connect
a 12V DC power supply to the unit
and try it out.
Wait a few seconds after switch on
for the circuit to reset correctly – the
piezo transducer will beep when all
is ready. Now press 0# and check that
LED 1 lights for two seconds and then
goes out again. If it does, then all is
20 Silicon Chip
If you strike problems, first check
that the keypad is wired correctly,
as it’s easy to make a mistake here.
This done, check that all polarised
parts are correctly oriented and that
the correct part has been used at each
location.
well and you can check the other two
outputs.
To do this, use a multimeter (set to
a low DC range) to monitor the Alarm
On/Off output and check that this output toggles each time the correct code
is entered. This done, check that the
transducer beeps once every second
and that LED 2 lights for a period of
one minute when three incorrect codes
are entered.
Changing The Code
The default code for the unit is
“0” and this is entered by pressing “0” on the keypad and then
pressing the “#” key. To change
the code:
(1) Place the jumper in the “P”
(program) position of LK1.
(2) Enter the desired code (up to
12 digits).
(3) Press the “✳” key.
(4) Transfer the jumper to the “S”
(store) position of LK1 (this is
necessary, otherwise the unit can
be quickly reprogrammed from
the keypad).
To program the unit, first install the
jumper between the two pin header
terminals labelled “P” at the LK1 position (ie, between the two righthand
terminals) – see Fig.2. Pin 13 of IC1
is now grounded. Now enter in the
required code (up to 12 digits), press
the “✳” key and transfer the jumper to
the store (S) position.
Your new code is now programmed
into the lock. Check that the unit will
recognise this code by keying it in and
pressing the “#” key.
Options
(1) Alarm On/Off Indicator: Most
burglar alarms sound a small buzzer
during the exit and entry periods, so a
LED indicator was considered unnecessary for the Alarm On/Off output. If
you do need a LED indicator on this
output, then it can be easily added as
shown in Fig.3.
Fig.3 also shows how this output
could be used to drive a relay. Note that
a diode must be connected across the
relay coil to protect Q2 from voltage
spikes when the relay turns off.
(2) Battery Backup: A 4.5V battery
pack (eg, three 1.5V dry cells) and a
couple of 1N4004 diodes are all that
are required to maintain the code programmed into IC1 if the power fails.
Fig.4 shows how this is done.
The circuit works like this: normally, the cathode of D7 is at 4.5V and so
D8 will be reverse biased and no current flows from the batteries. However,
if the power fails, D8 becomes forward
biased and the backup batteries take
over and supply IC1.
D7 can be easily added to the
existing PC board by substituting it
for the wire link immediately below
the 1000µF capacitor (C3). Be sure to
install it with its cathode lead to the
right. D8 can be wired in series with
the positive supply lead from the
batteries and its cathode connected
to D7’s cathode.
(3) Door Sensor: Although not
shown on the circuit of Fig.1, pin 12 is
designated as the on/off sensor input.
This pin is normally left floating but if
YOU CAN
AFFORD
AN INTERNATIONAL
SATELLITE TV
SYSTEM
SATELLITE ENTHUSIASTS
STARTER KIT
The two LED indicators can be affixed to the plastic case using epoxy resin, as
shown here. Similarly, the keypad is attached by first drilling clearance holes
for its four corner posts and then using epoxy resin to glue these corner posts to
the inside of the case.
it is shorted to the commoned anodes
of D1-D3, the siren output goes low for
one minute (ie, the effect is the same
as if three incorrect codes are entered
in sequence).
Despite not being shown on the
circuit, provision for this feature has
been made on the PC board. All you
have to do is wire the two unused pads
to a normally open switch (eg, a reed
switch or an under-carpet pressure
mat), or even several switches wired
in parallel. These switches could be
used to detect other doors or windows
being forced.
YOUR OWN INTERNATIONAL
SYSTEM FROM ONLY:
FREE RECEPTION FROM
Installation
The exact method of installation
will depend on the application but
make sure that the electronic circuitry is secure so that the keypad
cannot be circumvented.
In most cases, the keypad
can be mounted on a blank
mains wall plate and this can
be installed with the PC board
behind it in a wall cavity. This
means that the two indicator
LEDs would also have to be
mounted on the wall plate (eg,
directly beneath the keypad)
and connected to the PC board
via flying leads. The LEDs can
be secured using epoxy resin.
Another option is to mount
the keypad and circuitry in
a plastic utility case and this
method would be suitable for
low-security applications.
Power for the circuit can be
derived either from a DC plug
pack supply or from an existing
alarm power supply, preferably
with battery backup. Note that
Mounting the circuit in a plastic case is OK
if the alarm system has a battery
for low-security applications. Alternatively,
backup, then the optional batyou can mount the keypad on a blank mains
tery backup circuit depicted in
wall plate and hide the PC board close by in
Fig.3 is unnecessary.
SC
the wall cavity.
Asiasat II, Gorizont, Palapa,
Panamsat, Intelsat
HERE'S WHAT YOU GET:
●
●
●
●
●
●
400 channel dual input receiver
preprogrammed for all viewable satellites
1.8m solid ground mount dish
20°K LNBF
25m coaxial cable
easy set up instructions
regular customer newsletters
BEWARE OF IMITATORS
Direct Importer: AV-COMM PTY. LTD.
PO BOX 225, Balgowlah NSW 2093
Tel: (02) 9949 7417 / 9948 2667
Fax: (02) 9949 7095
VISIT OUR INTERNET SITE http://www.avcomm.com.au
YES GARRY, please send me more
information on international band
satellite systems.
Name: __________________________________
Address: ________________________________
____________________P'code:
__________
Phone: (_______) ________________________
ACN 002 174 478
September 1995 21
|