Garbled Serial Communications

Hi Everyone,

I've connected my Arduino Uno to a Priority1Design RFID reader (Wiegand extender module [WIEG-EXT] - $54.00 : Priority 1 Design, Electronics design and manufacturing). I have the rfid reader's TX connected to pin 8 and the reader's RX connected to pin 9.

when a tag is read, I get the following in DEC:

99 172 22 125 155 159 159 159 145 155 149 145 143 143 155 229 0

whereas the actual tag ID is:

9 8 1 0 2 0 0 0 7 2 5 7 8 8 2

What I have tried so far:

  1. The baud rate of the reader is 9600, which I have established in my program.
    2)I discovered that RX and TX (0,1) on the Arduino are connected to USB, and since I have the Arduino connected to my computer and the RFID reader this may cause a problem. Which is why I have the reader connected to pins 8 and 9.
  2. I am using AltSoftSerial instead of SoftwareSerial because I read that the old library may have timing issues.

One thing that is interesting to note is that in the tag ID, the 4th and 6th/7th/8th characters should be the same. Oddly, this is not the case with the ID as read by the reader. In addition, in changing the serial COM from softwareserial to altsoftserial, the ID read was slightly different.

Here is my code:

#include <AltSoftSerial.h>

AltSoftSerial mySerial;

void setup()
{
Serial.begin(4800);

mySerial.begin(9600);
}

void loop() // run over and over
{

for( ; ; )
{
if (mySerial.available() > 0)
{
Serial.println(mySerial.read());
}

delay(200);
}
}

Any help would be greatly appreciated.

Austin

Where are you telling AltSoftSerial its using pins 8 &9?

The for loop is point less thats what lopp() does.

All ways post in code tags!

Mark

Hi Mark,

I'll make sure to use code tags next time.

Also, at least from what I read..altsoftserial defaults to and only works with pins 8 and 9.

You did connect the grounds didn't you?

Mark

PS you are NOT outputing/ reading DE, your code reads an ACSCII char and writes it out.

M

The RFIDRW-E-232 is powered by a DC supply at Lines –V, and V+ on the terminal pad area J1.
Command and data information is available on a DB9 connector J2 as standard RS232 protocol. These lines
are also connected to the terminal pad area of J1 as TX and RX lines.

As far as I can tell the card you linked to only supports RS232 in which case you,

a. need an RS232 to TTL converter.

b. connecting the RS232 to your Arduino will fry the chip you need to test the pins to see if you have damaged them!

Mark

Hi Mark,

Good call! That was exactly the problem. Fortunately, that didn't fry my board.

Thanks for the help,

Austin

I'll award myself a drink.

Thanks for the feed back +1 karma to you for the feed back.

Mark

Haha. +1 for the help.