Silicon ChipVersatile 4-Digit Combination Lock - December 1990 SILICON CHIP
  1. Outer Front Cover
  2. Contents
  3. Publisher's Letter: The CD/Green Pen Story: getting to the truth of the matter
  4. Feature: Understanding PC Memory by Brian Richards
  5. Feature: The Great Green CD Pen Controversy by Leo Simpson
  6. Project: DC-DC Converter For Car Amplifiers by John Clarke & Greg Swain
  7. Project: The Big Escape by Darren Yates
  8. Serviceman's Log: It sounds like Donald Duck by The TV Serviceman
  9. Project: Wiper Pulser For Rear Windows by John Clarke
  10. Order Form
  11. Vintage Radio: Old radio books & magazines by John Hill
  12. Project: Versatile 4-Digit Combination Lock by Gary Ioppolo
  13. Feature: Computer Bits by Jennifer Bonnitcha
  14. Back Issues
  15. Feature: The Story Of Electrical Energy; Pt.6 by Bryan Maher
  16. Feature: Amateur Radio by Garry Crattm VK2YBX
  17. Feature: Remote Control by Bob Young
  18. Feature: Index to Volume 3
  19. Market Centre
  20. Advertising Index
  21. Outer Back Cover

This is only a preview of the December 1990 issue of Silicon Chip.

You can view 58 of the 120 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:
  • Computer Bits (July 1989)
  • Computer Bits (July 1989)
  • Computer Bits (August 1989)
  • Computer Bits (August 1989)
  • Computer Bits (September 1989)
  • Computer Bits (September 1989)
  • Computer Bits (October 1989)
  • Computer Bits (October 1989)
  • Computer Bits (November 1989)
  • Computer Bits (November 1989)
  • Computer Bits (January 1990)
  • Computer Bits (January 1990)
  • Computer Bits (April 1990)
  • Computer Bits (April 1990)
  • Computer Bits (October 1990)
  • Computer Bits (October 1990)
  • Computer Bits (November 1990)
  • Computer Bits (November 1990)
  • Computer Bits (December 1990)
  • Computer Bits (December 1990)
  • Computer Bits (January 1991)
  • Computer Bits (January 1991)
  • Computer Bits (February 1991)
  • Computer Bits (February 1991)
  • Computer Bits (March 1991)
  • Computer Bits (March 1991)
  • Computer Bits (April 1991)
  • Computer Bits (April 1991)
  • Computer Bits (May 1991)
  • Computer Bits (May 1991)
  • Computer Bits (June 1991)
  • Computer Bits (June 1991)
  • Computer Bits (July 1991)
  • Computer Bits (July 1991)
  • Computer Bits (August 1991)
  • Computer Bits (August 1991)
  • Computer Bits (September 1991)
  • Computer Bits (September 1991)
  • Computer Bits (October 1991)
  • Computer Bits (October 1991)
  • Computer Bits (November 1991)
  • Computer Bits (November 1991)
  • Computer Bits (December 1991)
  • Computer Bits (December 1991)
  • Computer Bits (January 1992)
  • Computer Bits (January 1992)
  • Computer Bits (February 1992)
  • Computer Bits (February 1992)
  • Computer Bits (March 1992)
  • Computer Bits (March 1992)
  • Computer Bits (May 1992)
  • Computer Bits (May 1992)
  • Computer Bits (June 1992)
  • Computer Bits (June 1992)
  • Computer Bits (July 1992)
  • Computer Bits (July 1992)
  • Computer Bits (September 1992)
  • Computer Bits (September 1992)
  • Computer Bits (October 1992)
  • Computer Bits (October 1992)
  • Computer Bits (November 1992)
  • Computer Bits (November 1992)
  • Computer Bits (December 1992)
  • Computer Bits (December 1992)
  • Computer Bits (February 1993)
  • Computer Bits (February 1993)
  • Computer Bits (April 1993)
  • Computer Bits (April 1993)
  • Computer Bits (May 1993)
  • Computer Bits (May 1993)
  • Computer Bits (June 1993)
  • Computer Bits (June 1993)
  • Computer Bits (October 1993)
  • Computer Bits (October 1993)
  • Computer Bits (March 1994)
  • Computer Bits (March 1994)
  • Computer Bits (May 1994)
  • Computer Bits (May 1994)
  • Computer Bits (June 1994)
  • Computer Bits (June 1994)
  • Computer Bits (July 1994)
  • Computer Bits (July 1994)
  • Computer Bits (October 1994)
  • Computer Bits (October 1994)
  • Computer Bits (November 1994)
  • Computer Bits (November 1994)
  • Computer Bits (December 1994)
  • Computer Bits (December 1994)
  • Computer Bits (January 1995)
  • Computer Bits (January 1995)
  • Computer Bits (February 1995)
  • Computer Bits (February 1995)
  • Computer Bits (March 1995)
  • Computer Bits (March 1995)
  • Computer Bits (April 1995)
  • Computer Bits (April 1995)
  • CMOS Memory Settings - What To Do When The Battery Goes Flat (May 1995)
  • CMOS Memory Settings - What To Do When The Battery Goes Flat (May 1995)
  • Computer Bits (July 1995)
  • Computer Bits (July 1995)
  • Computer Bits (September 1995)
  • Computer Bits (September 1995)
  • Computer Bits: Connecting To The Internet With WIndows 95 (October 1995)
  • Computer Bits: Connecting To The Internet With WIndows 95 (October 1995)
  • Computer Bits (December 1995)
  • Computer Bits (December 1995)
  • Computer Bits (January 1996)
  • Computer Bits (January 1996)
  • Computer Bits (February 1996)
  • Computer Bits (February 1996)
  • Computer Bits (March 1996)
  • Computer Bits (March 1996)
  • Computer Bits (May 1996)
  • Computer Bits (May 1996)
  • Computer Bits (June 1996)
  • Computer Bits (June 1996)
  • Computer Bits (July 1996)
  • Computer Bits (July 1996)
  • Computer Bits (August 1996)
  • Computer Bits (August 1996)
  • Computer Bits (January 1997)
  • Computer Bits (January 1997)
  • Computer Bits (April 1997)
  • Computer Bits (April 1997)
  • Windows 95: The Hardware That's Required (May 1997)
  • Windows 95: The Hardware That's Required (May 1997)
  • Turning Up Your Hard Disc Drive (June 1997)
  • Turning Up Your Hard Disc Drive (June 1997)
  • Computer Bits (July 1997)
  • Computer Bits (July 1997)
  • Computer Bits: The Ins & Outs Of Sound Cards (August 1997)
  • Computer Bits: The Ins & Outs Of Sound Cards (August 1997)
  • Computer Bits (September 1997)
  • Computer Bits (September 1997)
  • Computer Bits (October 1997)
  • Computer Bits (October 1997)
  • Computer Bits (November 1997)
  • Computer Bits (November 1997)
  • Computer Bits (April 1998)
  • Computer Bits (April 1998)
  • Computer Bits (June 1998)
  • Computer Bits (June 1998)
  • Computer Bits (July 1998)
  • Computer Bits (July 1998)
  • Computer Bits (November 1998)
  • Computer Bits (November 1998)
  • Computer Bits (December 1998)
  • Computer Bits (December 1998)
  • Control Your World Using Linux (July 2011)
  • Control Your World Using Linux (July 2011)
Articles in this series:
  • The Technology Letters, Pt.2 (January 1989)
  • The Technology Letters, Pt.2 (January 1989)
  • The Story Of Electrical Energy (July 1990)
  • The Story Of Electrical Energy (July 1990)
  • The Story Of Electrical Energy; Pt.2 (August 1990)
  • The Story Of Electrical Energy; Pt.2 (August 1990)
  • The Story Of Electrical Energy; Pt.3 (September 1990)
  • The Story Of Electrical Energy; Pt.3 (September 1990)
  • The Story Of Electrical Energy; Pt.4 (October 1990)
  • The Story Of Electrical Energy; Pt.4 (October 1990)
  • The Story Of Electrical Energy; Pt.5 (November 1990)
  • The Story Of Electrical Energy; Pt.5 (November 1990)
  • The Story Of Electrical Energy; Pt.6 (December 1990)
  • The Story Of Electrical Energy; Pt.6 (December 1990)
  • The Story Of Electrical Energy; Pt.7 (January 1991)
  • The Story Of Electrical Energy; Pt.7 (January 1991)
  • The Story Of Electrical Energy; Pt.8 (February 1991)
  • The Story Of Electrical Energy; Pt.8 (February 1991)
  • The Story Of Electrical Energy; Pt.9 (March 1991)
  • The Story Of Electrical Energy; Pt.9 (March 1991)
  • The Story Of Electrical Energy; Pt.10 (May 1991)
  • The Story Of Electrical Energy; Pt.10 (May 1991)
  • The Story Of Electrical Energy; Pt.11 (July 1991)
  • The Story Of Electrical Energy; Pt.11 (July 1991)
  • The Story Of Electrical Energy; Pt.12 (August 1991)
  • The Story Of Electrical Energy; Pt.12 (August 1991)
  • The Story Of Electrical Energy; Pt.13 (September 1991)
  • The Story Of Electrical Energy; Pt.13 (September 1991)
  • The Story Of Electrical Energy; Pt.14 (October 1991)
  • The Story Of Electrical Energy; Pt.14 (October 1991)
  • The Story Of Electrical Energy; Pt.15 (November 1991)
  • The Story Of Electrical Energy; Pt.15 (November 1991)
  • The Story Of Electrical Energy; Pt.16 (December 1991)
  • The Story Of Electrical Energy; Pt.16 (December 1991)
  • The Story Of Electrical Energy; Pt.17 (January 1992)
  • The Story Of Electrical Energy; Pt.17 (January 1992)
  • The Story Of Electrical Energy; Pt.18 (March 1992)
  • The Story Of Electrical Energy; Pt.18 (March 1992)
  • The Story Of Electrical Energy; Pt.19 (August 1992)
  • The Story Of Electrical Energy; Pt.19 (August 1992)
  • The Story of Electrical Energy; Pt.20 (September 1992)
  • The Story of Electrical Energy; Pt.20 (September 1992)
  • The Story Of Electrical Energy; Pt.21 (November 1992)
  • The Story Of Electrical Energy; Pt.21 (November 1992)
  • The Story Of Electrical Energy; Pt.22 (January 1993)
  • The Story Of Electrical Energy; Pt.22 (January 1993)
  • The Story of Electrical Energy (April 1993)
  • The Story of Electrical Energy (April 1993)
  • The Story Of Electrical Energy; Pt.24 (May 1993)
  • The Story Of Electrical Energy; Pt.24 (May 1993)
  • The Story Of Electrical Energy; Pt.24 (June 1993)
  • The Story Of Electrical Energy; Pt.24 (June 1993)
Articles in this series:
  • Amateur Radio (November 1987)
  • Amateur Radio (November 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (December 1987)
  • Amateur Radio (February 1988)
  • Amateur Radio (February 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (March 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (April 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (May 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (June 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (July 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (August 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (September 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (October 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (November 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (December 1988)
  • Amateur Radio (January 1989)
  • Amateur Radio (January 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (April 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (May 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (June 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (July 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (August 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (September 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (October 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (November 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (December 1989)
  • Amateur Radio (February 1990)
  • Amateur Radio (February 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (March 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (April 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (May 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (June 1990)
  • Amateur Radio (July 1990)
  • Amateur Radio (July 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • The "Tube" vs. The Microchip (August 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (September 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (October 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (November 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (December 1990)
  • Amateur Radio (January 1991)
  • Amateur Radio (January 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (February 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (March 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (April 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (May 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (June 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (July 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (August 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (September 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (October 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (November 1991)
  • Amateur Radio (January 1992)
  • Amateur Radio (January 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (February 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (March 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (July 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (August 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (September 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (October 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (November 1992)
  • Amateur Radio (January 1993)
  • Amateur Radio (January 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (March 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (May 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (June 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (July 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (August 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (September 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (October 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (December 1993)
  • Amateur Radio (February 1994)
  • Amateur Radio (February 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (March 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (May 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (June 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (September 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (December 1994)
  • Amateur Radio (January 1995)
  • Amateur Radio (January 1995)
  • CB Radio Can Now Transmit Data (March 2001)
  • CB Radio Can Now Transmit Data (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • What's On Offer In "Walkie Talkies" (March 2001)
  • Stressless Wireless (October 2004)
  • Stressless Wireless (October 2004)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • WiNRADiO: Marrying A Radio Receiver To A PC (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • “Degen” Synthesised HF Communications Receiver (January 2007)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • PICAXE-08M 433MHz Data Transceiver (October 2008)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Half-Duplex With HopeRF’s HM-TR UHF Transceivers (April 2009)
  • Dorji 433MHz Wireless Data Modules (January 2012)
  • Dorji 433MHz Wireless Data Modules (January 2012)
Articles in this series:
  • Remote Control (October 1989)
  • Remote Control (October 1989)
  • Remote Control (November 1989)
  • Remote Control (November 1989)
  • Remote Control (December 1989)
  • Remote Control (December 1989)
  • Remote Control (January 1990)
  • Remote Control (January 1990)
  • Remote Control (February 1990)
  • Remote Control (February 1990)
  • Remote Control (March 1990)
  • Remote Control (March 1990)
  • Remote Control (April 1990)
  • Remote Control (April 1990)
  • Remote Control (May 1990)
  • Remote Control (May 1990)
  • Remote Control (June 1990)
  • Remote Control (June 1990)
  • Remote Control (August 1990)
  • Remote Control (August 1990)
  • Remote Control (September 1990)
  • Remote Control (September 1990)
  • Remote Control (October 1990)
  • Remote Control (October 1990)
  • Remote Control (November 1990)
  • Remote Control (November 1990)
  • Remote Control (December 1990)
  • Remote Control (December 1990)
  • Remote Control (April 1991)
  • Remote Control (April 1991)
  • Remote Control (July 1991)
  • Remote Control (July 1991)
  • Remote Control (August 1991)
  • Remote Control (August 1991)
  • Remote Control (October 1991)
  • Remote Control (October 1991)
  • Remote Control (April 1992)
  • Remote Control (April 1992)
  • Remote Control (April 1993)
  • Remote Control (April 1993)
  • Remote Control (November 1993)
  • Remote Control (November 1993)
  • Remote Control (December 1993)
  • Remote Control (December 1993)
  • Remote Control (January 1994)
  • Remote Control (January 1994)
  • Remote Control (June 1994)
  • Remote Control (June 1994)
  • Remote Control (January 1995)
  • Remote Control (January 1995)
  • Remote Control (April 1995)
  • Remote Control (April 1995)
  • Remote Control (May 1995)
  • Remote Control (May 1995)
  • Remote Control (July 1995)
  • Remote Control (July 1995)
  • Remote Control (November 1995)
  • Remote Control (November 1995)
  • Remote Control (December 1995)
  • Remote Control (December 1995)
Versatile 4-digit coIDhination lock Here's a 4-digit lock that will prove useful in many security applications. It's easy to build and can be quickly programmed by setting four on-board DIP switches. By GARY IOPPOLO Keypad locks are often far more convenient to use for accessing secured areas or systems than conventional keys. They can provide better security too and offer far greater flexibility if the security system needs changing. We all know about the disadvantages of conventional keys. They are cumbersome to carry around, can be 70 SILICON CHIP easily lost and are easily copied. By contrast, this electronic lock only requires the user to remember a 4digit code. It's based on three lowcost ICs and is bound to prove useful in applications such as burglar alarms, security doors and gates, computer systems, ignition killers and a host of other areas. So let's get on with it and take a look at some of the features of this versatile circuit. The design considerations were straightforward: the circuit had to be low in cost, yet extremely versatile; the PC board was to fit inside a standard GPO (general purpose outlet) wall box; and the code was to be entered via a keypad. The keypad is a standard 3 x 4 decimal keypad as used in some telephone diallers. A 4-digit code is used to .unlock the the unit and all the digits from 0-9 plus the"*" key can be used to make up the combination. This gives you 14,641 possible combi11ations, which should be more than enough for most applications. The remaining key oa the keypad, the "#" key, is used to reset the circuit if you make a mistake entering the code. The 4-digit code is set using four PARTS LIST 1 decimal keypad (Altronics Cat. S-5380) 1 PC board, Altronics Cat K1925 4 4-way DIP switches 8 PC pins 1 9V battery snap 1 7-pin male transit connector 1 7-pin female transit connector 8 AAA 1.2V nicad cells or one 9V nicad battery (not included in kit; see text) 1 2MQ miniature vertical trimpot The keypad of the 4-digit combination lock is mounted on a blank mains wall plate, while the electronic circuitry & backup battery fits inside the wall box. The 4-digit code is programmed in by setting four 4-way DIP switches. on-board 4-way DIP switches. Each switch is used to set a binary code and this code is compared to the code from the keypad decoder. Because DIP switches are used, rather than wire links, the code can be easily changed at any time. The DIP switches also guarantee that the code is retained even if power is removed from the circuit. In addition, you can wire the circuit for momentary or latched operation and there is provision for battery back-up so that you're not locked out during a mains failure. A single wire link is used to determine whether the circuit operates in latched or momentary output mode. The time interval for momentary output is adjustable from about 0.5 to 20 seconds by means of an on-board trimpot. In latched mode, the output remains on (unlocked) after the correct code is entered until the # (reset) key is pressed. The output of the combination lock is an open-collector transistor that can switch load currents of up to 0.6A and voltages up to 30V. When the transistor turns on, it also lights a LED to indicate the unlocked condition. This LED is located on the front panel, to the lower left of the keypad (see photo) No tricks There's no way that you can trick this keypad. For starters, the circuit is designed to automatically reset if any key is pressed out of sequence. Also, only one key can be registered at any one time, so you can't fool the circuit by pushing all keys at once. Keys that are pressed too quickly in sequence will also be ignored. To register, each key must be held down for longer than the debounce period. Finally, the 4-digit code must be entered within a 5-second period, otherwise the lock will reset regardless as to whether the correct code was entered or not. Backup power Any mains-derived DC power supply capable of delivering 11-30V DC can be used to power the circuit, and there is provision to recharge a nicad back-up battery. This backup battery can consist of either a single 9V nicad battery or 8 AAA (1.ZV) nicad batteries. The current consumption in standby mode is about 400µA which means that AAA 180mAh nicads will Semiconductors 1 4017 decade counter (IC1) 1 7 4C922 keypad decoder (IC2) 1 4030 quad XOR gate (IC3) 2 BD681 Darlington transistors (01 ,03) 1 BC549 NPN transistor (02) 3 1N4002 diodes (D1 ,D2,D30) 33 1N914 diodes (D3-D29, D31-D36) 1 11 V 400mW zener diode (ZD1) 1 6.8V 400mW zener diode (ZD2) 1 red LED (LED 1) Capacitors 1 47µF 35VW PC electrolytic 1 47µF 16VW PC electrolytic 3 10µF 19VW PC electrolytics 1 4.7µF 1'6VW PC electrolytic 1 1µF 16VW electrolytic 1 0.1 µF monolithic 1 .01 µF monolithic Resistors (0.25W, 5%) 1 10MQ 3 10kn 10 1MQ 1 3.3kQ 2 100kQ 1 4700 1 47kQ 1 R1 (see text) Miscellaneous Hookup wire, tinned copper wire for links, solder, etc. last about 18 days from full charge. We'll talk more about backup batteries later on, in the constructional notes. How it works Take a look now at the circuit of Fig.1. It can be broken down into four main sections: a power supply, the keypad and its associated decoder (ICZ), a sequencer (ICl), and a comparator stage (IC3 & D31-34). Each DECEMBER 1990 71 Although IC sockets were used on the prototype, these can be considered . optional. The keyboard is affixed to the mounting plate by gluing the corners with 5-minute Araldite. section will be discussed in quite a bit of detail, as this detail will be beneficial if it comes to troubleshooting. We'll start with the power supply which is at the top of the diagram. A regulated power supply with a low standby current consumption is necessary for this circuit. This meant that 3-terminal regulators such as the 7805 were out of the question, since these have a standby current of around 5mA - too much for a battery backup supply. It was time to try a transistor regulator circuit but it was soon found that a couple milliamps were needed for the transistor base current and its associated zener diode in order to obtain an adequate output current. This problem was solved by using a high gain Darlington transistor (Ql) . The Darlington used is a BD681 and this operates in conjunction with ZD2 which sets the regulator output to about 6V. The final circuit consumes only about 200µA with no load, making it ideal for use with a back-up battery. It will also regulate any DC input voltage between 11-30V. Normally, the backup batteries are trickle charged from the main supply rail via Rl. The value of this resistor is dependent on the supply voltage 72 SILICON CHIP and can be obtained from Table 1. It sets the charging current to somewhere between 1.5mA and 2.5mA while ever the main supply is active. If the main supply fails for any reason, D2 becomes forward biased and the backup batteries supply power to the circuit via the regulator. ZDl prevents the batteries from overcharging, while Dl prevents the batteries from discharging back through the supply if the supply voltage drops to a low value. It also provides reverse polarity protection for the circuit. Keypad decoding A single integrated circuit (IC2) is used to provide the keypad decoding logic. IC2 is a 74C922 hex keypad decoder from National Semiconductor. It is designed to scan a 4 x 4 (4 columns, 4 rows) keypad and output a binary value on. pins 14-17 which corresponds to the value of the keypress. In this design, we are using a 3 x 4 keypad but this is no problem since we just ignore one of the column outputs which the 74C922 normally uses to scan the keypad. In this case, the Xl output at pin 11 is not used. As a result, the binary value at the ABCD outputs (pins 17-14) does not match the value of the keypress but in this circuit that's of no consequence. All you have to do is to set each DIP switch as shown in Table 2 to obtain the required key value. A "1" in the binary code means that the corresponding switch is on and vice versa. Note that each DIP switch has four switch settings, with the leftmost switch corresponding to the most significant bit. Only a few other components are used in the keypad decoder circuitry. These include a 4. 7µF debounce capacitor on pin 6 and a lµF oscillator capacitor on pin 5. These set the debounce period to about 50ms and the keyscan oscillator frequency to about 60Hz. The only other connections to IC2 are at the Data Available (D/ A) output (pin 12) and the Output Enable (OE) input (pin 13). Both these connections are used to interface the 74C922 to the sequencer circuitry. The DI A output goes high during a keypress and returns to the low state when the key is released. The OE input enables the outputs when low and returns them to a high impedance state when high. Sequencer The sequencer circuit is based on a very busy 4017 CMOS decade counter. It is reponsible for driving the DIP switches, triggering the output transistor (Q3), maintaining the code sequence and responding to various reset conditions. Briefly, this part of the circuit operates as follows. The Q0-Q4 outputs of ICl drive DIP switches Sl-S4 respectively and the outputs of these switches are applied to one set of inputs of XOR (exclusive-OR) gates IC3a-lC3d via diode OR gates D6-D21. Fig.1: the circuit uses keypad decoder • IC2 to scan the decimal keypad. When a key is pressed, this IC outputs a 4-bit binary code on pins 17-14 (A-D) & also clocks decade counter ICl which drives the DIP switches. XOR gates IC3a-d then compare the 4-bit code from IC2 with the corresponding DIP switch setting and generate a reset pulse if the wrong key is pressed. If no reset pulse is generated, Q4 of ICl goes high on the fourth keypress and turns on transistor Q3 to switch the load. PRE-REGULATED SUPPLY 01 BD681 + ~ - - + - - - ---1r---.-+6V + 10 16VWJ 10k VIN 11-30V EXT. SUPPLY +5-30V 47 t ··-r .,. .,. ':" +6V 100k 4.7 + 16VW! 5.6k .,. 1N91 4 10 I + 16VW! t +6V 15 10M o.1I .,. 04 10 RST IC1 4017 .,. 03 +6V 13 EN CLK 4 1M . .,. +V 1M 1M . .,. D24 1N91 4 + 47 16VW: D29 1N91 4 .,. 1 DE 12 D/A 1 Y1 +6V 1M .01J B 18 +6V D26 D27 4x1N914 D 14 3 Y3 IC2 74C922 C 15 B 6 4 7 17 Y4 X4 DSC KB 6 ·~ t 6V\\' ~ ECB 1 16VW 1M 1M .,. 4.7 B X3 10 X2 5 eOc VIEWED FROM BELOW .,. Y2 D25 1M .,. 1M .,. .,. 4-DIGIT COMBINATION LOCK .~. DECEMBER 1990 73 0/C OUTPUT :LED1 ~~!--"-GND BATTERY+ VIN +11-30V ~ :.,,..--GND .'>.~ ""-Mif--PRE-REGULATED SUPPLY Fig.2: to save space, all the resistors on the PC board are mounted end-on, with the eight lMQ resistors made into two 4-way single in-line packages (see Fig.3). Refer to Fig.1 for the pinout details when mounting transistors Ql, Q2 & Q3 on the board. As shown here, the DIP switches are set for a code of 1879 but you should choose your own code. The other inputs of the XOR gates are connected to the binary output lines from the keypad decoder, IC2. Thus, each time a key is pressed, the XOR gates compare the binary output from IC2 with the corresponding DIP switch setting. If the values match, the XOR gate outputs all remain low. However, if the values don't match (ie, a wrong key is pressed), one or more of the XOR gate outputs goes high. The XOR outputs are then OR'ed using diodes D31-34. Let's now look at what happens in a bit more detail. Since Q0 is connected to the Output Enable on IC2, the latter's output lines (pins 17-14) will all be in the high impedance state during standby mode. These lines are pulled low by four lMQ resistors and thus place a logic 0 on pins 2, 6, 8 & 12 of the XOR gates (IC3a-d). At the same time, Q1Q9 ofICl are also all low and thus the DIP switch outputs will all be low. So, in standby mode, all inputs to the XOR gates are low and thus their outputs are also low. This means that D5 will be forward biased and so D36's anode will be held low. Now let's take a look what happens when a key is pressed. When this happens, the DI A output of IC2 goes high and clocks ICl. Ql of ICl now switches high and this high is applied to the first DIP switch (Sl). Depending on the setting of the DIP switch, this will apply a high or low to the remaining inputs of the XOR gates via diodes D6-D9. For example, let's say that Sl is set to 0101. This means that pins 6 & 8 of Sl will switch high when Ql of ICl goes high and so pin 5 of IC3b & pin 9 of IC3c will be pulled high. If this binary pattern matches the setting of the first DIP switch, each XOR gate will have the same logic level on its two inputs. Thus, the XOR gate outputs will remain low and no reset pulse will be generated. If the next key in the seqvence is now pressed, IC2's DIA output goes high again and clocks ICl to Q2. This output drives DIP switch S2 and its setting is again compared with the binary output from IC2. If all four keys are pressed in the correct sequence, Q4 of ICl switches high and turns on the Darlington output transistor, Q3. Q3 is used to switch the load (eg, a relay or solenoid-operated door strike). LED 1 provides visual indication of the unlocked condition (ie, it lights when Q3 is on), while D30 quenches any back EMF which may be generated by inductive loads. Wrong key Let's now consider the situation if we hit a wrong key during the code entry. When this happens, the output code from IC2 will no longer match CAPACITOR CODES o 0 0 Value 0.1µF .01µF IEC Code EIA Code 100n 10n 104 103 RESISTOR COLOUR CODES 0 0 0 0 0 0 0 0 74 No. Value 4-Band Code (5%) 5-Band Code (1%) 1 10 2 1 3 10MQ 1MQ 100kQ 47kQ 10kQ 3.3kQ 470Q brown black blue gola brown black green gold brown black yellow gold yellow violet orange gold brown black orange gold orange orange red gold yellow violet brown gold brown black black green brown brown black black yellow brown brown black black orange brown yellow violet black red brown brown black black red brown orange orange black brown brown yellow violet black black brown 1 SILICON CHIP and no reset pulse will be generated. However, if the output code goes to 1111 (ie, the # key is pressed), D29's anode will be pulled high by the lMO resistor and a reset pulse will be applied to pin 15 of ICl. Because the "#" key is used as a reset key, it cannot be used as part of the combination. All the other keys, including the "*" key, can be used, however. Code entry period , This close-up view shows one of the 4 x 1MQ SIP resistor assemblies (see also Fig.3). The other SIP assembly can be seen adjacent to IC2 at the back of the PC board. Note the 4-way DIP switches which are used to set the code. the corresponding DIP switch setting and so different logic levels will be applied to the inputs of one or more of the XOR gates. The outputs of these XOR gates will thus switch high and D5 will cease conducting. The reset line is now pulled high via the associated 100kO resistor and diode D36. This high resets ICl, so that we're now back where we started from, with Q0 high. Momentary operation VRl, D35 and the associated 47kO resistor and l0µF capacitor provide the time-out period when the circuit is wired for momentary operation. When the output is enabled (ie, the correct code has been entered), ICl's Q4 output charges the toµF capacitor via the 47kO resistor and VRl. Eventually (after one time constant), the voltage on the capacitor pulls the reset line high via D3 and this resets IC1, thus switching off the output transistor. VR1 allows this time period to be set anywhere between 0.5 and 20 seconds. For latched operation, the toµF capacitor is simply shorted out so that it cannot charge by installing a wire link (shown dotted on Fig.1) across its terminals. The 0. lµF capacitor on pin 15 of IC1 is used to decouple the reset line to prevent false triggering. As a further precaution, when the output is enabled, the clock enable (pin 13) input of IC1 is taken high after a small delay produced by the 5.6k0 resistor and 4.7µF capacitor on the Q4 output. This prevents further clocking of ICl until it has been reset and prevents the output transistor (Q3) from switching on if an incorrect entry is made on the fourth keypress. Also, when Darlington transistor Q3 turns on, it disables the comparator output by pulling the anode of D36 low via D4 to prevent any reset pulses from being generated by additional key presses. The only way to reset the unit when the output is enabled is to press the "#" key, or to wait for it to time out if it is in momentary mode. The "#" key is detected by ANDing the four data lines from IC2, since the output code when this key is pressed is 1111. This AND gate function is performed by diodes D25-28 and the associated lMO resistor. Normally, at least one of the output lines from IC2 will be low and so the anode of D29 will be pulled low by one or more of the diodes in the AND gate Table 1: Charging Resistor Volts (VtN) 12-15 15-18 18-24 24-30 R1 Value 2.2kO 3.9kO 6.8kO 10k0 Transistor Q2 and its associated components set the code entry period (ie, the period of time during which the code must be entered on the keypad). In standby or output enabled mode, Q0 or Q4 of ICl is high, and so transistor Q2 is turned on via D22 or D23. While ever Q2 is on, the 47µF capacitor across its output is discharged and D24 is reverse biased. However, while the user is part way through the code, Q0 and Q4 of ICl are both low, transistor Q2 is off and the 47µF capacitor charges towards the supply rail via a 100kO resistor. If the code in not entered within the period set by this RC time constant (about 5 seconds), the voltage across the capacitor will eventually go high enough to reset ICl. So you've got just 5 seconds to enter the code. If an incorrect number is pressed during code entry, Q0 ofICl switches high and Q2 turns on and discharges the 47µF capacitor. This ensures that you get the full 5 seconds to enter the code on each attempt. Construction The PC board for this project is fairly compact and consists of many fine tracks. Before starting assembly, it's a good idea to check the board for any shorts or discontinuites in the trackwork. It might also pay to check the hole sizes for the DIP switches and the PC pins and enlarge them if necessary. You will need a fine, clean soldering tip for this job and plenty of light, as there is not a great deal of space to work in on the board. Also, try not to spend too long soldering a joint, as these fine tracks have a tendency to lift if they get too hot. Be especially careful with solder bridges and splashes as well, as it's not hard to short tracks on this board. Fig.2 shows the parts layout on the PC board. Begin the assembly by mounting all the diodes and wire DECEMBER1990 75 box, it's best to mount the PC pins on the copper side of the board. Back-up battery If you mount the keypad on a mains wall plate as shown here, the PC board is best attached via matching 7-pin transit connectors. If the keypad is mounted away from the board, the two can be wired together using ribbon cable. If you intend using the unit to control a door strike, you will have to make up a suitable battery pack. Unfortunately, you cannot use a l00mAh 9V nicad battery here as it will have insufficient current capacity to ensure reliable operation. The best approach is to make a battery pack of 8 x AAA nicad cells. These have a current rating of about 180mAh (nearly twice that of the 9V nicads), so they will operate door strikes easily. They should all be connected in series by soldering leads to their positive and negative terminals, and then taped up so that they cannot short against the wall box or to the underside of the PC board. Be careful not to get the batteries too hot during soldering and don't spend too long on any one joint. Check the completed assembly by measuring the output voltage. You should get a reading of about 9.6V. 4R Testing "' N Fig.3: here's how to make the two 4 x 1MQ resistor SIP assemblies. Begin each assembly by soldering the four resistors to the PCB. Fig.4 (right) shows the cutout details for the blank wall plate. 3 DIA. 57 N "' 24 DIMENSIONS IN MILLIMETRES links. If you intend using IC sockets, mount these now as well. Now it's time to make some home-made resistor SIPs (Single Inline Packages). If you haven't already noticed, all the resistors on this PC board are mounted vertically. This was done to save space and thus give a more compact board. You may also have noticed that two groups of 4 x lMQ pull-down resistors all share a common earth, so each group is made into a 4-resistor SIP pack. Fig.3 shows how this is done. It's best to start off by soldering one end of each resistor in the SIP arrangement to the PC board. The top lead of the resistor furthest from the earth pad is then bent across the other three resistors as shown in Fig.3, and 76 SILICON CHIP then down to the earth pad. Finally, the top leads from the other resistors are all soldered to this earth lead. The rest ofthe resistors can now be installed, followed by the trimpot, capacitors and transistors. Make sure you get all polarities correct on the capacitors and transistors as any mistakes here could fuse the tracks on this board. The 47µF capacitor adjacent to QZ is the one rated at 16VW. The other 47µF capacitor must be rated at 35VW and goes next to the pre-regulated output terminal see Fig.2). You can now complete the PC board assembly by installing the multi-pin connector, DIP switches and PC pins at all external wiring points. If you intend mounting the unit in a wall Now that the board is completed and the battery back-up organised, we can test the circuit for correct operation. Connect the keypad to the PC board temporarily for the moment via a length of ribbon cable, as this makes testing and troubleshooting a bit easier (just tack the ribbon cable to the solder side of each PC board). With that done, let's give it a work out. Begin by connecting an appropriate DC supply to the main input terminals or just connect a 9V battery to the back-up battery terminals. This done, check the regulator output - it should be around 6V. If not switch off immediately and find the fault. If it's OK, check the supply pins on all the ICs to make sure they are getting power. Before we proceed any further, you will need to set up a combination. This is done via the DIP switches and Table 2 shows the switch settings for each key value. Before setting the switches, orient the board so that it faces towards you with the DIP switches along the bottom. The leftmost DIP switch represents the first digit of the code and so on to the right. Remember that you can use any key on the keypad except the"#" key, as this is the reset key. the "#" key during the time-out period and check that the unit resets. Finally, check that the circuit is reset by an invalid key entry (ie, pin 3 of ICl switches high) . OK, you now have a working combination lock, so let's put it to work. Installation The eight AAA nicad batteries are first soldered in series and then wrapped in plastic insulation tape. They sit in the bottom of the wall box, below the PC board, and are connected via flying leads to the PC stakes. Initially, when first switched on, the unit will be in an unknown state but after about 5 seconds will be reset by the time-out circuit. You may also reset it during this time by pushing the"#" key. After resetting, check that pin 3 of ICl is high (ie, at +6V) and that pins 14-17 of IC2 are all low. If everything is OK, enter the first digit of the code on the keypad and check that pin 2 of ICl is now high. Wait for 5 seconds and check that pin 3 switches high again. If so, you can assume that the entry period circuitry is working. If not, check transistor Q2 and its associated components. Made it this far? Now try entering the complete 4-digit code correctly. As soon as the fourth digit is entered, the LED should light. Assuming that the unit is wired for momentary output (link open), the LED should then extinguish after the time-out period set by VRl. Verify this and then enter the code correctly once again. Push any key but the "#" key and check that the LED remains on. Now press Table 2: DIP Switch Settings Key DIP Value 1 2 3 4 5 6 7 8 9 0001 0010 0011 0101 0110 0111 1001 1010 1011 1101 1110 1111 . 0 # Where to buy the kit A complete kit of parts for this project is available from Altronics Pty Ltd, 174 Roe St, Perth, WA 6000. You can also order by calling toll free on (008) 99 9007 and quoting your credit card number or by mail order from PO Box 8350, Stirling Street Exchange, Perth 6000. Prices are as follows: Kit of parts (Cat. K-1925) .............................................................. $39.95 Door strike (Cat. S-4390) ........................................................... ... $39.95 Blank mains wall plate ... ................................................................. $4.00 Eight AAA 1.2V nicad cells (Cat S-5021) ............................ .......... $28.00 12V DC 300mA plugpack ... ........................................................... $15.95 Note: copyright© of the PC board is retained by Altronics Pty Ltd. Before installing the unit, you first have to choose between momentary or latched operation. For momentary output, just leave the board exactly as shown in Fig.2. For latched operation, either remove the lOµF capacitor immediately adjacent to VRl and replace it with a wire link, or simply bridge its pads on the solder side of the PC board. Remember that if you opt for a latched output, the only way to reset the unit is to press the "#" key. If the load is polarised, connect its negative terminal to Q3's open-collector output terminal and the positive to an external power supply. This external supply can be the pre-regulated output from Dl, the main supply to the keypad, or a completely different external supply. In most cases, you can simply connect the positive of the load to the pre-regulated supply terminal (see Fig.2). This scheme will give you the advantage of battery back-up should the main supply fail. If a totally different external supply is used, it must share a common earth with the keypad circuitry. If you intend using a door strike with the unit, the S-4390 from Altronics is suitable. This is a 12V 400mA unit and is ideal for the ·purpose. Finally, you need to decide how the keypad is to be mounted. You have two choices here: fix the board directly to the keypad or connect it via a length of ribbon cable. If the unit is to be installed in a wallbox, it's best to mount the keypad via a 7pin transit connector (see photo). The recommended wall box is the Clipsal NO157 which measures 95 x 54mm and has a depth of 37mm. Note that other types of wall boxes may not have sufficient depth to accommodate the batteries. Fig.4 shows the dimensions of the cutout for mounting the keypad on a blank mains wall plate. The keypad and LED can be secured to the mounting plate using 5-minute Araldite. DECEMBER1990 77