10 Free Training Materials for Industrial Robot Brands!
(Click on the abovebrown text to download the materials)
Serial communication is one of the most basic communication methods faced by engineers, with RS-232 being the simplest. Many beginners often struggle to understand the relationship 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 traffic, UART can be likened to a station, while a frame of data is like a car. Cars must follow traffic rules while on the road. In urban areas, the speed limit is generally 30 or 40, while on highways, it can reach 120. The specific road and speed limits depend on the protocol. 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, responsible for handling the serial and parallel conversion between the data bus and the serial port, and defining the frame format. As long as both communicating parties use the same frame format and baud rate, communication can be completed with just two signal lines (Rx and Tx) without sharing a clock signal, hence it is also called asynchronous serial communication.

By adding a suitable level converter, such as SP3232E or SP3485, UART can also be used for RS-232 or RS-485 communication, or connected to a computer port. UART is widely used in applications like mobile phones, industrial control, and PCs.

UART uses asynchronous serial communication.
Serial communication refers to transmitting data one bit at a time over a single transmission line. Its characteristics include simple communication lines, low-cost implementation, and suitability for long-distance communication, albeit at slower speeds.
Asynchronous communication uses one character as the transmission unit, and the time interval between two characters is not fixed, while 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 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, and 1 stop bit), the baud rate would be 10 × 120 = 1200 baud.
The data communication format is illustrated in the following diagram:

The meanings of each position are as follows:
Start bit: A logic “0” signal is sent first, indicating the start of the transmission character. Data bits: Can be 5-8 bits of logic “0” or “1”. For example, ASCII code (7 bits) or extended BCD code (8 bits). Parity bit: This bit makes the number of “1” bits even (even parity) or odd (odd parity) after adding it to the data bits. Stop bit: It marks the end of the character data and can be 1, 1.5, or 2 bits of high level. Idle bit: In a logic “1” state, indicating that no data is currently being transmitted on the line.
Note: Asynchronous communication is character-based, and as long as the receiving device can stay synchronized with the sending device during the character transmission time after receiving the start signal, it can correctly receive the data. The arrival of the next character’s start bit recalibrates synchronization (achieved by detecting the start bit to enable self-synchronization of the clocks between sender and receiver).

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 the electrical and physical characteristics and only applies to the data transmission path; it does not include data processing methods. It is important to clarify 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 concerning 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 and defines the signal content for each pin, as well as the voltage levels for various signals. Later, IBM simplified RS-232 to a DB-9 connector for use with PC computers, which has become the de facto standard today. The RS-232 port in industrial control typically uses only three lines: RXD (2), TXD (3), and GND (5).

Initially, since PCs were equipped with RS-232 interfaces, RS-232 was the choice for UART applications. However, modern personal computers, including laptops and desktops, no longer have RS-232 interfaces; users find no DB9 connectors on computer motherboards. As a result, development boards now typically use TTL UART or directly implement UART to USB conversion.
In embedded systems, the term “serial port” usually refers to the UART port, but there is often confusion about its distinction from COM ports and the relationships among RS-232, TTL, etc. In reality, UART and COM refer to physical interface forms (hardware), while TTL and RS-232 refer to voltage standards (electrical signals).
UART has 4 pins (VCC, GND, RX, TX) and uses TTL levels where low level is 0 (0V) and high level is 1 (3.3V or above).

3. RS-485/RS-422 Standards
The RS-232 interface can achieve point-to-point communication, but this method does not enable networking. To address this issue, a new standard, RS-485, was developed. RS-485 uses differential signaling, also known as balanced transmission, employing a pair of twisted wires, where one wire is defined as A and the other as B.
Typically, the positive voltage level between the sending driver A and B is +2 to +6V, representing one logic state, and the negative voltage level is -2 to +6V, representing another logic state. There is also a signal ground C, and RS-485 includes an “enable” terminal, which is optional in RS-422.
The electrical characteristics of RS-422 are identical to those of RS-485. The main difference is that RS-422 has 4 signal lines: two for sending and two for receiving. Because RS-422 separates the sending and receiving functions, it can send and receive simultaneously (full duplex). This requirement for separate channels makes RS-422 suitable for communication between two stations in star and ring networks, but not for bus networks; RS-485 only has 2 signal lines, so it operates in half-duplex mode and is commonly used in bus networks.

1. RS-485 Electrical Characteristics: Logic “1” is represented by a voltage difference of + (2~6)V between the two wires; logic “0” is represented by a voltage difference of – (2~6)V. The signal voltage levels of RS-485 are lower than those of RS-232-C, making it less likely to damage the interface circuit chips, and these levels are compatible with TTL levels, allowing for easy connection to TTL circuits.
2. The maximum data transmission rate for RS-485 is 10Mbps.
3. The RS-485 interface employs a combination of balanced drivers and differential receivers, enhancing its resistance to common-mode interference, thus providing good noise immunity.
4. The maximum communication distance for RS-485 is approximately 1219 meters, 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, and with special RS-485 chips, this can reach 128 or 256 nodes, with a maximum of 400 nodes supported.
Due to the earlier introduction 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, because RS-232 levels are not compatible with TTL levels, level conversion circuits are needed for connection to TTL circuits;
(2) The transmission rate is relatively low; during asynchronous transmission, the baud rate is 20Kbps. However, due to new UART chips, baud rates have reached 115.2Kbps (1.832M/16);
(3) The interface uses one signal line and one signal return line, forming a common-ground transmission method. This common-ground transmission is susceptible to common-mode interference, resulting in weak noise immunity;
(4) The transmission distance is limited; the maximum standard transmission distance is 50 meters, but in practice, it can only be used at around 15 meters;
(5) RS-232 only allows point-to-point communication, without considering the formation of a serial bus. (This is crucial; in many control scenarios, it is one control to many. If the master device needs to communicate with slave devices point-to-point, the wiring will become a spider web.)

Unbalanced serial communication interfaces RS-423, RS-449


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 signals with reference ground. Differential transmission uses two wires to send and receive signals. Compared to RS-232, RS-422 has better noise immunity and longer transmission distances. These characteristics are significant advantages in industrial environments.




4. Comparison Between RS-232 and RS-485
1. Noise immunity: The RS-485 interface employs a combination of balanced drivers and differential receivers, providing good noise resistance. The RS-232 interface uses one signal line and one signal return line, forming a common-ground transmission method that is prone to common-mode interference.
2. Transmission distance: The maximum standard transmission distance for the RS-485 interface is 1200 meters (at 9600bps), and it can actually reach 3000 meters. RS-232 has a limited transmission distance, with a maximum standard transmission distance of 50 meters, but in practice, it can only be used at around 15 meters.
3. Communication capability: The RS-485 interface allows for up to 128 transceivers on the bus, enabling users to easily establish a device network using a single RS-485 interface. RS-232 only allows point-to-point communication.
4. Transmission rate: RS-232 has a lower transmission rate, with a baud rate of 20Kbps during asynchronous transmission. RS-485 has a maximum data transmission rate of 10Mbps.
5. Signal lines: The RS-485 interface typically requires only two signal lines to form a half-duplex network, while RS-232 usually requires three lines: RXD, TXD, and GND.
6. Electrical voltage levels: The logic “1” of RS-485 is represented by a voltage difference of + (2-6)V between the two wires; the logic “0” is represented by a voltage difference of – (2-6)V. In RS-232-C, the voltage of any signal line is in a negative logic 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 sending and receiving, it can send and receive simultaneously (full duplex).
2. RS-485 has only two data lines: A and B are used for both sending and receiving. Because RS-485 shares these two lines for sending and receiving, it cannot send and receive simultaneously (half duplex).
The RS-485 standard employs balanced transmission and differential reception data transceivers to drive the bus, with specific requirements:
The receiver’s input resistance RIN ≥ 12kΩ
The driver can output a common-mode voltage of ±7V
The input capacitance ≤ 50pF
Under the condition of 32 nodes and with 120Ω termination resistors, the driver must still output at least 1.5V (the size of the termination resistor relates to the parameters of the twisted pair used).
The input sensitivity of the receiver is 200mV (i.e., (V+) – (V-) ≥ 0.2V indicates signal “0”; (V+) – (V-) ≤ -0.2V indicates signal “1”).

Due to the long-distance, multi-node (32 nodes), and low-cost transmission line characteristics, EIA RS-485 has become the preferred standard for data transmission in industrial applications.
(1) RS-485 electrical characteristics: The sending end represents logic “0” with a voltage difference of + (2~6)V between the two wires; logic “1” is represented by a voltage difference of – (2~6)V. The receiving end considers A higher than B by more than 200mV as logic “0”, and A lower than B by more than 200mV as 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. A higher rate may reduce the transmission distance, so it is often around or below 9600bps;
(3) The RS-485 interface employs a combination of balanced drivers and differential receivers, providing good noise immunity;
(4) The maximum transmission distance for the RS-485 interface is 1200 meters (at 9600bps), and it can actually reach 3000 meters. The RS-485 interface allows for up to 128 transceivers on the bus, enabling users to easily establish a network with a single RS-485 interface. Since the RS-485 interface forms a half-duplex network, it generally requires only two signal lines, thus RS-485 interfaces use twisted pair transmission. The international standard for RS-485 does not specify connector standards, so terminal blocks or DB-9, DB-25 connectors can be used.
When using the RS-485 interface, the maximum cable length allowed for data signal transmission from the generator to the load depends on the specific cable diameter and is a function of the data signal rate, mainly limited by signal distortion and noise. The maximum cable length versus signal rate curve is derived from using 24AWG copper twisted pair telephone cables (diameter 0.51mm), with an inter-wire bypass capacitance of 52.5PF/M and a terminal load resistance of 100 ohms (cited from GB11014-89 Appendix A). When the data signal rate drops below 90Kbit/S, assuming the maximum allowable signal loss is 6dBV, the cable length is limited to 1200m.
In practice, it is possible to achieve a greater cable length. Using cables of different diameters will yield different maximum cable lengths. For instance, when the data signal rate is 600Kbit/S, using 24AWG cable, the maximum cable length is 200m; if 19AWG cable (diameter 0.91mm) is used, the cable length can exceed 200m; if 28AWG cable (diameter 0.32mm) is used, the cable length must be less than 200m.
For long-distance communication using RS-485, it is recommended to use shielded cables and connect the shield layer as ground.
6. Three Factors Affecting RS-485 Bus Communication Speed and Reliability
1. Signal Reflection in Communication Cables
During communication, two factors can cause signal reflection: impedance discontinuity and impedance mismatch.
Impedance discontinuity occurs when the signal suddenly encounters a significantly lower cable impedance at the end of the transmission line, causing the signal to reflect, as illustrated. This principle of signal reflection is similar to light reflecting when it transitions from one medium to another. To eliminate this reflection, a termination resistor matching the cable’s characteristic impedance must be bridged at the end of the cable, ensuring impedance continuity. Since signal transmission on the cable is bidirectional, a matching termination resistor can also be bridged at the other end of the communication cable.

Theoretically, if a termination resistor matching the cable’s characteristic impedance is bridged at the end of the transmission cable, signal reflection should not occur. However, in practical applications, the characteristic impedance of the transmission cable is related to the communication baud rate and other environmental factors, making it impossible for the characteristic impedance to perfectly match the termination resistor, thus some signal reflection may still exist.
Another cause of signal reflection is the impedance mismatch between the data transceiver and the transmission cable. This mismatch primarily manifests when the communication line is idle, causing data confusion across the network.
The impact of signal reflection on data transmission ultimately occurs because the reflected signal triggers the comparator at the receiver’s input, leading the receiver to receive erroneous signals, resulting in CRC errors or entire data frame errors.
In signal analysis, the parameter used to measure the strength of the reflected signal is RAF (Reflection Attenuation Factor). Its calculation formula is as follows:
RAF=20lg(Vref/Vinc) (1)
Where: Vref—voltage level of the reflected signal; Vinc—voltage level of the incident signal at the connection point between the cable and the transceiver or termination resistor.
The specific measurement method is illustrated in the diagram. 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 at a communication rate of 2.5MHz, the reflection attenuation factor for this communication cable is:
RAF=20lg(0.297/2.5)=-24.52dB

To mitigate the impact of reflected signals on communication lines, noise suppression and bias resistors are typically employed. In practical applications, for relatively small reflected signals, the addition of bias resistors is often used for simplicity and convenience. The principle of how to improve communication reliability by adding bias resistors in communication lines is as follows.
2. Signal Attenuation in Communication Cables
The second factor affecting signal transmission is the attenuation of the signal 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.

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

3. Pure Resistive Load in Communication Cables
The third factor affecting communication performance is the magnitude of the pure resistive load (also called DC load). This refers to the pure resistive load primarily composed of termination resistors, bias resistors, and RS-485 transceivers.

When discussing the EIA RS-485 specification, it was mentioned that the RS-485 driver can output at least 1.5V of differential voltage with 32 nodes and 150Ω termination resistors. The input resistance of a receiver is typically 12kΩ, and the entire network’s equivalent circuit is illustrated. Based on this calculation, the load capacity of the RS-485 driver is:
RL=32 input resistances in parallel with 2 termination resistors=(((12000/32)×(150/2))/((12000/32)+(150/2)))≈51.7Ω
Commonly used RS-485 drivers include MAX485, DS3695, MAX1488/1489, and SN75176A/D used by Holley, among others, with some RS-485 drivers having load capacities of up to 20Ω. Ignoring many other factors, based on the relationship between driving capacity and load, a driver can support a maximum number of nodes far exceeding 32.
When communication baud rates are relatively high, bias resistors are essential on the line. The connection method of the bias resistors is illustrated. Their function is to pull the level of the bus away from 0V when there is no data (idle state), 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.

