Hello,
I am looking to build a door access system. I was able to dig up an old HID 310 Wiegand card reader and a few cards. I datasheet on the HID site doesn't give too much info. is there a library to communicate with this reader? I this is not the RFID proximity reader, but the old style Wiegand card reader.
Wiegand card readers?
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- Franklin97355
- Posts: 23912
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Wiegand card readers?
A link to your data sources would help.
- bgsneeze
- Posts: 13
- Joined: Fri Sep 11, 2009 5:14 pm
Re: Wiegand card readers?
this is the datasheet for the reader:
http://www.hidglobal.com/documents/wieg ... _ds_en.pdf
the back of the reader has +5V, Data1, Data0, L.E.D. and GND terminals.
http://www.hidglobal.com/documents/wieg ... _ds_en.pdf
the back of the reader has +5V, Data1, Data0, L.E.D. and GND terminals.
- philba
- Posts: 387
- Joined: Mon Dec 19, 2011 6:59 pm
Re: Wiegand card readers?
Wiegand is pretty easy to read. one line is for a 0 and the other is for a 1. Both are pulled high by the reader. The number you get from the reader is a series of 0 and 1 pulled low pulses on the two lines. Basically, you watch both lines and build the number on the fly, MSB first, iirc. http://www.ibtechnology.co.uk/pdf/magswipe_dec.PDF page 5 shows the wave form. You can use a period of 4 mS of no activity to terminate the read sequence. That way you can read different length card IDs automatically. I'd write a timer interrupt driven routine that does all that and sets a "new card read data" flag.
-
- Posts: 39
- Joined: Sat Jan 07, 2012 6:56 pm
Re: Wiegand card readers?
This is how I used my HID Card Reader. I is a tutorial, and I think I might redo it.
http://aksoapy29.comoj.com/arduinorfid.html
http://aksoapy29.comoj.com/arduinorfid.html
- bgsneeze
- Posts: 13
- Joined: Fri Sep 11, 2009 5:14 pm
Re: Wiegand card readers?
Any libraries to handle Weigand "protocol" or interfaces? I am wondering because it looks like there are different lengths of card numbers/RFIDs. One site lists 26 bits for the cards I have, and another lists that it could be 36 bits.
- philba
- Posts: 387
- Joined: Mon Dec 19, 2011 6:59 pm
Re: Wiegand card readers?
Yeah, there are 2 lengths of card IDs - this is because most companies want greater security with longer IDs. It gets worse because there is no standard for the layout of the bits. The 36 bit codes can have 4 parity bits spread in several different locations. So, you can't simply extract the id number from the card without knowing the format. I wouldn't worry about it, just take the whole id number, parity bits and all, and use that as your database index. I've never seen any read errors. The wiegand interface and protocol is ridiculously resilient - it's like 500 baud with 50 uS wide data pulses on one of two data lines. If you see pulses on both lines - reject it. I bet it would withstand an EMP! (ok, probably not...). Yes, you will have to swipe a card once to record it rather than just reading the tag number off the card (though many don't actually have it printed) but I've always felt that's a better approach anyway.
See my comment about how you can read the wiegand device without knowing the length in advance. I've tested this technique and it works nicely. Sorry, I don't have the code to give out but it really is pretty easy to write.
See my comment about how you can read the wiegand device without knowing the length in advance. I've tested this technique and it works nicely. Sorry, I don't have the code to give out but it really is pretty easy to write.
Please be positive and constructive with your questions and comments.