Understanding the Differences Between RS-232, RS-422, and RS-485

Join WeChat Group: dlxmj1980

Application Format:City Name-Company Name (Electrical Engineer Job Title)

Understanding the Differences Between RS-232, RS-422, and RS-485

Get Historical Power·Electrical Data Scan the QR Code Above

Quality Resource Benefits

SendDownload in the background to obtain the following materials:

01.【Downloadable】Transformer Maintenance and High Voltage Testing

02.【Downloadable】Practical Handbook for Electrical Instrument Engineering Installation and Maintenance

03.【Downloadable】Essential Readings for Electrical Operation

04.【Downloadable】Technical Training for Electronic Mutual Inductors Operation and Maintenance

The above quality resource download link; (Add customer service WeChat, material collection and organization is not easy, friends in need of e-books and articles, please forward to Moments and send screenshots to customer service, and leave your email) The editor will send the courseware to everyone at night, please do not worry! Thank you!Please make sure to forward the article link to your Moments first

Serial communication is the most basic communication method faced by electrical engineers, with RS-232 being the simplest among them. Many beginners often struggle to understand the connection and differences between UART, RS-232, RS-422, and RS-485. This article will discuss these concepts to help clarify their relationships.

If we compare serial communication to transportation, UART can be likened to a station, while a frame of data is akin to a car. Cars must obey traffic rules while on the road. If within the city, the speed limit is generally 30 or 40, while on the highway it can reach 120. The protocol determines what road the car takes and its speed limit. Common serial protocols include RS-232, RS-422, and RS-485. What are the subtle differences between them? Let’s explore together.

1. What is UART

UART stands for Universal Asynchronous Receiver/Transmitter. It is a key module for asynchronous communication between devices. UART handles the serial/parallel conversion between the data bus and the serial port and specifies the frame format; as long as both communicating parties use the same frame format and baud rate, communication can be completed using only two signal lines (Rx and Tx) without sharing a clock signal, hence it is also called asynchronous serial communication.

Understanding the Differences Between RS-232, RS-422, and RS-485

With the addition of an appropriate level converter, such as SP3232E or SP3485, UART can also be used for RS-232 and RS-485 communication or connected to a computer’s port. UART is widely used in mobile phones, industrial control, PCs, etc.

Understanding the Differences Between RS-232, RS-422, and RS-485

UART uses asynchronous, serial communication.

Serial communication refers to the sequential transmission of data one bit at a time over a transmission line. Its characteristics include a simple communication line, allowing communication with simple cabling, reducing costs, and being suitable for long-distance communication, albeit at a slower transmission speed.

Asynchronous communication uses a character as the unit of transmission, and the time interval between two characters during communication is not fixed; however, the time interval between two adjacent bits within the same character is fixed.

The data transmission rate is expressed in baud rate, which indicates the number of binary bits transmitted per second. For example, if the data transmission rate is 120 characters per second, and each character consists of 10 bits (1 start bit, 7 data bits, 1 parity bit, 1 stop bit), then the transmission baud rate is 10×120=1200 characters per second=1200 baud.

The data communication format is shown in the figure below:

Understanding the Differences Between RS-232, RS-422, and RS-485

The meanings of each bit are as follows:

Start Bit: A logical “0” signal is sent first, indicating the start of the transmission character. Data Bits: Can be 5 to 8 bits of logical “0” or “1”. For example, ASCII code (7 bits), extended BCD code (8 bits). Parity Bit: After adding this bit to the data bits, the number of “1” bits should be even (even parity) or odd (odd parity) Stop Bit: It is a character data end flag. It can be 1 bit, 1.5 bits, or 2 bits of high level. Idle Bit: It is in a logical “1” state, indicating that there is no data transmission on the current line.

Note: Asynchronous communication is transmitted by character; the receiving device can correctly receive it as long as it maintains synchronization with the sending device within one character’s transmission time after receiving the start signal. The arrival of the next character’s start bit recalibrates the synchronization (achieved by detecting the start bit to realize clock self-synchronization between sender and receiver).

Understanding the Differences Between RS-232, RS-422, and RS-485

2. RS-232 Standard

