The reader has an 3V3 TTL RS232 TX/RX connection - so electrically, the two peripherals should be compatible.
Is it possible to just connect them a shown in the picture attached? Or does the RS232 protocol require pull-up or pull-down on the signal leads?
And does the ESP8266 chip support native RS232, or is there an Arduino library available? I haven't been able to find anything substantial on the topic yet.
Thanks in advance - any help is greatly appreciated!
TTL and RS232 are two different protocols, and are not directly compatible.
I quickly skimmed these links, it seems this specific RFID reader is meant to be connected to a computer over either RS232 or USB. It does not appear to be directly compatible with the RX/TX of an ESP8266.
simonriskjaer:
The reader has an 3V3 TTL RS232 TX/RX connection - so electrically, the two peripherals should be compatible.
Strictly speaking RS232 uses voltage levels for signaling that are not "TTL" and which will damage the Arduino serial input pin. However it is not unusual to find stuff that says it is RS232 which is actually TTL serial. The net is that one has to be careful about determining the electrical characteristics of their serial device and perform voltage level translation if necessary. Your device link gives no indication that it is TTL serial compatible and most likely you will require an RS232 to TTL level converter.
Once the correct voltage levels have been achieved, the serial interface between Arduino and the device should work.
I know for a fact that the RS232 voltage level is 3V3 from reading the datasheet and corresponding with the manufacturer. So the electrical aspect should be fine.
The problem arises with the RS232 serial protocol interfacing with the Arduino.
Wawa: Thank you for the link regarding the Wiegand output. I did not even think about there being a Arduino library for that. I will check it out!
simonriskjaer:
I know for a fact that the RS232 voltage level is 3V3 from reading the datasheet and corresponding with the manufacturer. So the electrical aspect should be fine.
In other words, it is absolutely not RS-232, should never have been described as such and represents misleading and confusing advertising on the part of the manufacturer. Details matter (insofar as you plug RS-232 into the ESP-8266, need to get another one).
You may say that it is common parlance. We are talking engineering here, not pop culture.
simonriskjaer:
The problem arises with the RS232 serial protocol interfacing with the Arduino.
Yes, you can call it a hardware or electrical protocol, for something which happens to be used for unspecified serial data on two of the multiple lines.
I think perhaps there is a terminology problem here.
RS232 is a specification for serial communications. It defines voltage levels between +5 to +15 for a ONE and -5 to -15 for a ZERO. I'm not positive of the exact voltages but these are close.
It also defines a communication pattern of ones and zeros.
A typiclal µProcessor has a UART output that follows the RS232 communication pattern but is 0 to 3.3v or 0 to 5v. However the bit pattern is inverted compared to the RS232 specification.
To answer your question, can one connect the UART output of one device to the UART input of another, and use the RS232 communications pattern. YES absolutely.
JohnRob:
I think perhaps there is a terminology problem here.
RS232 is a specification for serial communications. It defines voltage levels between +5 to +15 for a ONE and -5 to -15 for a ZERO. I'm not positive of the exact voltages but these are close.
It also defines a communication pattern of ones and zeros.
A typiclal µProcessor has a UART output that follows the RS232 communication pattern but is 0 to 3.3v or 0 to 5v. However the bit pattern is inverted compared to the RS232 specification.
To answer your question, can one connect the UART output of one device to the UART input of another, and use the RS232 communications pattern. YES absolutely.
The actual voltage limits are +3 to +25 and -3 to -25. The voltages between +3 and -3 are undefined and are to be avoided. Over 25 and there may be smoke.
Another very often overlooked parameter of RS-232 is the ability to short circuit any wires to any others for an unlimited time without causing damage. Not good for TTL devices.
JohnRob:
To answer your question, can one connect the UART output of one device to the UART input of another, and use the RS232 communications pattern. YES absolutely.
Yes, you can, but unless you are using the voltage levels defined in the RS-232 specification, it is completely inappropriate and in this context, dangerous to refer to it as RS-232. The pattern of those voltage changes is another thing entirely; it may be an asynchronous protocol such as from a UART with start, data, parity and stop bits, or it may be a synchronous protocol such as HDLC.
And it gets worse!
The term "TTL" is not an appropriate description for a voltage standard either as TTL levels are actually 0 to 2.5 V and quite inappropriate for the CMOS devices we speak of here.