Having some issues with RFID reader

mbedparallaxrfid

I just received an RFID reader from Parallax (#28440) to play with, and am having some problems getting it to send me data. I'm interfacing it with the mbed microcontroller that I also just received.

The RFID reader interfaces via RS232 (5V level), so that matches my mbed serial port perfectly. I have written test code on the mbed side so I know my RS232 code works. However, whenever I send commands to the reader (e.g. "!RW\x0F"), I get result codes that aren't even in the documentation. Specifically, most of the time I get back 0xE1 or 0xF8, when the actual result codes should be something like 0x01 – 0x07.

What's annoying is that their documentation doesn't give any timing tables, so I'm just guessing when I send all of the data at once and read immediately. I've tried different time delays, and nothing works.

I am powering both mbed and RFID reader from the USB port. Since USB supplies 500mA without external power, and the mbed uses 100ma and the RFID reader uses < 200mA, I figure I have plenty of headroom. Perhaps tomorrow I should hook up the lab supply.

Has anyone here used this reader with reasonable success?

Best Answer

As I said in my original question, I thought about hooking up a lab supply even though, according to the specs, both devices combined fall under the 500mA USB spec. I put a voltmeter across the 5V bus, and sure enough, it was dropping well below 2.5V anytime I sent a command to the reader.

I hooked up my lab power supply, and immediately my !RW\x0F command returned 12 bytes as expected. Not the correct 12 bytes, but at least the data was being sent. It's possible that my reader just doesn't support this "legacy" command.

I then sent the login command, using the default password. Without a tag, I would receive 0x02, which is "could not find a listen window from the tag". Makes sense! I then put my tag over the reader, and unfortunately got a 0x03, which is a "received NAK" message. Oh well. I have other things to sort out, but at least I know my mbed code and RFID reader are functioning properly.

Hopefully, this basic debugging technique is helpful to someone.