Definition and difference of RS232,485,422

Data transmission between computers or computers and terminals can be carried out in two ways: serial communication and parallel communication.
The serial communication method is widely used because it uses fewer lines and is low-cost, especially in long-distance transmission, because it avoids the inconsistency of the characteristics of multiple lines. Serial ports are divided according to electrical standards and protocols, including RS232, RS422, RS485, etc.

The following information is compiled by the editor based on previous years' information. I hope it will give everyone a better understanding of what RS232, RS485, and RS422 are?

What is RS232?

  1. Basic concept
    The RS232 interface complies with the interface standard for serial data communication established by the Electronic Industries Alliance (EIA). The full name of the original number is EIA-RS-232 (RS232 for short). RS232 is one of the earliest standards in the field of serial communication. It defines the data transmission method, electrical characteristics and physical connection method. It is widely used in computer serial interface peripheral connection, connecting cables and machinery, electrical characteristics, signal functions and transfer process.
    The transmission distance is short, only 15 meters. RS232 can only connect one transceiver on the bus, and does not support multi-station transceiver, so it can only communicate point-to-point; it can achieve two-way transmission, full-duplex communication, and the maximum transmission rate is 20kbps.

2) Other features:
RS232 uses three-core twisted pairs and three-core shielded wires.
RS232 uses a USB conversion port to achieve high transmission speed and solve the disadvantage of USB interface being unable to transmit over long distances.
One-way communication is also adopted, that is, data can only be transmitted in one direction, but not in both directions at the same time.
RS232 uses an asynchronous transmission method, that is, the data frame does not contain a clock signal, but the start bit and stop bit are used to determine the transmission timing of the data. In addition, RS232 also uses negative levels to represent logic 1 and positive levels to represent logic 0.

3) Disadvantages:
The interface level value is high, which can easily damage the chip of the interface circuit; and because it is incompatible with the TTL level, a level conversion circuit is required to connect to the TTL circuit.
The transmission rate is low. In asynchronous transmission, the bit rate is 20Kbps, and the baud rate can only be 19200. The data transmission speed is slow and the transmission distance is short, only 15 meters.
The interface consists of three lines TX, RX, and GND. It does not form a differential line, which is prone to common ground and common mode interference and has weak anti-interference ability.

What is RS485?

1) Basic concept
RS485 is a new standard based on RS422 to expand the scope of application. RS485 has the ability to suppress common mode interference. RS485 has no specific physical shape, and the interface is adopted based on actual conditions.
In order to improve the shortcomings of RS232 communication distance and low speed, EIA formulated the RS485 interface standard based on RS422. Its maximum transmission distance is 1200 meters, which can actually reach 3000 meters, and the transmission rate can reach up to 10Mbps. Therefore, RS485 serial communication is generally used when the communication distance is required to be tens of meters to thousands of meters.
RS485 is not a point-to-point bus structure, but a distributed architecture, and its bus can connect up to 128 transceivers.
With excellent noise immunity and multi-device capabilities, RS485 is the serial connection of choice when establishing IoT networks, data acquisition controllers, HMI or other operations in industrial applications.
RS485 is an improvement of RS422, which increases the number of devices from 10 to 32. It also defines the electrical characteristics under the maximum number of devices to ensure sufficient signal voltage.

RS485 and RS232 are both communication interfaces based on serial ports. The operations of data sending and receiving are the same, but their communication modes are very different in practical applications. The RS232 interface is a full-duplex data communication mode, while the RS485 interface is a half-duplex data communication mode. Duplex data communication mode, that is, data can only be transmitted in one direction. In order to ensure that data transmission and reception do not conflict, there is an enable terminal in RS485. The enable terminal is used to control the cutting and connecting of the sending driver and the transmission line. Think of it as a switch. When the enable signal of the switch is 1, the signal is output. When the enable signal is 0, the signal cannot be output. Correspondingly, it is also required that the software must strictly separate the sending and receiving processes.

2) Disadvantages
RS485 cannot send data at the same time to avoid bus competition, so the communication efficiency of the entire system must be low and the amount of data redundancy is large. The RS485 bus is not suitable for applications with high speed requirements.
At the same time, since there is usually only one host on the RS485 bus, this bus method is a typical centralized-distributed control system. Once the host fails, the communication of the entire system will be limited to a paralyzed state, so online backup of the host is an important measure.

3) Advantages:
The level of the RS485 interface signal is lower than that of RS232, so it is not easy to damage the chip of the interface circuit. Moreover, the level is compatible with the TTL level and can be easily connected to the TTL circuit.
RS485 uses balanced transmission and differential reception, so it has the ability to suppress common mode interference, that is, it has good anti-noise performance. In addition, the bus transceiver has high sensitivity and can detect voltages as low as 200mV, so the transmitted signal can be recovered thousands of meters away.
The RS485 interface only allows the connection of up to 128 transceivers on the bus, which means it has multi-station capability, so users can easily establish a device network using a single RS485 interface.
RS485 uses a synchronous transmission method, that is, the data frame contains a clock signal, which can accurately control the transmission timing of data. In addition, RS485 also supports a variety of communication protocols, such as MODBUS, Profibus, etc., with high flexibility and scalability.
4) Notes on network installation of RS422 and RS485:
RS422 can support 10 nodes, and RS485 supports 32 nodes, so multiple nodes form a network. The network topology generally adopts a terminal-matched bus structure and does not support ring or star networks.
5) What factors limit the data rate of RS485?
Under a specified transmission distance, the following factors limit the transmission rate:
• Cable length: At a specific frequency, the signal strength will attenuate with the length of the cable.
• Cable architecture: Category 5 24AWG twisted pair is the most commonly used cable for RS485 systems. Shielded cables can greatly enhance noise suppression capabilities and improve data transmission rates over a certain distance.
• Cable characteristic impedance: Distributed capacitance and distributed inductance reduce signal edge speeds, thereby reducing noise margin and compensating for "eye mask" characteristics. Distributed resistance directly leads to attenuation of signal level.
• Driver output impedance: Too high an impedance will limit the drive capability.
• Receiver input impedance: An impedance that is too low limits the number of receivers that can communicate with the driver.
• Termination matching: Long cables can be treated as transmission lines. A terminal matching resistor with a resistance equal to the characteristic impedance of the cable should be connected to the cable to reduce signal reflection and increase the data rate.
• Noise margin: bigger is better.
• Driver Slew Rate: Reducing the edge rate (lowering the signal slew rate) allows longer cables to be used for communication.
What is RS422?
1) Basic concept
RS422 is developed from RS232. It is a high-speed, long-distance serial communication standard that can support communication between multiple devices. The transmission distance of RS422 is also up to 1200 meters.
RS422, like RS485, uses a full-duplex communication method with a data transmission rate of up to 10Mbps.
RS422 uses four wires (two sending wires and two receiving wires), differential transmission, and multi-point communication data transmission protocol. RS422 also uses a balanced transmission method, that is, the voltage of the data line to the ground line is equal, which can effectively reduce the impact of electromagnetic interference. In addition, RS422 also uses positive and negative logic representation, that is, positive level represents logic 1, and negative level represents logic 0.
Different from RS485, RS422 does not allow multiple senders but only multiple receivers.
The receiving and transmitting of the RS422 interface are separated, so it can receive and transmit at the same time (full duplex), so RS422 is suitable for communication between two stations, star network, ring network, and cannot be used for bus network.
Since the receiver uses high input impedance and the transmit driver has stronger driving capability than RS232, it allows 10 nodes to be connected on the same transmission line. There is one master device (Master) and the rest are slave devices (Slave). Slave devices cannot communicate with each other, so RS422 supports point-to-many two-way communication.
The disadvantage of RS422 is that the wiring cost is high and it is easy to make mistakes. It is used less now.

The electrical performance of RS422 is approximately the same as RS485. The main differences are:
(1) RS422 has 4 signal lines: two for sending (Y, Z) and two for receiving (A, B). Since the receiving and transmitting of RS422 are separate, it can receive and transmit at the same time (full duplex); RS485 has 2 signal lines: sending and receiving. Therefore, it is not possible to receive and send at the same time (half-duplex).
(2) For RS422 that supports multi-machine communication, short-circuit YA as the A of RS485 and short-circuit the ZB of RS422 as the B of RS485. It can be easily converted to RS485.
Many people often mistakenly believe that the RS422 serial interface is the full-duplex version of the RS485 serial interface. In fact, the common mode voltage range and receiver input resistance make the two standards suitable for different application fields.
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 performance parameters of the RS-422 serial interface, and the reverse is not true.

Differences between RS-232/RS-422/RS-485
Appearance similarities and differences between RS232/RS422/RS485 interfaces: Generally, they are DB9, but there are also others. You have to look at the wires inside to know which one is RS232, RS422, or RS485.
The differences between the three are as follows

standard RS-232 RS-422 RS-485
Way of working single ended difference difference
Number of nodes 1 receive, 1 send 1 send 10 receive 1 send 32 receive
Maximum transmission cable length 15 meters 1200 meters 1200 meters
maximum transfer rate 20Kbps 10Mbps 10Mbps
communication method One way, full duplex Bidirectional, full duplex Two-way, half-duplex
transfer method asynchronous transfer synchronous transmission synchronous transmission
Electrical characteristics Negative level represents logic 1
Positive level represents logic 0 Positive level represents logic 1
Negative level represents logic 0 Positive level represents logic 1
Negative level represents logic 0


A simple comparison of RS-232, RS-422 and RS-485:
RS-232
① The earliest appearance;
② Single-ended transmission;
③ Point-to-point (1 send and 1 receive);
④ Three lines: TX/RX/GND.

RS-422
① Based on RS232, it improves the shortcomings of short communication distance and low speed of RS-232;
② Balanced transmission (differential);
③ Point-to-multipoint (1 send and 10 receive);
④ Four lines (ABYZ or RX+/ RX-/TX+/TX-).

RS-485

① Based on RS422, it adds multi-point and two-way communication capabilities;
② Balanced transmission (differential);
③ Point-to-multipoint (1 send and 32 receive);
④ There are two lines (A/B) and four lines (RX+/RX -/TX+/TX-) two types.

RS232 is suitable for short-distance point-to-point communication; RS422 is suitable for long-distance high-speed point-to-point or multi-point communication, such as the connection between a computer and a printer.
RS-422 is developed from RS-232. In order to make up for the shortcomings of short communication distance and low speed of RS-232, a balanced transmission method is adopted to increase the transmission rate to 10Mb/s, the transmission distance reaches 1200 meters, and allows Connect up to 10 receivers on a balanced bus. It is mainly used for data transmission over short distances, such as connections between audio and video devices.
In addition to long-distance multi-point communication, RS485 also has the characteristics of half-duplex communication, synchronous transmission and multiple communication protocols. It has higher flexibility and scalability, and has wider application scenarios, such as the Internet of Things. Remote data collection, control system, etc.
In short, the three serial communication interface standards of RS-232, RS-422 and RS-485 each have their own advantages and disadvantages. Which standard to choose depends on the specific application scenarios and needs.

Guess you like

Origin blog.csdn.net/qq_27395975/article/details/133351607