Serial communication interface standard (four)-RS422, RS485

1. Introduction to serial communication interface standards

Serial data communication interface standards mainly include RS-232, RS-422 and RS-485, all of which were originally formulated and issued by the Electronics Industry Association (EIA).

RS-232 was released in 1970 and named EIA-232-E as an industrial standard to ensure compatibility between products from different manufacturers.

RS-422 is developed from RS-232, it is proposed to improve the shortcomings of RS-232 communication distance is short (maximum transmission distance 15m), low speed (maximum bit rate is 20Kb/s). RS-422 defines a balanced communication interface, which increases the transmission rate to 10Mbps, extends the transmission distance to 4000 feet≈1200 meters (when the rate is lower than 100Kbps), and allows up to 10 receivers to be connected on a balanced bus. RS-422 is a unidirectional, balanced transmission specification for single machine sending and multiple machine receiving, and it is named TIA/EIA-422-A standard.

In order to expand the scope of application, EIA formulated the RS-485 standard on the basis of RS-422 in 1983, adding multipoint and two-way communication capabilities, that is, allowing multiple transmitters to be connected to the same bus, and at the same time adding transmitters The drive capability and conflict protection features of the NAS extend the common mode range of the bus, which is later named the TIA/EIA-485-A standard. Because RS-485 is half-duplex, it can save signal lines when used for multi-station interconnection, which is convenient for high-speed and long-distance transmission. Many intelligent instruments are equipped with RS-485 bus interface, and it is very convenient to network them. Since the recommended standards proposed by EIA are prefixed by the recommended standard "RS" (recommeded standard), in the communications industry, it is still used to refer to the above-mentioned standards as prefixed with RS.

The RS-232, RS-422 and RS-485 standards only specify the electrical characteristics (voltage, impedance) of the interface, and do not involve connectors, cables or protocols. On this basis, users can establish their own high-level communication protocols.

2. RS-422 serial communication interface standard

The full name of the RS422 standard is "Electrical Characteristics of Balanced Voltage Digital Interface Circuit", which defines the characteristics of the interface circuit. The typical RS-422 is a four-wire interface, full-duplex, differential transmission, multi-point communication data transmission protocol. There is actually a signal ground wire, a total of 5 wires. It adopts balanced transmission and adopts unidirectional/non-reversible transmission line with or without enabling end. In terms of hardware configuration, RS-422 is equivalent to two sets of RS-485, that is, two half-duplex RS-485s form a full-duplex RS-422.

Because the receiver adopts high input impedance and the transmission driver has stronger driving capability than RS232, it is allowed to connect multiple receiving nodes on the same transmission line, up to 10 nodes can be connected. That is, a master device (Master), and the rest are slave devices (Slave). The slave devices cannot communicate, so RS-422 supports point-to-many two-way communication. The receiver input impedance is 4k, so the maximum load capacity of the transmitter is 10×4k+100Ω (terminating resistance). The RS-422 four-wire interface adopts separate sending and receiving channels, so there is no need to control the data direction. Any necessary signal exchange between the devices can be done in software (XON/XOFF handshake) or hardware (a pair of separate dual Stranded wire) to achieve.

The maximum transmission distance of RS-422 is 1219 meters, and the maximum transmission rate is 10Mb/s. The length of the balanced twisted pair is inversely proportional to the transmission rate, and the maximum transmission distance is only possible when the rate is below 100kb/s. Only in a short distance can the highest rate of transmission be obtained. Generally, the maximum transmission rate that can be obtained on a 100-meter-long twisted pair cable is only 1Mb/s.

The circuit principle of RS485 and RS422 is basically the same, both of which are sent and received in a differential manner, without the need for a digital ground wire. Differential operation is the fundamental reason for the long transmission distance under the same speed condition. This is the fundamental difference between the two and RS232, because RS232 is a single-ended input and output, and at least three digital ground wires, sending wires and receiving wires are required for duplex operation. Line (asynchronous transmission), you can also add other control lines to complete synchronization and other functions. RS422 can work in full duplex through two pairs of twisted-pair wires without affecting each other, while RS485 can only work in half-duplex, sending and receiving can not be carried out at the same time, but it only needs a pair of twisted-pair wires.

