Arduino UNO interface with UHF RFID Reader to read tag EPC

Hi everyone,

I'm now trying to interface Arduino UNO with UHF RFID Reader.

I used software serial to connect to the UHF RFID. But the data seems like a bit weird as below,

"57 29 94 5A 9B 9F 9D 93 A1 9D 9F A1 9D 8D BF 9B 9B 8B 9B 95 8B 9D 9D A7 BF 67 3D 19 17 8B 9B 9F 9D 93 A1 9D 9F A1 9D 8D BF 9B 9B 8B 9B 95 8B 9D 9D A7 BF 79 21 15 23 17 8B 9F 9F 9F 9F 9D A7 BF 7D 8D BF 17 BF"

Also I have tried to attach different tags to the RFID reader but seems like the data is that same.

Hope someone can give me some advises.

Thank you.

Regards, Nick

Hope someone can give me some advises.

I advise you to post your code. I advise you to post a link to the device you are communicating with.

I advise you to post your code

My code is just as simple as below

void setup() {
  // put your setup code here, to run once:
  Serial.begin(9600);

}

void loop() {
  // put your main code here, to run repeatedly:
  if(Serial.available()){
Serial.print(Serial.read(),HEX);
Serial.print(" ");
delay(100);
  }
}

I connected the serial rx of Arduino to my reader tx.

I advise you to post a link to the device you are communicating with.

http://www.vanch.net/en/pro/show/50.html

Thank you

Regards, Nick

How about a real link to the reader you are using? http://www.vanch.net/en/pro/show/50.html Says nothing about an RFID reader.

Why do you think that data is weird?

Also how is it wired up? Your code implies you are using the hardware serial port to both talk to the reader and talk to the serial monitor, you can't do that.

Why do you think that data is weird?

As the data are extreme long than normal EPC. Also for a same tag, the data sometimes is different if I attach to the reader multiple time.

Also how is it wired up? Your code implies you are using the hardware serial port to both talk to the reader and talk to the serial monitor, you can't do that.

Ya. I'm using hardware serial port. But even when I use software serial the result is still the same.

The reader is using rs232 connection for communication with a microcontroller. I'm very struggling in Arduino RS232 because I know in order for Arduino to communicate with RS232 device, I need a RS232 shield. But when I used RS232 shield from DFrobot the result is also the same.

Regards, Nick

But when I used RS232 shield from DFrobot the result is also the same.

No that is simply not true. An RS232 converter will invert the signal so it is impossible for the result to be the same with and without one.

Sending RS232 directly into the serial port will damage your Arduino because that standard has negitave voltages on it and the Arduino is damaged by negitave voltages.

Without seeing the data sheet for the device you are using it is impossible to help further. Most readers of this type need some sort of setting up in terms of sending parameters to it before it will work correctly.

You can not wire the reader to the hardware serial port and have that port talk to the serial monitor at the same time.

I got no datasheet of the reader but I have a user manual from the manufacturer and I attached in this post.

Also what I’m trying to do with RS232 shield is I know that this shield can help Arduino to communicate with RS232 device. Below is the link of the product

https://www.dfrobot.com/index.php?route=product/product&product_id=1030

I did follow that product tutorial on wiki to test the RS232 shield but what I found is the tutorial seems like only using the Arduino instead of the shield(maybe I’m misunderstood the tutorial).

And now I seeking help in using the RS232 shield wuth Arduino UNO to see whether working.

Thank you.

Regards,
Nick

VI-86F Product Info.doc (147 KB)

Thanks for that data sheet. Unfortunately is is not very good. While all the actual words are in English there is little sense in it. How did you decide the baud rate was 9600? While it mentions the baud rate in the fault finding section:-

baud rate is not set in accordance

Their is no other mention of what speed it should be. Unless you know this then you can not hope to get it to work.

What have you done with the trigger input? It says in another of those poor phrasings :-

When reader in tigger work way, if make down-lead connect with low level trigger, then reader begins to read card numbers till high level is recovered.

This seems to suggest that the trigger pin should be held low when it will keep on repeating a read tag until the trigger pin is set high. I notice in your code you do nothing about the trigger pin. Before you connect it to your Arduino you have to check what voltage is on that pin. If it is 5V or less then you can connect it directly to an Arduino pin, if not then you need to put the Arduino pin through a transistor first.

I did follow that product tutorial on wiki to test the RS232 shield but what I found is the tutorial seems like only using the Arduino instead of the shield(maybe I'm misunderstood the tutorial).

Yes I think you did misunderstand the tutorial what were you expecting?

That shield uses the hardware serial port. Therefore you can not use the serial monitor on the computer and the RFID reader at the same time.

You have to use software serial to output your feedback to the computer and then you need a USB to TTL serial converter to connect this software serial back to the computer. Alternatively you can use software serial for the RFID reader and rewire the shield to use the the software serial pins.

Hi Mike.

Thanks for your reply.

How did you decide the baud rate was 9600?

The 9600 baudrate is recommended by the manufacturer because I did ask them for help. But eventually their engineers unable to help me after a few discussions.

Alternatively you can use software serial for the RFID reader and rewire the shield to use the the software serial pins.

I’m not really understand about this line. Can you explain deeper?

When reader in tigger work way, if make down-lead connect with low level trigger, then reader begins to read card numbers till high level is recovered.

I will try more on this trigger part to see whether working or not.

Thank you.

Regards,
Nick

I’m not really understand about this line. Can you explain deeper?

The RS232 shield has a switch that can switch its output to the hardware serial port or not. In order to use software serial leave the switch in the “program” mode, that is not switched through to the hardware serial port. Then use the headers on the shield to connect the TTL output of the converter chip to two other pins on the Arduino and use those two pins for software serial. In that way you can talk to your reader using the shield and you can then print to the serial port for normal debug.

The 9600 baudrate is recommended by the manufacturer because I did ask them for help. But eventually their engineers unable to help me after a few discussions.

I would have thought that their engineers could have at least supplied you with a document that told you what all the commends were. In the UK you would be entitled to your money back if they could not supply that.

Hi Mike,

The RS232 shield has a switch that can switch its output to the hardware serial port or not. In order to use software serial leave the switch in the “program” mode, that is not switched through to the hardware serial port. Then use the headers on the shield to connect the TTL output of the converter chip to two other pins on the Arduino and use those two pins for software serial. In that way you can talk to your reader using the shield and you can then print to the serial port for normal debug.

In order to not misunderstand what you mean I attached a picture to clarify with you about the connection. Also below is my code,

#include SoftwareSerial.h
SoftwareSerial mySerial(7,6);

void setup() {
   put your setup code here, to run once
  Serial.begin(9600);
  mySerial.begin(9600);
}

void loop() {
   put your main code here, to run repeatedly
  if(mySerial.available()){
    Serial.print(mySerial.read(),HEX);
  }
}

Connection.zip (921 KB)

Sorry for the delay but an iPad can't cope with a zipped file so I had to wait until I got back to my laptop.

No not those pins those are the same as the ones going to the 9 pin header. Connect pins 11 & 12 of the MAX3232 to the software serial pins. Or pins 1 & 4 of switch S1.