Pages: [1]   Go Down
Author Topic: RFID SERIAL READ PROBLEM  (Read 360 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I try to connect the rfid reader ACM26G to Arduino via serial RX

The ACM RFID reader sends data via its TX to RX on Arduino.

If the Reader is connected to MAC or PC via RX cable
the data reading is correct as HEX and as ASCII as well.

If the same connection is used on Arduino
the incoming data are not correct, in addition are not the same on every reading of key or card etc.

I did try all what I did find on net.

Setting is for ACM26G RFID READER
Baud Rate::9600BPS Sync Bit:None
Data Bit::8
Stop Bit :1
In RS232- TTL module output interface, it has 12 ASCII codes,01 in the first ,02 in the last ,10 card numbers are in the middle.
For example:
HEX: 01(first) 30 31 30 39 33 36 36 37 32 35 02(last)
ASCII: 01(first) 0010936725 02(last)
The card inner code:
HEX:84C2A6E195 A6E195(HEX) = 10936725(decimal)
RS232 Connection is as follows:
Red Wire:
Black Wire:
White Wire:
Negative Power side.
Connecting Power Positive Side Connecting Power Negative Side
Connecting Feet 2 of the 9 PIN Serial Port. And Serial Port 5 should also connect
Computer Setting
Computer Start – Programs – Accessories – Communications – Hyper Terminal. (First Choice: COM Port 1.)
Baud Rate: 9600.
Data Bit: 8.
Stop Bit: 1.
Parity check: No. OK.


If I read tag for example  0007324804 on PC is readed correctly at any time.

on arduino is  the same number readed as
127
246
230
22
6
182
102
246
236
118
182
0
what is absolutely wrong and on every reading are the numbers different.

If you can, please try to help with code.

Thank you
Dan



« Last Edit: May 03, 2013, 11:27:57 am by danjun » Logged

California
Offline Offline
Faraday Member
**
Karma: 88
Posts: 3368
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you can, please try to help with code.

How can we do that when you didn't post it?
Logged

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

Ok, here is the code

int incomingByte = 0;   // for incoming serial data

void setup() {
        Serial.begin(9600);   
}

void loop() {

        if (Serial.available() > 0) {
                incomingByte = Serial.read();
Serial.println(incomingByte, DEC);
        }
}
 
Logged

Pages: [1]   Go Up
Jump to: