How To Build A Simple Keypad-Operated Control Switch - With A Difference.
Do not use the "on-board" relay to switch mains voltage. The board's layout does not offer sufficient isolation between the relay contacts and the low-voltage components. If you want to switch mains voltage - mount a suitably rated relay - somewhere safe - Away From The Board.
Parts List
Construction
Click here if you're new to constructing stripboard projects.
The terminals are a good set of reference points. To fit them, you may need to enlarge the holes slightly. Then turn the board over and use a felt-tip pen to mark the 21 places where the tracks are to be cut. Before you cut the tracks - use the "actual size" drawing to Check That The Pattern is Correctly Marked .
Actual Size Of Pattern
When you're satisfied that the pattern is right - cut the tracks. Make sure that the copper is cut all the way through. Sometimes a small strand of copper remains at the side of the cut and this will cause malfunction. Use a magnifying glass - and backlight the board. It only takes the smallest strand of copper to cause a problem. If you don't have the proper track-cutting tool - a 6 to 8mm drill-bit will do. Just use the drill-bit as a hand tool - there's no need for a drilling machine.
Next fit the Ten Wire Links and the nine resistors. For the links - I used bare copper wire on the component side of the board. Telephone cable is suitable - the single stranded variety used indoors to wire telephone sockets. Stretching the core slightly will straighten it - and also allow the insulation to slip off.
The resistors are all shown lying flat on the board. However, those connected between close or adjacent tracks are mounted standing upright. See The Photograph Of The Prototype.
Next - fit the seven diodes - and the six capacitors. Pay particular attention to the orientation of the diodes and the electrolytic capacitor. Note that D6 and the electrolytic capacitor both have their positive terminals facing the bottom of the board. See The Photograph Of The Prototype.
Fit the transistor - the IC socket - and the relay. If you want the circuit to power-up with the relay energized - fit the PNP transistor shown above. It's the one with its emitter arrow coloured red. It will allow your security code to de-energize the relay.
If you want the circuit to power-up with the relay de-energized - fit the NPN transistor shown below. Note that it faces in the opposite direction. It will allow your security code to energize the relay.
Turn the board over and examine the underside carefully - to make sure that there are no unwanted solder bridges or other connections between the tracks. If you backlight the board during the examination - it makes potential problem areas easier to spot. When you're satisfied that everything is in order - add the 5 solder bridges. If you flip the above drawing horizontally - it will help you place them accurately.
Finish off by inserting the Cmos 4081 into the socket. Pin 1 of the IC should be in the top left-hand corner. Check that all 14 pins have entered the socket. Sometimes - instead of entering the socket - a pin will curl up under the IC.
You Are Now Ready To Test Your Circuit
Keypad Layout
One of the advantages of making your own keypad is that you can choose the number of keys in the pad. The more keys you use - the more secure will be the code. For example - a 12-key pad has 495 different groups of four keys. But a 16-key pad offers 1820 different groups.
You Are Now Ready To Test Your Circuit