So you want to read a BuffCard
Several student projects desire using a BuffCard for authentication. Most commonly, I have seen these sorts of projects for secure bike locking.
Cheap RFID reader
I set out to see if this is possible with a cheap Amazon RF ID-RC522 like these ones that average < $5 a pop:
In less than 10 minutes, I was able to read in my ID. This board uses 3.3V, and 5V could destroy it permanently! (note I did not test this, I didn't feel like breaking it)
Library used: MFRC522 by GithubCommunity
Note on pinout: I used every pin except for IRQ (interrupt)
Note on frequency: This reader reads 13.56MHz...I tested a few random RFID cards I had laying around, and only the 13.56MHz cards were read by the RFID reader.
Note on range: the card needed to be held VERY close, about 1cm away from the reader.
Example sketch used: DumpInfo.ino
Output looks like this (don't forget to open your Serial monitor and make sure that baud rate on dropdown menu matches baud rate specified in code):
It would be straightforward to integrate this into a project where you write code to ask Arduino to perform a certain task (release a solenoid lock, move a servo...) for a specific Card UID.
Adafruit PN532
Next I tried the Adafruit PN532 RFID/NFC Shield. It also measures at 13.56 MHz, and communicates over SPI (like the cheap Amazon reader tested above) as well as I2C. If you want to use SPI (which they recommend), you need to close two jumpers on the shield (SEL1 and SEL0). I was lazy and decided to leave them open, which puts the board in I2C mode.
Library used: Adafruit PN532
Example sketch used: readMifare.ino **Since I chose to use I2C, I had to comment out the lines declaring pins for use with SPI (lines 42-45), as well as the SPI connection (line 56). I had to uncomment the line for initializing for I2C (line 65).**
Output looked like this: (for a 13.56MHz RFID card):
Buffcard output looked similar (I am omitting my entire UID):
Found an ISO14443A card
UID Length: 7 bytes
UID Value: 0x04 ......
Range: The range on this reader was slightly better than the cheap amazon reader. I was able to read my buffcard at a distance of ~ 2", which is better than 1cm. It's possible that for longer distances, an active tag is required (battery powered).
Success!
So which one should a student buy?
Honestly, for most projects, the cheap Amazon reader seems sufficient. There was no noticeable difference in acquisition time, accuracy, or how far away you can hold the card and get a reading (slightly better distance for the Adafruit reader: 2" vs 1cm). The Amazon reader uses 3.3V, not 5V. I did not test with 5V to see if it could handle the voltage. I didn't feel like potentially breaking it.




