Tuesday, January 17, 2012

RFID On Arduino

So I got myself an Arduino powered Android Accessory Development Kit, not long ago. The kit have quite a lot of sensor, one of them, an 125kHz RFID reader. Which is cool except, the kit doesn't comes with the tag necessary. 

So I finally got the tag(s) which is compatible. The reader from seeestudio have 2 ways to interface with the arduino, one is via Wiegand Mode, the other via UART, i.e Serial. 

I just use UART, because one the board is actually a Arduino Mega, so I got enough hardware serial to use. And I am using the extension board, so It make it way easy to use the extra hardware serial. But if you are just using an arduino, the Reader is actually pretty easy to use via Software Serial using NewSoftSerial library. Easier if you are using the UART version of this

Originally I thought of just forwarding the ID from the tag into a serial without any translation. From the docs, there is a checksum that we can use. It do make using an arduino as a middleman not so wasteful. It also define an header and ends, which can also be used to track error etc. 

From the docs, I have create a reader, the code is in https://gist.github.com/1626692

This is just a very early version, hacked within 15 minutes. So it don't check the checksum, etc. 

You can check the result using the serial monitor, it just output the code as I swipe it on the reader itself, 

This reader can read one tag at a time unlike the commercial one, where the tag have random delay to make reading multiple tag possible. This is a pretty cheap, like 13USD, cannot really compare with the really big commercial one. And the distance is short too, like 8 cm. 

Despite that, it can be a fun toy to play with, not quite sure what I am going to do with this though. More to come(?)

No comments:

Post a Comment