Access control system

User Interface
Sound interface
CSIM Logo WelcomeCourses
Faculty, Student, Staff
Projects and reports
Conferences, workshop and seminars
Laboratories and reasearch facilities
Information related to CSIM
Information non-related to CSIM
Address, map, phone, etc.


The system is build around a Pentium 4, 1.5 GHz machine with 512 MB memory and 40 GB disk, running FreeBSD 6.3, with one keyboard, one monochrome 14" screen, one mouse, a video capture card based on Brooktree 848 chip, and a relay card attached to the parrallel port.

We have a pile of old machines that cannot be used as desktop anymore and that are powerfull enough to run the system, same applies for keyboard, mouse and screen (I am using a machine that was a midle-end desktop bought in August 2002). Regarding the screen, a flat screen would be easier to install close to the door, but it is not yet some item available among discarded equipment.

As for the video capture card, the Brooktree 848 chip is used by many manufacturers, it has a driver available for FreeBSD, and I had such a card as well as a cheap video camera available among the unused junk around. It happens that the camera I have is powered with +12VDC, so I can use the server power supply to run the camera.

Inside the PCFor the relay card, I bought a QK 74 from QualityKits. This relay card is simply managed by the parallel port of a PC, printing a value binary 1 on the bit 1 would turn the relay 1 on, while printing a binary value 0 on bit 1 wouldturn the relay 1 off. Simple enough, no need for specific driver. The card needs +12VDC power supply that can be easilly retreived from the server. It is also worth mentionning that this is card is cheap and can be ordered from the Internet.

Other equipment would comprize some cable, a parallel cable to link the parallel port of the computer to the relay card, a magnetic lock (+12VDC, 300mA, once again it can be powered by the server), one button to unlock the door from inside, a couple of 12VDC small lights indicators (LEDs) that can be used to signal that the door is currently unlocked, a bell (a siren electronic kit and a PC speaker), a video cable to connect the camera to the video capture card, some connectors, a contact switch to detect if the door is open or closed. The sound interface is build around the on mother board sound system and a couple of cheap speaker.

As contact switch, I used a magnetic contact switch, of the same type used for alarms on doors and windows of an house. As I was not sure if I would be able to find such a contact switch, the system would work without it. But then it would not be able to detect if the door remains open for too long.

On the relay card, I need only 2 relays. I choosed to use relay 2 and 3 (relay 1 was made inactive after a wrong move I did when testing the card, see warning below). Relay 2 will control the magnetic lock and light inidcator, relay 3 will control the alarm. Each relay has 2 contacts, one when the relay is open and one when the relay is closed.

  Relay open Relay closed
Relay 2 Send 12V to light indicator Send 12V to magnetic lock
Relay 3   Send 12V to the alarm

Relay cardThe door will be locked when the relay 2 is closed (sending binary value 1 on bit 2 of parallel port), else the door will be unlocked and light will indicate that the user can open the door. In a same way the alarm will ring if bit 3 is 1.

On each realy screw terminal (the green thing with 3 screws) contact C means common, when the relay is open, C will be in contact with NO (open) and when the relay is closed, C will be in contact with NC (closed). On both relay, C is connected with +12VDC from the computer power supply. Green wire on relay 2, connected to NO will send 12V when the relay is open, that is when the magnintic lock is inactive, green wire goes to the light indicator. VCiolet wire ic connected to NC and will send 12V when the relay is closed, it is the command of the magnetic lock.

On relay 3, orange wire will send 12V when the relay is closed, because it is connected to NC. It is the alarm control. Note the red wire that is +12V permanent.

DB9 connectorAfter I assembled the relay card, I was able to mount it in the server case.

One problem remains to interface the button and the contact switch to the server. I choosed to interface them to the mousse buttons 1 and 2. Mouse buttons are simple switches, it is easy to open an old mouse and connect wires on the contact point of the buttons at one end and to the button and contact switch at the other end.

To finish with, I used a DB9 female connector (as there is permanent +12V, it is better to use a female connector), attached to the server case, to do the interface between the machine and the external devices. The cabling of the connector is as shown on the figure. There is one common ground used for all the +12V signal, a permanent +12V that is used to power the camera.

On the bottom row, 4 pins to connect to the mouse switches and the door button and contact switch. on the mouse I used, there is a common contact for both switches, so I could use only 3 of the 4 pins.

The button to open the door is connected to mouse button 1, and the contact switch is connected to mouse button 2. This cabling correspond to fixed values in the software.

This cabling is indicative only, but using a connector provides a good and nice way to connect all the equipment to the server.

Warning: I highly recommend that you stop the computer and disconnect everything before you do any soldering. Your soldering iron may not be properly grounded and it could send current to the mouse or to the motherboard of your machine. You are likely to make some short-circuits that could damage the power supply of your computer. So better play it safe.

I also added a PC starter so the machine will turn-on automatically after a power failure.

Previous: User Interface & Security Next: Software

CSIM home pageWMailAccount managementCSIM LibraryNetwork test toolsSearch CSIM directories
Contact us: Olivier Nicole CSIM    SET    AIT Last update: Feb 2008