Pages: [1] 2   Go Down
Author Topic: Interfacing with Parallax RFID Reader/Writer  (Read 11005 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I have a Parallax RFID Reader/Writer hooked up to an Arduino Duemilanove but I am not able to get any response whatsoever from the RFID module. The RFID module gets power coz its green LEDs light up but no response over the serial port.

The connections are as follows:
VCC (RFID) --> 5V (Arduino)
GND (RFID) --> GND (Arduino)
SIN (RFID) --> PIN6 (Arduino)
SOUT (RFID) --> PIN8 (Arduino)

I am using the following code developed as per specs given here:
REMOVE_THIS_FIRST_AND_ADD_3_Ws:parallax.com/Portals/0/Downloads/docs/prod/rf/28440-RFIDReadWrite-v1.0.pdf


Code:
//Interface Arduino USB with Parallax 125 Khz UART RFID Reader/Writer
#include <NewSoftSerial.h>

#define rxPin 8
#define txPin 6

//Reader/Writer Commands
#define RFID_READ  0x01
#define RFID_WRITE 0x02

//Memory Locations for Data
#define DATA_ADDR_0  3
#define DATA_ADDR_1  4

//Error Codes
#define ERR_OK  0x01

NewSoftSerial mySerial(rxPin, txPin);

char statusCode;

void setup()
{
  Serial.begin(9600);
  pinMode(rxPin, INPUT);
  pinMode(txPin, OUTPUT);
  mySerial.begin(9600);
  Serial.println("RFID Read/Write Test");
}

void loop()
{
    //Read RFID Tag data
    Serial.println("Reading Tag Data...");
    //1st 4 bytes
    mySerial.print("!RW");
    mySerial.print(RFID_READ, HEX);
    mySerial.print(32, DEC);
    while(!mySerial.available()) {}
    
      Serial.print("Read Status:");
      statusCode = mySerial.read();
      if(statusCode == ERR_OK)
      {
        Serial.println("OK");
        Serial.print("RFID Data:");
        Serial.print(mySerial.read(), BYTE);
        Serial.print(mySerial.read(), BYTE);
        Serial.print(mySerial.read(), BYTE);
        Serial.println(mySerial.read(), BYTE);
      }
      else
      {
        Serial.print("NOT OK. Error Code:");
        Serial.println(statusCode, HEX);
      }
}

Any clues/pointers would be really appreciated.
Thanks!
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Were you able to figure this out?.. i have the same problem. does your led turn red at some point? from what i read it has to. make sure u have the pin sout from the card to rx in the arduino(or the pin u used for rx in the Newsoft serial.) that way it changed the led to red.. however, i havent been able to read the tag... so if  you perhaps have something.. pleaseeeeeeeee. help
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I checked the connections - they are correct. SOUT goes to my Rx pin on the Arduino (PIN8) but LED doesn't turn RED at any time before or after I send a read command.

Hope somebody was successful in using this particular module with the Arduino :-[
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have the same problem. I hope some one can help me and you with this problem. The LED doesn´t turn red. I can´t find some information what I did wrong in de code.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Interesting that nobody has managed to solve this issue despite the popularity of the Parallax RFID modules.  smiley-sad
Logged

Pensacola FL
Offline Offline
Newbie
*
Karma: 0
Posts: 10
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yea I hope we can come up with something. I picked one up at radio shack when I noticed they were on sale for 9$ smiley-grin
Logged

Chisinau, Moldova
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks =)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have this on the monitor
Code:
Reading Tag Data...
Read Status:NOT OK. Error Code:FFFFFFFF
Reading Tag Data...
Read Status:NOT OK. Error Code:FFFFFFFF
Reading Tag Data...
Read Status:NOT OK. Error Code:FFFFFFFF
Reading Tag Data...
Read Status:NOT OK. Error Code:FFFFFFFF
Reading Tag Data...
Read Status:NOT OK. Error Code:FFFFFFFF
Reading Tag Data...
Read Status:NOT OK. Error Code:FFFFFFFF
Reading Tag Data...
Read Status:NOT OK. Error Code:FFFFFFFF
« Last Edit: September 25, 2010, 05:34:20 pm by DIXIS » Logged

Detroit Sub-urbs
Offline Offline
Newbie
*
Karma: 0
Posts: 6
Arduino noob (for now)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does the reader/writer have a communication rate or 9600 baud, or 2400 like the reader? I just picked up THREE of the readers for $8.47, I have some ideas some RFID projects and couldn't pass up this great deal, hopefully they'll be pretty easy to work with!
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24298
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This code:
Code:
while(!mySerial.available()) {}
    
Serial.print("Read Status:");
statusCode = mySerial.read();
if(statusCode == ERR_OK)
{
  Serial.println("OK");
  Serial.print("RFID Data:");
  Serial.print(mySerial.read(), BYTE);
  Serial.print(mySerial.read(), BYTE);
  Serial.print(mySerial.read(), BYTE);
  Serial.println(mySerial.read(), BYTE);
}
Waits until at least one byte is available to read, then reads five.
Do you know what "read" returns when there is nothing in the receive buffer?
(for a clue, look at reply #6)
« Last Edit: September 26, 2010, 10:46:52 am by AWOL » Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 4
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If the read times out or your serial port connections to the RFID module is not correct, it returns a 0. The first read waits for a status byte.

I am thinking maybe it is a serial port issue - need to find a logic analyzer to see the signals. If anybody makes some progress, please post here.

Thanks!
« Last Edit: October 09, 2010, 03:51:53 pm by naashak » Logged

Chisinau, Moldova
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks =)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

any result? I have no ideas what to do ....
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Does it make any difference if you do

mySerial.print(RFID_READ, BYTE);

instead of

mySerial.print(RFID_READ, HEX);


I know the datasheet specifies that the RFID Read command be sent in hex and I'm no expert with the arduino or reader so I may just be talking out of my butt here  :smiley

If you've made any progress would you mind sharing?
Logged

Chisinau, Moldova
Offline Offline
Newbie
*
Karma: 0
Posts: 22
Arduino rocks =)
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

progress ! the led turned in to red ...  thanks ! mySerial.print(RFID_READ, BYTE); its right !

Quote
When the module is successfully powered-up  and is in an idle state, the LED will be GREEN;
when the module is in an active state (for example, searching for a valid tag or performing an operation
on the tag), the LED will be RED.  

« Last Edit: November 04, 2010, 04:47:52 am by DIXIS » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 8
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is anybody making progress with this issue. After reading all the responses all I still see in the serial monitor is. What am I missing?

"RFID Read/Write Test
Reading Tag Data..."
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 1
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
0x0F: RFID_ReadLegacy
Read the 40-bit unique serial number from an EM Microelectronics EM4100 read-only tag (used with
Parallax's RFID Card Reader Serial, #28140, and USB, #28340).
Logged

Pages: [1] 2   Go Up
Jump to: