Using a MIFARE reader with Arduino

Status
Not open for further replies.

gustavolsilvano2

Newbie level 4
Joined
Aug 5, 2011
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,355
Hello there!

I want to connect my Arduino to a MIFARE reader wich has his datasheet attached (**broken link removed**)

The reader has a ST232C IC wich is used to communicate using RS232. The problem is that Arduino uses TTL. I read -9.11 V on the output of the reader. When I put a MIFARE card near it goes to -8.0 V.

If that what I did is use an amp-op to reduce (and invert) the voltage level to 5 V.

With that I receive some was some strings. They are constants but far from what I wanted to receive (attached).


Here is the code:

Code:
void setup() {

Serial.begin(19200, SERIAL_8N1);
  
}

void loop() {

while(Serial.available() == 0);

char val = Serial.read();

Serial.println(val);

}

So, is there something wrong about what I'm doing?

View attachment Datasheet Leitor MIFARE.pdf
 

You cannot just connect them, the RS-232 electric standard see either the 1 and 0 logic as ranges in either positive and negative values, differently from TTL, therefore a simple level converter do not suffice. You shoud counsider using some of the usual converters such as MAX-232 or something else.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…