Arduino with Seeed RFID

Who has used the Seeed RFID with the Arduino ? Successful ? RS23 or USB ?



I have one of the Seeed Studio RFID readers. It works just fine.

It's wired directly to the Arduino pins.

Hi Paul

Thanks for reply.
I am a newby to processors like Arduino. How much work in building the Arduino etc. nd programming forthe RFID. I want the simplest option.

I would like the readings to go into OpenOffice Calc spreadsheet via Linux. Is this possible.Looking to use on a model railroad layout to track rolling stock, so will need quite a few.
Would like your comments. charlie at



How much work in building the Arduino

No work at all. Just buy them pre-made.

Programming only needs to be done once.

I want the simplest option.

Just say the word, and I'll post my code again.

I would like the readings to go into OpenOffice Calc spreadsheet via Linux. Is this possible.

It's possible to send the data to the serial port. Then, you need something on the Linux box to read the serial data, and write it to a file that OpenOffice can read. I think that OpenOffice can import csv files, which are easy to create. Look at Processing ( for code to read serial data and writing to files.

Looking to use on a model railroad layout to track rolling stock, so will need quite a few.

You'll need an RFID reader at each location where you want to track the stock. You can connect several RFID readers to an Arduino. Depending on which Arduino you use, and how many RFID readers you have, you may need more than one Arduino.

Your biggest problem is going to be getting unique tags for each piece of rolling stock.

Hi Paul

If you are ok on it, I would like to duplicate what you are doing. (not worry about calc, Linux etc. at this stage) I can get it working this way in a big learning curve.

The Duemilanove board is available here in New Zealand and I will get a couple of Seeede readers from Hong Kong. Which Seeed reader do you use Uart or Weigand ?

If two or more Seeed readers used does the software indicate which reader was used for each read. Like a suffix or prefix or Reader ID#.
Do your reads go into a .csv file and appear in Windows Explorer folder? I could access that from MS Excel.
Overall it looks like something with my limited knowledge I can cope with.

in New Zealand

You can attach multiple readers, to different software serial pins. It'll be up to you to define the action when a valid tag is read by a reader. I just light up LEDs.

#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3

//create a Serial object RFID
SoftwareSerial RFID = SoftwareSerial(rxPin, txPin);
char code[20];

int val = 0;
int bytesread = 0;

char Red[]    = "3900A52D9223";
char Blue[]   = "39009F46D131";
char Yellow[] = "390050448FA2";
char Card1[]  = "210014E221F6";
char Card2[]  = "210014C9906C";

int ledCnt = 5;
int LED[] = {13, 11, 9, 7, 5};

void setup()
  Serial.begin(9600); //open serial hardware
  RFID.begin(9600); //open serial software
  pinMode(rxPin, INPUT); //set pin on arduino for receiving RFID data
  pinMode(txPin, OUTPUT); //this is not important
  for(int i=0; i<ledCnt; i++)
    pinMode(LED[i], OUTPUT);

void loop()
  val = 0;
  bytesread = 0;

  while(bytesread < 12)
    // read 12 digit code
    val =;
    if(val == 3)
    { // if header or stop bytes before the 10 digit reading
      break; // stop reading
    if(val != 2)
      code[bytesread] = val; // add the digit
      bytesread++; // ready to read next digit
      code[bytesread] = '\0'; // add the NULL
  if(bytesread >= 12)
  { // if 12 digit read is complete
    Serial.print("Tag: [");
    for(int i=0; i<bytesread; i++)
    Serial.println("]"); //print the whole 13 bytes
    int tag = FindValidTag(code);
    Serial.print("Tag number: ");

    for(int i=0; i<ledCnt; i++)
      digitalWrite(LED[i], LOW);
    if(tag > 0 && tag <= ledCnt)
      digitalWrite(LED[tag-1], HIGH);

int FindValidTag(char *code)
  if(strcmp(code, Red) == 0)
    return 1;
  else if(strcmp(code, Blue) == 0)
    return 2;
  else if(strcmp(code, Yellow) == 0)
    return 3;
  else if(strcmp(code, Card1) == 0)
    return 4;
  else if(strcmp(code, Card2) == 0)
    return 5;
    return 0;

Might it be simpler from a host computer side to incorporate a ps2 shield and have it type the value from the card directly into the PC?

Is the Duemilanove board the best for me to get ? and which Seeed RFID to get uart or weigand ?



I would go with weigand as they are easer to read on other pins than the serial which either has to use software serial ( not too good on reading) or mess about switching between the RFID reader and the serial monitor / uploading function of he arduino.