1 Electrical characteristics

The electrical characteristics of RS-422 are basically the same as RS-485.

Many people often mistakenly think that the RS-422 serial interface is a full-duplex version of the RS-485 serial interface. In fact, they have many differences in electrical characteristics. The common mode voltage range and the receiver input resistance are different. The two standards are suitable for different application areas.

The driver of the RS-485 serial interface can be used in the application of the RS-422 serial interface, because the RS-485 serial interface meets all the RS-422 serial interface performance parameters, and vice versa. For RS-485 serial interface drivers, the common-mode voltage output range is between -7V and +12V; for RS-422 serial interface drivers, the performance index is only ±7V. The minimum input resistance of the RS-422 serial interface receiver is 4KΩ; and the minimum input resistance of the RS-485 serial interface receiver is 12KΩ.

2 Mechanical characteristics

RS422 pin definition

name effect Remarks
TXA Send positive TX+ or A
RXA Accept positive RX + or Y
TXB Send negative TX- or B
RXB Receive negative RX- or Z

RXA / Y︰ other RS422 connection module of TXA / A
the RXB / RS422 Z︰ other modules connected TXB / B
TXB / B: RS422 connection of other modules of the RXB / the Z
of TXA / A: RS422 connection of other modules RXA / Y
connection principle : (Send "+" to receive "+"; send "-" to receive "-")

RS422 full duplex (point-to-point) wiring
Insert picture description here
Insert picture description here

3. RS-485 serial communication interface standard

RS485 is a standard that defines the electrical characteristics of drivers and receivers in a balanced digital multipoint system. The standard is defined by the Telecommunications Industry Association and the Electronics Industry Alliance. Digital communication networks using this standard can effectively transmit signals under long-distance conditions and in environments with high electronic noise. RS-485 makes it possible to connect to the local network and the configuration of multi-branch communication links.

RS485 is developed on the basis of RS-422, so many electrical regulations of RS-485 are similar to RS-422. If all adopt the balanced transmission method, all need to connect the terminating resistor on the transmission line, etc. RS-485 can use two-wire and four-wire mode: when using four-wire connection, it can only achieve point-to-many communication like RS-422, that is, there can only be one master (Master) device, and the rest are slave devices, but it is more RS-422 has been improved. Regardless of four-wire or two-wire connection, up to 32 nodes can be connected to the bus; while the two-wire system is adopted, RS-485 adopts half-duplex working mode, which can realize true multi-point two-way communication. Only one point can be in the sending state at any time, so the sending circuit must be controlled by the enable signal.

RS-485 uses balanced transmission and differential reception, so it has the ability to suppress common mode interference. In addition, the bus transceiver has high sensitivity and can detect voltages as low as 200mV, so the transmission signal can be recovered from kilometers away. When the communication distance is required to be tens of meters to thousands of meters, the RS-485 serial bus standard is widely used.

The difference between RS-485 and RS-422 is that its common-mode output voltage is different. RS-485 is between -7V and +12V, while RS-422 is between -7V and +7V. RS-485 receiver The minimum input impedance is 12kΩ and RS-422 is 4kΩ; because RS-485 meets all RS-422 specifications, RS-485 drivers can be used in RS-422 networks.
RS-485 is the same as RS-422, its maximum transmission distance is about 1219 meters, and the maximum transmission rate is 10Mb/s. The length of the balanced twisted pair is inversely proportional to the transmission rate, and the longest cable length may be used when the rate is below 100kb/s. Only in a short distance can the highest rate of transmission be obtained. Generally, the maximum transmission rate of a 100-meter-long twisted pair is only 1Mb/s.

