Thursday, October 15, 2009

Lego NXT RFID Reader


A while ago I purchased a Parallax RFID Reader from a local RadioShack and decided to allow it to talk to my Lego NXT. It is programmed to accept the ID of my circular tag and reject all others. Here is a video demo:

http://www.youtube.com/user/ph0015d4y#p/u/0/tiamide0dLk

I have been looking for an excuse to post a UART to TWI(I2C) example for some time now. I decided to start with RFID because the idea of a robot buzzing around the house reading tags as waypoints sounded like fun. If I ever find an excuse to own a GPS unit I'll provide a schematic and some code for that as well.

Here is the schematic and a rough bill of materials for this ~$70 NXT integrated RFID Reader:
  • $4 (1) Atmel Atmega8-16PU microcontroller
  • $50 (1) Parallax RFID Reader with tags (parallax.com or RadioShack )
  • $0.10 (1) >10 kOhm 1/8watt resistor
  • $0.10 (1) .1 uFarad capacitor
  • $0.20 (4) 100 Ohm 1/8watt resistor
  • $0.30 (1) 150 Ohm 1/8watt resistor
  • $0.20 (2) 82 kOhm 1/8watt resistor
  • $6 (1) Breadboard
  • $5 (1) Lego NXT cable with pins broken out
  • $2 (1) RGB status LED
  • $0.25 (1) Red power indicator LED
  • $0.25 (1) Green heartbeat LED
  • $2 Wire/Solder
The next step for me will be to shove the RFID Reader and breadboard into a 3.5" x 4.5" x 1.5" project box and mount it to a rover. The RFID Reader has no problem reading tags through plastic at a distance of about 4".


Drop me an email if you are interested in the (AVRStudio4 C) code for the Atmega8-16 or a ROBOTC program for testing. Both are available for free under the GPL.