RFID module sending data from TX to RX of arduino uno

I want to connect an animal tag reader module 134.2KHz FDX-B EM4305 (low frequency RFID) to my arduino uno, which sends the transponder data through a TX pin. I tried to connect this TX pin to an assigned RX pin of the arduino uno, and uploaded a little program to check if it's receiving any data at all.

#include <SoftwareSerial.h>
SoftwareSerial RFID(2, 3); // RX and TX

int i=0;

void setup()
{
//pinMode(13,INPUT);
RFID.begin(9600); // start serial to RFID reader
Serial.begin(9600); // start serial to PC
}

void loop()
{

if (RFID.available() > 0)
{
Serial.print("CHECK");
i = RFID.read();
Serial.print(i);
delay(100);
}
}

The problem is when I place the tag in the antenna, I don't recieve any data in the serial monitor of the arduino. I doubled checked my connections and tried different tags. I suspect the problem is either my programming is wrong, or the module is not working. It is far more likely that the problem is that my programming, or approach to the problem, has something wrong. My question is, is this the right way to read data from the RX pin in the arduino? What do you think should be changed in order to make this work?

The reader will return an ASCII string, not an int.

1 Like

Thanks! I changed the int=0; to char i; However the problem still persists. I notice the RX led in the arduino doesn't light up when I place the tag near the antenna either way.

Strings are now and then followed by a terminating NULL character, ASCII 0x00...

Hi,

just received the same RFID reader and have the same problem, did you ever find a solution ?

Hello lorddarlo,
i was using a HDX tag. This reader can only read FDX tags. Try using another tag to see if it works.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.