This past summer I added an RFID access control system to one of the labs of a certain professor. I designed a PCB to control up to six electric strikes with an Arduino. It’s a straightforward circuit that switches 12V onto half a dozen transistors. It’s meant to work with iClass R15 RFID readers (readily and cheaply available on eBay!) from HID, but could potentially work with any reader system that uses the Wiegand protocol. Speaking of which…
The Wiegand protocol is a two-wire protocol often used in magnetic stripe card readers, and, of course, RFID readers. One wire carries zero bits (data0), and one carries one bits (data1). When there is no data to transmit, both lines are high. They are never simultaneously low. To send a one, the ones line is briefly pulled low while the zero line remains high. The reverse indicates a zero. The illustration below shows a simple example.
Taking the first bit in time as the least significant bit, we get what looks like the reverse of the above sequence: 0110011 = 51. And so it goes, the size of the key depending on the reader. I think it’s 26 bits for the HID R15.
The Wiegand Protocol is especially nice because it can propagate over fairly large lengths of wire – up to 500 feet.
Note: Parts list and schematic CAD files are on their way!
The RoboDoor9000′s electronics are straightforward. The Arduino polls pairs of its digital inputs, reads them according to the Wiegand Protocol, compares the result to a list of keys, and, should there be a match, turns on the corresponding analog output. Each output is connected to the base of a TIP130 NPN Darlington transistor. The collector of the transistor is connected to the ground pin of the electric strike, and the emitter to ground. Applying 5V to the base creates a conduction channel across the transistor, and connects the ground pin of the electric strike to actual ground, allowing current to flow through it, power it, and unlock it. The strikes that I used are ‘fail-secure’ meaning that they only unlock when they are powered. This is a good thing as long as you can still unlock the door with a conventional key if you need to get out, say, in an emergency. Please don’t make an electric strike the only way to open a door.
The PCB is laid out like this:
X1-X6 are the reader inputs, and X7-X12 are the outputs to the strikes. I used CAT5 for the readers and standard two-connector zip for the strikes. The resistors in the middle of the board are all 10k, while the ones connected to the bases of the transistors are 680k. These resistors specifically need to be sized correctly so that the proper current gets to the strike – enough to turn it on and not so much that it gets fried.
While the PCB was laid out with the HID iClass R15 reader in mind, it will work with any reader that uses the Wiegand protocol. Just make sure you use the right pins on the on-board six-pin Molex inputs and the two-pin outputs for your reader. Here they are:
There are two +5V on the six-pin inputs because the R15 has a pin that needs to be asserted in order for it to communicate sensibly. The pin labeled ‘TIP130 Collector’ should be connected to the ground pin of your electric strike.
Note: The arduino sketch for the RoboDoor9000 is not yet available, but it’ll be up soon!
The software for the RoboDoor9000 consists of a fairly simple Arduino sketch. There is plenty of room for expansion, especially when it comes to doing interesting things with the data from the reader. Adding a database to log the door usage, for instance.

The sketch polls pairs of inputs on the Arduino and, if their states are different, logs their states and sets the corresponding bit in a key array. When they are the same, they are ignored. Once the key array is full of bits, it is compared to an array of approved keys, and a success/failure message is vomited out to the serial monitor.

Be careful. With this board hooked up to 12V, you don’t want to short something and send that power in the wrong direction. I did just that (a stray strand of solder was lying under the board), and it fried the Atmega328 on the Arduino and thoroughly frightened my laptop. Apparently putting 12V into a USB port is a no-no. Put the final product somewhere far away from conductive things, or, ideally, in a box.
If you’d like to use the RoboDoor9000 PCB in your project, I have some extras and I will gladly sell you one for the princely sum of $15 + shipping.






One Trackback
[...] it out! This entry was posted in Uncategorized and tagged access control, rfid, robodoor9000, wiegand. [...]