After reading this entry on Hack-a-Day: http://hackaday.com/2011/11/19/getti...p-rfid-reader/ I ordered one of those cheap RFID readers for myself from this eBay seller: http://www.ebay.co.uk/sch/gbmsale/m....kw=125khz+rfid (note: it took 3.5 weeks to arrive)
I also ordered 10 125khz RFID keychain tags a week later, they haven't arrived yet but luckily I already have a glass capsule 125khz tag to test with.
When plugged into a PC it pretends to be a USB keyboard, placing a tag next to the antenna causes it to be read and then the red LED blinks green and a loud beep is emitted (you'll be searching for tape or blu-tack to dampen the sound) and the 10 digit number is 'typed out' with an Enter on the end.
But this unit is dead easy to use with a Picaxe, there's an unused pinheader point on the circuitboard with 4 lines; +5v, GND, Serout and one I have no idea what it does.
(click pictures for bigger)
To read the tag with a Picaxe you simply hook the +5v, GND & Serout to the Picaxe (a resistor on the serial line won't hurt), then read in the data at 9600 baud. This is an example of the 19 numbers the Picaxe will receive:
189 5 30 39 36 32 36 5 3 189 6 35 30 38 33 38 40 5 3
And the actual tag ID in this instance is 1073769149. So how do you extract that number? easily, you only need the 3rd, 4th, 5th, 6th, 7th, 12th, 13th, 14th, 15th, 16th numbers which are USB scan codes, read the comments in the Hack-a-Day link above for a more detailed explanation of the serial data the Picaxe received.
This little program for M2/X2 parts will read in and output the scanned RFID tag number through your programming cable:
The use of the @bptr & @bptrinc in the serin line mean only the 10 relevant numbers are captured & stored in memory, the b1=b1-29//10 line is for turning the captuired USB scan codes for "0"-"9" into 0-9.
for b0=1 to 10
Main loop for non-M2/X2 parts:
Bonus points for anyone who can write a short piece of code to turn the 10 digit decimal number (actually a 32bit number) into two 16bit numbers the Picaxe can easily & quickly cope with for comparing against known IDs stored in memory, it'll also make storing tag IDs take up just 4 bytes instead of 10.
What am I going to do with this RFID reader? I haven't got the foggiest, I just wanted another electronic toy in my toolbox to tinker with and the price was right.