RS-232 is a serial physical interface standard established by the Electronic Industry Association (EIA) in the United States. RS is an abbreviation for “Recommended Standard”, and 232 is the identification number. RS-232 specifies electrical and physical characteristics, only acting on the data transmission path; it does not include data processing methods. It should be noted that many people often mistakenly refer to RS-232, RS-422, and RS-485 as communication protocols, which is incorrect. They are merely mechanical and electrical interface standards for UART communication (at most, they pertain to the physical layer of network protocols).

The standard specifies the use of a 25-pin DB-25 connector, defining the signal content for each pin of the connector, as well as specifying the voltage levels of various signals. Later, IBM simplified RS-232 to a DB-9 connector for PC use, which has become the de facto standard today. In industrial control, RS-232 ports generally only use three lines: RXD (2), TXD (3), GND (5).

Understanding the Differences Between RS-232, RS-422, and RS-485

In the early days, since PCs were equipped with RS-232 interfaces, we chose RS-232 when using UART. However, personal computers, including laptops and desktops, no longer come with RS-232 interfaces; we see that there are no DB9 interfaces on computer motherboards. Therefore, development boards now choose TTL UART or directly implement UART to USB on the development board.

In embedded systems, the serial port generally refers to the UART port, but we often confuse it with the COM port, as well as the relationships with RS232, TTL, etc. In fact, UART and COM refer to the physical interface form (hardware), while TTL and RS-232 refer to voltage standards (electrical signals).

UART has 4 pins (VCC, GND, RX, TX), using TTL levels, where a low level is 0 (0V) and a high level is 1 (3.3V or above).

Understanding the Differences Between RS-232, RS-422, and RS-485

3. RS-485/RS-422 Standards

The RS-232 interface can achieve point-to-point communication, but this method cannot realize networking functions. To solve this problem, a new standard, RS-485, was created. RS-485 uses differential transmission for data signals, also known as balanced transmission, utilizing a pair of twisted wires, defining one wire as A and the other as B.

Typically, the positive voltage between the sending driver A and B is +2 to +6V, representing one logical state, while the negative voltage is -2 to 6V, representing another logical state. There is also a signal ground C, and RS-485 includes an “enable” terminal, which is optional in RS-422.

RS-422’s electrical performance is identical to that of RS-485. The main difference is that RS-422 has 4 signal lines: two for sending and two for receiving. Since RS-422 separates receiving and sending, it can receive and send simultaneously (full duplex). Because full duplex requires separate channels for receiving and sending, RS-422 is suitable for communication between two stations, star networks, and ring networks, but not for bus networks; RS-485 only has 2 signal lines, so it can only operate in half-duplex mode, commonly used in bus networks.

Understanding the Differences Between RS-232, RS-422, and RS-485

1. RS-485’s electrical characteristics: Logic “1” is represented by the voltage difference between the two wires as +(2~6)V; logic “0” is represented as -(2~6)V. The interface signal levels are lower than those of RS-232-C, making it less likely to damage the interface circuit chips, and this level is compatible with TTL levels, allowing for easy connection with TTL circuits.

2. The maximum data transmission rate for RS-485 is 10Mbps.

3. RS-485 interfaces use a combination of balanced drivers and differential receivers, enhancing common mode interference resistance, i.e., good noise immunity.

4. The maximum communication distance for RS-485 is approximately 1219M, with a maximum transmission rate of 10Mb/S. The transmission rate is inversely proportional to the transmission distance; at a transmission rate of 100Kb/S, the maximum communication distance can be reached. If longer distances are required, RS-485 repeaters need to be added. The RS-485 bus generally supports a maximum of 32 nodes; if special RS-485 chips are used, it can reach 128 or 256 nodes, with a maximum support of 400 nodes.

Due to the early emergence of the RS-232 interface standard, it inevitably has some shortcomings, mainly as follows:

(1) The signal voltage levels of the interface are relatively high, which can easily damage the interface circuit chips. Additionally, since the 232 levels are not compatible with TTL levels, a level conversion circuit is required to connect to TTL circuits;

(2) The transmission rate is relatively low; in asynchronous transmission, the baud rate is 20Kbps. Now, with the adoption of new UART chips, baud rates have reached 115.2Kbps (1.832M/16);

(3) The interface uses one signal line and one signal return line to form a common ground transmission format, which is prone to common mode interference, making it weak against noise interference;

(4) The transmission distance is limited; the maximum standard transmission distance is 50 meters, but in practice, it can only be used for about 15 meters;

(5) RS-232 only allows one-to-one communication and does not consider forming a serial bus. (This point is crucial; in many control scenarios, it is one control to multiple devices. If the master device needs to communicate point-to-point with the slave devices, the on-site wiring will become a spider web.)

Understanding the Differences Between RS-232, RS-422, and RS-485

Unbalanced serial communication interfaces RS-423, RS-449

Understanding the Differences Between RS-232, RS-422, and RS-485Understanding the Differences Between RS-232, RS-422, and RS-485

Balanced serial communication interface RS-422

RS-422 (EIA RS-422-A Standard) is the serial connection standard for Apple’s Macintosh computers. RS-422 uses differential signals, while RS-232 uses unbalanced reference ground signals. Differential transmission uses two wires to send and receive signals, providing better noise immunity and longer transmission distances compared to RS-232. In industrial environments, better noise resistance and longer transmission distances are significant advantages.

Understanding the Differences Between RS-232, RS-422, and RS-485Understanding the Differences Between RS-232, RS-422, and RS-485Understanding the Differences Between RS-232, RS-422, and RS-485Understanding the Differences Between RS-232, RS-422, and RS-485

4. Comparison Between RS-232 and RS-485

1. Noise Immunity: The RS485 interface uses a combination of balanced drivers and differential receivers, providing good noise immunity. The RS232 interface uses one signal line and one signal return line to form a common ground transmission format, which is prone to common mode interference.

2. Transmission Distance: The maximum transmission distance for the RS485 interface is 1200 meters (at 9600bps), and can actually reach 3000 meters. RS232 has a limited transmission distance, with a maximum standard transmission distance of 50 meters, but in practice can only be used for about 15 meters.

3. Communication Capability: The RS-485 interface allows up to 128 transceivers to be connected on the bus, enabling users to easily establish a device network using a single RS-485 interface. RS-232 only allows one-to-one communication.

4. Transmission Rate: RS-232 has a lower transmission rate, with a baud rate of 20Kbps in asynchronous transmission. The RS-485 maximum data transmission rate is 10Mbps.

5. Signal Lines: The RS485 interface forms a half-duplex network generally requiring only two signal lines. The RS-232 port generally uses RXD, TXD, and GND three lines.

6. Electrical Voltage Levels: The logic “1” in RS-485 is indicated by the voltage difference between the two wires as +(2-6)V; logic “0” is indicated by the voltage difference as -(2-6)V. In RS-232-C, the voltage of any signal line is in a negative logical relationship. That is, logic “1” is -5 to -15V; logic “0” is +5 to +15V.

5. Comparison Between RS-422 and RS-485

The electrical performance of RS-485 is identical to that of RS-422. The main differences are:

1. RS-422 has 4 signal lines: two for sending (Y, Z) and two for receiving (A, B). Since RS-422 separates receiving and sending, it can receive and send simultaneously (full duplex).

2. RS-485 only has two data lines: sending and receiving are both A and B. Since RS-485 shares two wires for receiving and sending, it cannot receive and send simultaneously (half duplex).

The RS-485 standard uses balanced transmission and differential reception data transceivers to drive the bus, with specific specifications required:

The receiver’s input resistance RIN ≥ 12kΩ

The driver can output a common mode voltage of ±7V

The input capacitance ≤ 50pF

In the case of 32 nodes, with a 120Ω terminating resistor configured, the driver should still output a voltage of at least 1.5V (the size of the terminating resistor depends on the parameters of the twisted pair used).

The receiver’s input sensitivity is 200mV (i.e., (V+) – (V-) ≥ 0.2V indicates signal “0”; (V+) – (V-) ≤ -0.2V indicates signal “1”).

Understanding the Differences Between RS-232, RS-422, and RS-485

The characteristics of RS-485 make it the preferred standard for data transmission in industrial applications due to its long distance, multi-node (32 nodes), and low transmission line costs.

(1) RS-485’s electrical characteristics: The sending end indicates logic “0” with a voltage difference of + (2~6)V between the two wires; logic “1” is indicated by – (2~6)V. At the receiving end, if A is higher than B by more than 200mV, it is considered logic “0”; if A is lower than B by more than 200mV, it is considered logic “1”;

(2) The maximum data transmission rate for RS-485 is 10Mbps. However, since RS-485 often needs to communicate with the RS-232 port of a PC, the actual maximum is generally 115.2Kbps. Higher rates reduce the transmission distance for RS-485, so it is often around or below 9600bps;

(3) The RS-485 interface uses a combination of balanced drivers and differential receivers, providing good noise immunity;

(4) The maximum transmission distance for RS-485 is 1200 meters (at 9600bps), and can actually reach 3000 meters. The RS-485 interface allows up to 128 transceivers to be connected on the bus, enabling users to easily establish a network using a single RS-485 interface. The RS-485 interface forms a half-duplex network generally requiring only two signal lines, so RS-485 interfaces use twisted pair transmission. The RS-485 international standard does not specify an interface connector standard, so terminal blocks or DB-9, DB-25, etc., connectors can be used.

When using RS-485 interfaces, for specific transmission line diameters, the maximum cable length allowed for data signal transmission from the generator to the load is a function of the data signal rate, which is mainly limited by signal distortion and noise. The maximum cable length and signal rate relationship curve is obtained using 24AWG copper core twisted telephone cable (wire diameter of 0.51mm), with a capacitance of 52.5PF/M between wires and a terminal load resistance of 100 ohms (cited from GB11014-89 Appendix A). When the data signal rate is reduced to below 90Kbit/S, assuming the maximum allowable signal loss is 6dBV, the cable length is limited to 1200m. In practice, it is entirely possible to achieve longer cable lengths than this. When using cables of different diameters, the maximum cable length obtained will vary. For example, when the data signal rate is 600Kbit/S, using 24AWG cable, the maximum cable length is 200m; if using 19AWG cable (wire diameter of 0.91mm), the cable length can exceed 200m; if using 28AWG cable (wire diameter of 0.32mm), the cable length can only be less than 200m.

For long-distance communication using RS-485, it is recommended to use shielded cables, with the shielding layer serving as the ground.

6. Three Factors Affecting RS-485 Bus Communication Speed and Reliability

1. Signal Reflection in Communication Cables

During communication, two signal factors cause signal reflection: impedance discontinuity and impedance mismatch.

Impedance discontinuity occurs when the signal suddenly encounters a cable impedance that is very small or nonexistent at the end of the transmission line, causing signal reflection at that point, as illustrated. This principle of signal reflection is similar to light reflecting when entering a different medium. To eliminate this reflection, a terminating resistor matching the cable’s characteristic impedance must be bridged at the end of the cable, ensuring impedance continuity. Since signals on the cable are transmitted bidirectionally, a matching terminating resistor can also be bridged at the other end of the communication cable.

Understanding the Differences Between RS-232, RS-422, and RS-485

Theoretically, as long as a terminating resistor matching the cable’s characteristic impedance is bridged at the end of the transmission cable, signal reflection should no longer occur. However, in practical applications, due to variations in the characteristic impedance of the transmission cable and the communication baud rate, it is unlikely that the characteristic impedance will match the terminating resistor exactly, thus some signal reflection will still exist.

Another cause of signal reflection is the impedance mismatch between the data transceiver and the transmission cable. This type of reflection is mainly evident when the communication line is idle, leading to data chaos across the entire network.

The impact of signal reflection on data transmission ultimately arises from the reflected signal triggering the comparator at the receiver’s input, causing the receiver to receive erroneous signals, resulting in CRC errors or entire data frame errors.

In signal analysis, the parameter used to measure the intensity of reflected signals is the RAF (Reflection Attenuation Factor). Its calculation formula is as follows:

RAF=20lg(Vref/Vinc) (1)

Where: Vref—reflected signal voltage; Vinc—incident signal voltage at the connection point between the cable and the transceiver or terminal resistor.

The specific measurement method is illustrated in the figure. For example, if the peak-to-peak value of the incident signal sine wave at 2.5MHz is +5V, and the peak-to-peak value of the reflected signal is +0.297V, then the reflection attenuation factor of the communication cable at a communication rate of 2.5MHz is:

RAF=20lg(0.297/2.5)=-24.52dB

Understanding the Differences Between RS-232, RS-422, and RS-485

To mitigate the impact of reflected signals on communication lines, noise suppression and bias resistor methods are typically employed. In practical applications, for relatively small reflected signals, the bias resistor method is often used for simplicity and convenience. The principle of how to improve communication reliability through bias resistors in communication lines.

2. Signal Attenuation in Communication Cables

The second factor affecting signal transmission is the attenuation of signals during transmission through the cable. A transmission cable can be viewed as an equivalent circuit composed of distributed capacitance, distributed inductance, and resistance, as illustrated.

Understanding the Differences Between RS-232, RS-422, and RS-485

The distributed capacitance C of the cable is mainly generated by the two parallel conductors of the twisted pair. The resistance of the conductors has a minimal effect on the signal and can be ignored. The signal loss is primarily due to the LC low-pass filter formed by the distributed capacitance and distributed inductance of the cable. The attenuation coefficients of the standard LAN-type two-core cables used in PROFIBUS (the standard cable selected by Siemens for the DP bus) are shown in the table below for different baud rates.

Cable Attenuation CoefficientUnderstanding the Differences Between RS-232, RS-422, and RS-485

3. Pure Resistive Load in Communication Cables

The third factor affecting communication performance is the size of the pure resistive load (also called DC load). Here, pure resistive load mainly consists of terminal resistors, bias resistors, and RS-485 transceivers.

Understanding the Differences Between RS-232, RS-422, and RS-485

When discussing the EIA RS-485 specification, it was mentioned that RS-485 drivers can output a differential voltage of at least 1.5V when configured with 32 nodes and 150Ω terminal resistors. An input resistance of 12kΩ for a receiver results in the equivalent circuit of the entire network, as illustrated. Based on this, the load capacity of the RS-485 driver is calculated as:

RL=32 input resistors in parallel with 2 terminal resistors=(((12000/32)×(150/2))/((12000/32)+(150/2)))≈51.7Ω

Currently commonly used RS-485 drivers include MAX485, DS3695, MAX1488/1489, and the SN75176A/D used by Holley, among others. Some RS-485 drivers can achieve load capacities of up to 20Ω. Ignoring many other factors, according to the relationship between driving capability and load, the maximum number of nodes a driver can support will far exceed 32.

When the communication baud rate is relatively high, bias resistors are necessary on the line. The connection method for bias resistors is illustrated. Their role is to pull the voltage on the bus away from 0V when there is no data (idle mode), as shown. This way, even if small reflected signals or interference occur in the line, the data receivers connected to the bus will not malfunction due to these signals.

Understanding the Differences Between RS-232, RS-422, and RS-485

Through the following example, the size of the bias resistor can be calculated:

Terminal Resistors Rt1=Rr2=120Ω;

Assuming the maximum peak-to-peak value of the reflected signal Vref≤0.3Vp-p, then the negative half-cycle voltage Vref≤0.15V; the reflection current caused by the reflected signal on the terminal resistance Iref≤0.15/(120||120)=2.5mA. The hysteresis voltage value of a typical RS-485 transceiver (including SN75176) is 50mV, thus:

(Ibias-Iref)×(Rt1||Rt2)≥50mV

Thus, it can be calculated that the bias current generated by the bias resistor Ibias≥3.33mA

+5V=Ibias(Rup+Rdown+(Rt1||Rt2)) (2)

By equation (2), it can be calculated that Rup=Rdown=720Ω

In practical applications, there are two methods for adding bias resistors to the RS-485 bus:

(1) Distributing the bias resistors evenly to each transceiver on the bus. This method adds bias resistors to each RS-485 transceiver, providing a bias voltage to each transceiver.

(2) Using a pair of bias resistors on a segment of the bus. This method is effective against large reflected signals or interference signals on the bus. It is important to note that the addition of bias resistors increases the load on the bus.

7. The Relationship Between RS-485 Bus Load Capacity and Communication Cable Length

When designing the network configuration consisting of RS-485 bus (bus length and number of loads), three parameters should be considered: pure resistive load, signal attenuation, and noise margin. The pure resistive load and signal attenuation have been discussed earlier. Now, the noise margin (Noise Margin) will be discussed. The noise margin of RS-485 bus receivers should be greater than 200mV. The previous discussions assumed a noise margin of 0. In practical applications, to enhance the anti-interference capability of the bus, it is desirable for the system’s noise margin to be better than that specified in the EIA RS-485 standard. The relationship between the number of loads on the bus and the communication cable length can be seen from the following formula:

Vend=0.8(Vdriver-Vloss-Vnoise-Vbias)(3)

Where: Vend is the signal voltage at the end of the bus, which is set to 0.2V during standard measurement; Vdriver is the output voltage of the driver (which depends on the number of loads. For 5 to 35 loads, Vdriver=2.4V; when there are fewer than 5 loads, Vdriver=2.5V; when there are more than 35 loads, Vdriver≤2.3V); Vloss is the signal loss during transmission in the bus (which depends on the specifications and length of the communication cable) and can be calculated using the standard cable attenuation coefficient provided in the table; Vnoise is the noise margin, which is set to 0.1V during standard measurement; Vbias is the bias voltage provided by the bias resistors (typical value of 0.4V).

The multiplication by 0.8 in equation (3) ensures that the communication cable does not enter a fully loaded state. From equation (3), it can be observed that the size of Vdriver is inversely proportional to the number of loads on the bus, while the size of Vloss is inversely proportional to the length of the bus. The other parameters depend only on the type of driver used. Therefore, once the RS-485 driver has been selected, the relationship between the number of loads on the bus and the maximum distance the signal can be transmitted is directly related. The specific relationship is: within the allowable range of the bus, the more loads connected, the shorter the distance the signal can be transmitted; the fewer loads connected, the longer the distance the signal can be transmitted.

8. The Impact of Distributed Capacitance on RS-485 Bus Transmission Performance

The distributed capacitance of the cable is primarily generated by the two parallel conductors of the twisted pair. Additionally, there is distributed capacitance between the conductors and the ground, which is small but should not be ignored in analysis. The impact of distributed capacitance on bus transmission performance mainly arises because the signals transmitted on the bus are fundamental wave signals, which can only express “1” and “0”. In special bytes, such as 0x01, the signal “0” allows sufficient charging time for the distributed capacitance, while when the signal “1” arrives, due to the charge in the distributed capacitance, it cannot discharge in time, resulting in (Vin+) – (Vin-) remaining greater than 200mV, causing the receiver to mistakenly interpret it as “0”, ultimately leading to CRC check errors and errors in the entire data frame transmission. The specific process is illustrated.

Understanding the Differences Between RS-232, RS-422, and RS-485

The distributed influence on the bus leads to data transmission errors, thereby reducing the performance of the entire network. Two solutions to this problem are:

(1) Reducing the data transmission baud rate;

(2) Using cables with low distributed capacitance to improve the quality of the transmission line.

Simply connecting the A and B ends of each interface with a pair of twisted wires, without grounding the RS-485 communication link, can work in some cases but poses a hidden danger to the system. The RS-485 interface transmits signals differentially and does not require a reference point for signal detection; it only needs to detect the potential difference between the two wires. However, it should be noted that the transceiver can only operate normally when the common mode voltage does not exceed a certain range (-7V to +12V). When the common mode voltage exceeds this range, it can affect communication reliability or even damage the interface. As illustrated, when transmitter A sends data to receiver B, the common mode voltage at transmitter A’s output is VOS. Due to the existence of ground potential differences VGPD between the two systems, the common mode voltage at the receiver’s input can reach VCM=VOS+VGPD. The RS-485 standard specifies VOS≤3V, but VGPD can vary significantly (dozens of volts), potentially accompanied by strong interference signals that can cause the common mode input VCM to exceed the normal range, generating interference currents on the signal line that impact normal communication or damage equipment.

Conclusion:

Serial ports are a very versatile device interface, commonly used in instrumentation and equipment for remote data acquisition or remote control. The development of serial ports is relatively simple, making them one of the preferred interfaces for many engineers.

Sharing Knowledge Brings More Gains

01. An old worker was dismissed by the factory owner due to a lack of work, and a year later, he paid a painful price!

02. In the power system, there are several types of safety helmets; do you know them?

03. DC and AC System Special Topic (11): Common Fault Analysis and Handling Methods for DC Screens

04.【Downloadable】SF6 Gas Insulated Common Box Charged Cabinet Training Materials

05. A comprehensive explanation of basic circuit knowledge~

06. Why do transformers explode?

07. Installation Specifications for Distribution Network Devices Below 10kV

08. A complete knowledge collection of current and voltage transformers, all in one PPT!

Leave a Comment