Wednesday, April 10, 2013

Simple card access control system


Simple card access control system

Click for larger image
This card access control system for medium-to-low security situations can be built at a relatively low cost and is more fun than a keypad. The circuit can be driven by the smallest of microcontrollers, say a PIC12C508A, and only requires simple assembly code to run.
The concept is quite simple - a cardboard or plastic card (with holes punched) is slipped between two PC boards separated by a plastic spacer. This spacer also helps to guide the access card into position.
When the access card is inserted all of the way to the back of the spacer, it hits a small rubber mat attached to a flexible metal clip which makes up one half of the "card present" switch. This flexible clip is forced against a small metal contact plate, resulting in the trigger line going low. This tells the microcontroller that a card is present.
The microcontroller can then pulse the clock line while reading the sense line. A low signal on the sense line indicates the presence of a hole.
If you are using the unit in bright sunlight, it is advisable to read the sense line with an A/D converter input, to allow for variations in ambient light conditions. If no A/D converter input is available, a simple op amp input circuit would work just as well.
Click for larger image
The circuit uses infrared LEDs and phototransistors, while the access card is covered with IR lens material on each side. This not only minimises problems with ambient light but also means that the holes in the access card are hidden (infrared lens material is readily available in sheets from Farnell Electronics).
IC1, a 4017B decade counter, counts up on every clock cycle (only one pin high at any time) from the microcontroller. Its outputs in turn drive LEDs
1-7 via IC2, a ULN2003 Darlington array. If a LED shines directly onto its corresponding phototransistor (Q2-Q8) via a hole in the access card, the phototransistor will turn on, pulling the sense line to ground.
The sense line is fed back to the microcontroller. If the correct sequence of phototransistors turns on, the microcontroller turns on transistor Q1 to activate the relay and the door strike mechanism.
David Kadow,
Norwood, SA.

No comments:

Post a Comment