Arduino Wiegand Interface

From Chaospedia
Jump to: navigation, search

When creating a RFID interface with Arduino, there are a few commercial RFID readers available on the market. Most of these readers talk UART which is easy to interface but the cost of the device can be quite high. Cheap RFID readers are readily available on eBay. These readers talk Wiegand26 as a industry standard protocol. Currently, there are no Arduino libraries that can talk Wiegand26 so I have created this project to ease interfacing of Wiegand protocol devices


Protocol Background

The Wiegand protocol uses two data lines (DATA0 and DATA1) and a common ground. There is no clock line. When the device is idle, both Wiegand lines are held HI. To send a message, the transmitting device sends datas on the separate lines depending if it is a 0 or 1. If the data is a 1, the DATA1 line is pulled LOW and released. If the data is a 0, the DATA0 line is likewise pulled LOW and released.

Because there is no clock line, interfacing this is quite easy. A script needs to poll each DATA line, bitshift the 0 or 1, then determine when the message is complete. Most RFID readers on the market speak Wiegand26 which output a 26-bit message. In order to catch all data coming in, interrupts are used as opposed to digitalReads such that (hopefully) no data is lost upon transmission.

Project Overview

The goal of this project is to create a homebrew RFID access control system. I want to be able to unlock my front door with either RFID or PIN. I also want this interface to talk to software (yet to be written) that will handle all grants/denies and be able to log whenever someone seeks entry. I am currently searching for a way to make schedules to allow certain cards to work only at specified days and times.

Presently I am using an HID ProxPro with Keypad. This is decoded by an Arduino Duemilanove and its output is sent to the Ethernet Shield. Ultimately, the card data will be sent to my computer where the higher level decisions will be made. Until I get all the kinks out of that solution, the Arudino will be hard coded with RFID tag permissions. When a card is granted access, a DC door strike will be activated with one of the Arduino output pins.

Arudino Code

A link to the code will be posted as soon as it is cleaned up and commented. The main bitshifting functions are chopped up from Crazy People

The repository is hosted at

External Links


HID ProxPro with Keypad attached to Arduino with serial LCD interface
A ProxPro reader during initial testing of pure Wiegand protocol
Personal tools