Through the following example, the size of the bias resistors can be calculated:
Termination 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 reflected current Iref caused by the reflected signal on the termination resistor ≤ 0.15/(120||120)=2.5mA. The hysteresis value of the typical RS-485 transceiver (including SN75176) is 50mV, thus:
(Ibias-Iref)×(Rt1||Rt2)≥50mV
Therefore, the bias current Ibias≥3.33mA
+5V=Ibias(Rpull-up+Rpull-down+(Rt1||Rt2)) (2)
Using equation (2), it can be calculated that Rpull-up=Rpull-down=720Ω
In practical applications, there are two methods for adding bias resistors to the RS-485 bus:
(1) Distributing the bias resistors evenly among each transceiver on the bus. This method adds a bias resistor to each transceiver connected to the RS-485 bus, providing a bias voltage to each transceiver.
(2) Using a pair of bias resistors on a segment of the bus. This method is effective for significant reflected or interference signals on the bus. It is worth noting that adding bias resistors increases the load on the bus.
7. Relationship Between RS-485 Bus Load Capacity and Communication Cable Length
When designing the network configuration of the 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 parameters have been discussed earlier, and now we will discuss noise margin. The noise margin of the RS-485 bus receiver should be at least greater than 200mV. The previous discussions assumed a noise margin of 0. In practical applications, to enhance the bus’s noise immunity, it is always 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 observed 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 defined as 0.2V in standard measurements; Vdriver is the output voltage of the driver (which is related to the number of loads. For 5 to 35 loads, Vdriver=2.4V; for fewer than 5 loads, Vdriver=2.5V; for more than 35 loads, Vdriver≤2.3V); Vloss is the signal loss during transmission in the bus (which relates to the specifications and length of the communication cable), calculated using the formula b=20lg(Vout/Vin); Vnoise is the noise margin, defined as 0.1V in standard measurements; Vbias is the bias voltage provided by the bias resistors (typical value is 0.4V).
In equation (3), the factor of 0.8 ensures that the communication cable does not enter a fully loaded state. From equation (3), it can be seen that the size of Vdriver is inversely related to the number of loads on the bus, while the size of Vloss is inversely related to the bus length; the other parameters depend solely on the type of driver used. Therefore, once the RS-485 driver is selected, under a constant communication baud rate, the number of loads directly correlates with the maximum transmission distance of the signal. Specifically, within the allowable range of the bus, the more loads there are, the shorter the distance the signal can be transmitted; conversely, the fewer loads there are, the farther 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 ground, though small, it should not be neglected in analysis. The impact of distributed capacitance on bus transmission performance mainly arises because the transmission on the bus consists of fundamental signals, represented only as “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, the voltage (Vin+) – (Vin-) may still exceed 200mV, leading the receiver to mistakenly interpret it as “0”, ultimately causing CRC errors and errors in the entire data frame transmission. The specific process is illustrated.

Due to the distributed influence on the bus, data transmission errors occur, leading to reduced overall network performance. Two methods can solve this issue:
(1) Reducing the data transmission baud rate;
(2) Using cables with lower distributed capacitance to improve transmission line quality.
Simply connecting the A and B ends of each interface with a pair of twisted wires without grounding the RS-485 communication link’s signals can work in some cases, but it poses risks to the system. The RS-485 interface transmits signals differentially without needing a reference point for signal detection, only requiring the detection of the potential difference between the two wires. However, it should be noted that the transceiver only operates correctly 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 shown, when transmitter A sends data to receiver B, the output common-mode voltage of transmitter A is VOS. Due to the independent grounding systems of the two systems, a ground potential difference VGPD exists, causing the common-mode voltage at the receiver’s input to reach VCM=VOS+VGPD. The RS-485 standard specifies VOS≤3V, but VGPD can vary significantly (tens of volts or more), potentially accompanied by strong interference signals, causing the receiver’s common-mode input VCM to exceed normal limits, generating interference currents on the signal line that affect normal communication or damage equipment.
Summary:
The serial port is a very common device interface, often used for communication in instruments and devices, commonly for remote data collection or remote control. The development of serial ports is relatively straightforward, making them one of the favorite interfaces for many engineers.
End
Source: Network
Recommended Reads:<br/> 5S and Visual Management Case Studies, 105 images, free to take! Heard that Boeing pilots look down on Airbus pilots? Another addition, only 26 "Lighthouse Factories" globally, 6 located in China. Heard that Boeing pilots look down on Airbus pilots? Tragic! Workers crushed to death by robotic arms; safety regulations cannot be ignored!<br/><br/> Download Free Materials:<br/> Limited time download | 18G Fanuc Robot Video Tutorial (82 lectures in total)! Limited time free | 71 sets of industrial robot family drawings / robotic arm drawings available for free | "Industrial Robot Engineering Application Virtual Simulation Tutorial"<br/><br/> Click to see, let the world see your likes.