In the RS485 communication network, a master-slave communication method is generally adopted, that is, a master with multiple slaves. In many cases, when connecting the RS-485 communication link, simply use a pair of twisted pair to connect the "A" and "B" ends of each interface, and ignore the signal ground connection. This connection method is used in many The situation can work normally, but it has buried a lot of hidden dangers. The first reason is common mode interference: although the RS-485 interface adopts a differential transmission method, it does not need to detect the signal relative to a certain reference point. It only needs to detect the potential difference between the two wires, which has a certain anti-common-mode interference capability, but it is easy to overlook that the transceiver has a certain common-mode voltage range. In the field of communication control, due to the complex field conditions, there is a high common-mode voltage between each node, and the common-mode voltage range of the RS-485 transceiver is -7 to +12V. When the common-mode voltage exceeds the RS-485 receiver The limit receiving voltage is greater than +12 V or less than 7V, the receiver will not work normally, and in severe cases it will even damage the chip and equipment; the second reason is the problem of EMI: the common mode part of the output signal of the driver needs to be sent A return path, without a low-resistance return path (signal ground), will return to the source in the form of radiation, and the entire bus will radiate electromagnetic waves outward like a huge antenna.

1 Electrical characteristics

The electrical characteristics of RS-485 are basically the same as RS-422.

The RS-485 bus standard specifies the electrical characteristics of the bus interface. The sending end: the positive level is between +2V~+6V, which means the logic state "1"; the negative level is between -2V and -6V, which means the logic State "0"; receiver: (V+)-(V-) ≥0.2V, indicating signal "0"; (V+)-(V-) ≤0.2V, indicating signal "1").

The digital signal adopts a differential transmission method, which can effectively reduce the interference of noise signals. However, the RS-485 bus standard does not make clear provisions for the relevant application layer communication protocol in the communication network, so users or related developers can establish applicable high-level communication related to their own communication network equipment. Protocol standards. At the same time, due to the application of RS-485 bus communication network in the field of industrial control, the number of decentralized industrial network control units is often the majority and the distribution of various industrial equipment is far away, which will result in the field bus There are various interferences in the communication network that make the communication efficiency and reliability of the entire communication network not high, and the reliability of data transmission in the entire network will directly affect the reliability of the entire fieldbus communication system, so the RS- The communication reliability of the 485 bus communication system has practical significance.

The interface signal level is lower than RS-232-C, it is not easy to damage the chip of the interface circuit, and the level is compatible with the TTL level, and it is convenient to connect with the TTL circuit.

2 Mechanical characteristics

RS485 two-wire system pin definition

name effect Remarks
Data-/B Differential signal negative terminal 485-
Data+/A Difference signal positive end 485+

A
: Connect to A of other RS485 modules B: Connect to B of other RS422 modules

Wiring principle: (A connects to A, B connects to B)

RS485 half-duplex (point-to-multipoint) wiring
Insert picture description here

Five, summary

Communication standard RS-232 RS-422 RS-485 2-wire
Way of working Single-ended Difference Difference
Number of nodes (maximum) 1 receive 1 send 1 send 10 receive 1 send and 32 receive
Maximum transmission cable length Approximately 15 meters (50 feet) About 1219 meters (4000 feet) About 1219 meters (4000 feet)
Maximum transmission rate 20Kbps 10Mbps 10Mbps
Maximum drive output voltage ±25V -0.25V ~ + 6V -7V ~ + 12V
Driver output signal level load (minimum) ±5V~±15V ±2.0V ±1.5V
Driver output signal level no load (maximum) ±25V ±6V ±6V
Driver load impedance 3KΩ~7KΩ 100Ω 54Ω
Slew rate (maximum) 30V/μs Not involved (N/A) Not involved (N/A)
Receiver input voltage range ±15V ±10V -7V ~ + 12V
Receiver input threshold ±3V ±200mV ±200mV
Receiver input resistance 3KΩ~7KΩ ≥4KΩ ≥12KΩ
Driver common mode voltage Not involved (N/A) ±3V -1V ~ + 3V
Receiver common mode voltage Not involved (N/A) ±7V -7V ~ + 12V

参考:
【1】https://baike.baidu.com/item/RS-422/6983214?fromtitle=RS422&fromid=9817213&fr=aladdin
【2】https://baike.baidu.com/item/RS-485/9695794?fromtitle=rs485&fromid=3555602&fr=aladdin
【3】http://m.elecfans.com/article/663969.html

Guess you like

Origin blog.csdn.net/sym_robot/article/details/114499984