Serial communication is the most basic communication method faced by electronic engineers, with RS-232 being the simplest among them. Many beginners often struggle to understand the relationship and differences between UART, RS-232, RS-422, and RS-485. This article will discuss the understanding of 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 on the road must obey traffic rules. In urban areas, speed limits are generally 30-40, while highways can reach 120. The speed limit and the road a car takes depend on how the protocol specifies it. Common serial protocols include RS-232, RS-422, and RS-485. What are the subtle differences between them? Let’s explore this together.
1. What is UART?
UART stands for Universal Asynchronous Receiver/Transmitter, which is an asynchronous transceiver and a key module for asynchronous communication between devices. UART is responsible for handling the serial/parallel and parallel/serial conversions between the data bus and the serial port, and it specifies the frame format. As long as both communication parties use the same frame format and baud rate, communication can be completed using 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 and RS-485 communication or connected to a computer’s port. UART has a wide range of applications, used in mobile phones, industrial control, PCs, etc.
UART uses asynchronous serial communication.
Serial communication refers to the sequential transmission of data bit by bit over a single transmission line. Its characteristics include simple communication lines that can be implemented with simple cables, reducing costs, and being suitable for long-distance communication, albeit at slower transmission speeds.
Asynchronous communication transmits one character at a time, and the time interval between two characters in 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 instance, a data transmission rate of 120 characters per second, with each character consisting of 10 bits (1 start bit, 7 data bits, 1 parity bit, and 1 stop bit), results in a baud rate of 10×120=1200 characters per second=1200 baud.
The data communication format is shown in the figure below:
The meanings of each bit are as follows:
Start Bit: A logic ‘0’ signal is sent first to indicate the beginning of the transmission character. Data Bits: Can be 5-8 bits of logic ‘0’ or ‘1’. For example, ASCII code (7 bits), extended BCD code (8 bits). Stop Bit: It is an end marker for character data, which can be 1 bit, 1.5 bits, or 2 bits of high level. Idle Bit: Remains in a logic ‘1’ state, indicating that there is currently no data transmission on the line.
Note: Asynchronous communication is character-based. The receiving device can correctly receive data as long as it stays synchronized with the sending device during the transmission time of one character after receiving the start signal. The arrival of the next character’s start bit recalibrates the synchronization (achieved by detecting the start bit to implement clock self-synchronization 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 stands for ‘Recommended Standard’, and 232 is the identification number. RS-232 specifies electrical and physical characteristics and only applies to the data transmission path; it does not include the processing methods of the data. It is important to note 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 relate to the physical layer of network protocols).
The standard specifies the use of a 25-pin DB-25 connector, detailing the signal content for each pin and specifying the voltage levels for various signals. Later, IBM simplified RS-232 to a DB-9 connector for PC machines, which has become the de facto standard today. In industrial control, RS-232 ports typically only use RXD (2), TXD (3), and GND (5).
In the past, since PCs came with RS-232 interfaces, we would choose RS-232 when we needed to use UART. However, personal computers today, including laptops and desktops, no longer have RS-232 interfaces, and you may not find a DB9 connector on the motherboard. Therefore, development boards now typically choose TTL UART or directly implement UART to USB on the development board.
In embedded systems, the term ‘serial port’ usually refers to the UART port, but we often confuse it with the COM port and the relationships between RS-232, TTL, etc. In fact, UART and COM refer to the physical interface form (hardware), while TTL and RS-232 refer to the voltage standards (electrical signals).
UART has 4 pins (VCC, GND, RX, TX) and uses TTL levels, with low level being 0 (0V) and high level being 1 (3.3V or above).
3. RS-485/RS-422 Standards
The RS-232 interface can implement point-to-point communication, but this method cannot achieve networking. To solve this problem, a new standard, RS-485, was created. The data signal of RS-485 uses differential transmission, also known as balanced transmission, utilizing a pair of twisted wires, one defined as A and the other as B.
Typically, the positive voltage between the sending drivers A and B is +2 to +6V, representing one logic state, while the negative voltage is -2 to 6V, representing another logic state. There is also a signal ground C, and RS-485 has an ‘enable’ terminal, which is optional in RS-422.
RS-422 has the same electrical characteristics as RS-485. The main difference is that RS-422 has 4 signal lines: two for transmission and two for reception. Because RS-422 separates the receiving and transmitting lines, it can receive and transmit simultaneously (full duplex). Due to the full duplex requirement for separate channels, 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 and is commonly used in bus networks.
1. RS-485 Electrical Characteristics: Logic ‘1’ is represented by the voltage difference between the two lines as + (2~6)V; logic ‘0’ is represented as – (2~6)V. The signal voltage levels are lower than those of RS-232-C, which reduces the risk of damaging the interface circuit chips, and this level is compatible with TTL levels, making it easy to connect with TTL circuits.
2. The maximum data transmission rate of RS-485 is 10Mbps.
3. The RS-485 interface uses a combination of balanced drivers and differential receivers, enhancing its ability to resist common-mode interference, meaning it has 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 achieved, and if longer distances are needed, RS-485 repeaters must be added. The RS-485 bus generally supports a maximum of 32 nodes, but with special 485 chips, it can reach up to 128 or 256 nodes, with a maximum of 400 nodes possible.
Since the RS-232 interface standard was introduced earlier, it inevitably has some shortcomings, mainly including the following points:
(1) The signal voltage levels of the interface are relatively high, which can easily damage the interface circuit chips. Moreover, because the 232 voltage levels are not compatible with TTL levels, level conversion circuits are required to connect with TTL circuits.
(2) The transmission rate is relatively low; during asynchronous transmission, the baud rate is 20Kbps. Now, due to the use of new UART chips, the baud rate has reached 115.2Kbps (1.832M/16).
(3) The interface uses one signal line and one signal return line to form a common-ground transmission mode, which is prone to common-mode interference, thus the noise immunity is weak.
(4) The transmission distance is limited, with the standard maximum transmission distance being 50 meters, but in practice, it can only be used at around 15 meters.
(5) RS-232 only allows point-to-point communication and does not consider forming a serial bus. (This point is very important; in many control scenarios, it is one-to-many; if the master device needs to communicate with the slave devices point-to-point, the on-site wiring becomes 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 reference ground signals. Differential transmission uses two wires to send and receive signals, and compared to RS-232, it has better noise immunity and longer transmission distances. In industrial environments, better noise resistance and longer transmission distances are significant advantages.
4. Comparison Between RS-232 and RS-485
1. Interference Resistance: The RS-485 interface uses a combination of balanced drivers and differential receivers, which has good noise immunity. The RS-232 interface uses one signal line and one signal return line to form a common-ground transmission mode, which is prone to common-mode interference.
2. Transmission Distance: The maximum transmission distance for RS-485 is 1200 meters (at 9600bps), and can actually reach up to 3000 meters. RS-232 has a limited transmission distance, with a standard maximum of 50 meters, but practically can only be used at around 15 meters.
3. Communication Capability: The RS-485 interface allows connecting up to 128 transceivers on the bus, enabling users to easily build device networks 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. The maximum data transmission rate for RS-485 is 10Mbps.
5. Signal Lines: The RS-485 interface typically requires only two signal lines for a half-duplex network. The RS-232 interface generally uses three lines: RXD, TXD, and GND.
6. Electrical Voltage Levels: RS-485 logic ‘1’ is represented by a voltage difference of + (2-6)V between the two lines; 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: logic ‘1’ is -5 to -15V; logic ‘0’ is +5 to +15V.
5. Comparison Between RS-422 and RS-485
RS-485 has the same electrical performance as RS-422. The main differences are:
1. RS-422 has 4 signal lines: two for sending (Y, Z) and two for receiving (A, B). Because RS-422 separates the receiving and transmitting lines, it can receive and transmit simultaneously (full duplex).
2. RS-485 only has two data lines: sending and receiving are both A and B. Since RS-485 shares the same two lines for receiving and transmitting, it cannot receive and transmit simultaneously (half duplex).
The RS-485 standard uses balanced transmission and differential reception for the data transceiver to drive the bus. The specific specifications are as follows:
The input resistance of the receiver RIN ≥ 12kΩ
The driver can output a common-mode voltage of ±7V
The input capacitance ≤ 50pF
In the case of 32 nodes, with 120Ω termination resistors, the driver must still output at least 1.5V (the size of the termination resistor is related 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 of transmission lines, EIA RS-485 has become the preferred standard for data transmission in industrial applications.
(1) RS-485 electrical characteristics: The sending end indicates logic ‘0’ with a voltage difference of + (2~6)V between the two lines; logic ‘1’ is indicated by – (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 transmission rate of RS-485 is 10Mbps. However, since RS-485 often needs to communicate with the RS-232 port of a PC, the practical maximum is generally 115.2Kbps. A higher rate would reduce the transmission distance of 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 it can actually reach 3000 meters. The RS-485 interface allows connecting up to 128 transceivers on the bus, meaning RS-485 has multi-machine communication capabilities, allowing users to easily build networks using a single RS-485 interface. Since the RS-485 interface typically requires only two signal lines for a half-duplex network, it uses twisted pair cables for transmission. The international standard for RS-485 does not specify a connector standard, so terminal blocks or DB-9, DB-25 connectors can be used.
When using the RS-485 interface, the maximum allowable cable length 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 derived using 24AWG copper core twisted telephone cables (with a diameter of 0.51mm), with a line-to-line bypass capacitance of 52.5PF/M and a terminal load resistance of 100 ohms (as referenced in 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 a longer cable length 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, whereas using 19AWG cable (0.91mm diameter) allows for a length greater than 200m; using 28AWG cable (0.32mm diameter) limits the length to less than 200m.
For long-distance communication using RS-485, it is recommended to use shielded cables and to connect the shield layer to 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 a signal encounters a cable impedance that is significantly smaller or nonexistent at the end of the transmission line, causing reflection at that point, similar to how light reflects when it transitions from one medium to another. To eliminate this reflection, a termination resistor matching the cable’s characteristic impedance must be connected at the end of the cable, ensuring continuity. Since signals are transmitted bi-directionally on the cable, a termination resistor of the same size can also be connected at the other end of the communication cable.
From a theoretical perspective, as long as a termination resistor matching the characteristic impedance of the transmission cable is connected at the end, signal reflection should not occur. However, in practical applications, due to the characteristic impedance of the transmission cable being related to the communication baud rate and other environmental factors, perfect matching with the termination resistor is not possible, leading to some degree of signal reflection.
Another cause of signal reflection is the impedance mismatch between the data transceiver and the transmission cable. This type of reflection primarily manifests when the communication line is idle, causing data chaos in the entire network.
The impact of signal reflection on data transmission ultimately results from the reflected signal triggering the comparator at the receiver’s input, causing the receiver to receive erroneous signals and leading to CRC check errors or entire data frame errors.
In signal analysis, the parameter used to measure the strength of the reflected signal is the 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 shown in the figure. For instance, if an experimental measurement at a frequency of 2.5MHz indicates a peak-to-peak value of +5V for the incident signal and +0.297V for the reflected signal, then the reflection attenuation factor for this communication cable at a frequency of 2.5MHz 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 used. In practical applications, for relatively small reflected signals, the bias resistor method is often employed for simplicity and convenience. The principles of how to improve communication reliability through the addition of bias resistors in communication lines are as follows.
2. Signal Attenuation in Communication Cables
The second factor affecting signal transmission is signal attenuation during transmission through the cable. A transmission cable can be viewed as an equivalent circuit composed of distributed capacitance, distributed inductance, and resistance, as shown in the figure.
The distributed capacitance C of the cable is primarily produced by the two parallel conductors of the twisted pair. The resistance of the conductors has a negligible effect on the signal and can be ignored. Signal loss mainly arises from the LC low-pass filter formed by the distributed capacitance and distributed inductance of the cable. The attenuation coefficient of the LAN standard two-core cable used in PROFIBUS (the standard cable selected by Siemens for DP bus) is shown in the table for different baud rates.
Attenuation Coefficient of the Cable
3. Pure Resistive Load in Communication Cables
The third factor affecting communication performance is the size of the pure resistive load (also known as DC load). This primarily refers to the terminal resistors, bias resistors, and RS-485 transceivers.
In discussing the EIA RS-485 specification, it was mentioned that RS-485 drivers can output a differential voltage of at least 1.5V when connected to 32 nodes with 150Ω termination resistors. The input resistance of one receiver is 12kΩ, and the entire network’s equivalent circuit is shown in the figure. Based on this, the load capacity of the RS-485 driver is calculated as follows:
RL=32 input resistors in parallel with 2 termination resistors = ( (12000/32)×(150/2) )/(12000/32)+(150/2) )≈51.7Ω
Currently, commonly used RS-485 drivers include MAX485, DS3695, MAX1488/1489, and SN75176A/D used by Holley Technology, among which some RS-485 drivers can achieve a load capacity of 20Ω. Not considering other factors, the maximum number of nodes that a driver can support will far exceed 32.
At higher communication baud rates, bias resistors are essential on the line. The connection method for bias resistors is shown in the figure. Their function is to pull the voltage level on the bus away from 0 volts when the line is in an idle state (no data). This way, even if small reflected signals or interference occur on the line, the data receivers connected to the bus will not malfunction due to these incoming signals.
Through the following example, we can calculate the size of the bias resistors:
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 caused by the reflected signal on the termination resistor Iref≤0.15/(120||120)=2.5mA. The hysteresis voltage value of common RS-485 transceivers (including SN75176) is 50mV, that is:
(Ibias-Iref)×(Rt1||Rt2)≥50mV
Thus, we can calculate that the bias current generated by the bias resistors Ibias≥3.33mA
+5V=Ibias(R上拉+R下拉+(Rt1||Rt2)) (2)
Using equation (2), we can calculate R上拉=R下拉=720Ω
In practical applications, there are two methods for adding bias resistors to the RS-485 bus:
(1) Distributing bias resistors evenly across each transceiver on the bus. This method adds bias resistors to each transceiver connected to the RS-485 bus, providing each transceiver with a bias voltage.
(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 worth noting that the addition of bias resistors increases the load on the bus.
7. The Relationship Between Load Capacity of RS-485 Bus and Length of Communication Cable
When designing the network configuration of the RS-485 bus (cable 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 previously, and now we will discuss noise margin. The noise margin of RS-485 bus receivers should be at least greater than 200mV. The previous discussion was conducted under the assumption of zero noise margin. In practical applications, to increase the bus’s resistance to interference, it is generally hoped that the system’s noise margin is better than what is stipulated in the EIA RS-485 standard. The relationship between the number of loads on the bus and the length of the communication cable 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 specified as 0.2V during standard measurements; Vdriver is the output voltage of the driver (related to the number of loads. For 5 to 35 loads, Vdriver=2.4V; if the number of loads is less than 5, Vdriver=2.5V; if greater than 35, Vdriver≤2.3V); Vloss is the signal loss during transmission in the bus (related to the specifications and length of the communication cable), which can be calculated using the attenuation coefficient provided in the table. The attenuation coefficient b=20lg(Vout/Vin) allows calculation of Vloss=Vin-Vout=0.6V (Note: The communication baud rate is 9.6kbps, and if the rate increases, Vloss will also increase); Vnoise is the noise margin, which is specified as 0.1V during standard measurements; Vbias is the bias voltage provided by the bias resistors (typical value is 0.4V).
Equation (3) is multiplied by 0.8 to prevent the communication cable from entering a saturated 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 length of the bus; the other parameters depend on the type of driver used. Therefore, once the RS-495 driver is selected, under a fixed communication baud rate, the number of loads on the bus is directly related to the maximum distance the signal can be transmitted. Specifically, within the allowable range of the bus, the more loads there are, the shorter the signal can be transmitted; the fewer loads, the longer 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, which, although small, cannot be ignored in analysis. The impact of distributed capacitance on the bus transmission performance mainly arises because the signal transmitted over the bus is a baseband signal, expressed only as ‘1’ and ‘0’. In special bytes, for example, 0x01, the signal ‘0’ allows sufficient time for the distributed capacitance to charge, while when the signal ‘1’ arrives, the charge in the distributed capacitance may not discharge in time, leading to (Vin+) – (Vin-) remaining greater than 200mV, causing the receiver to mistakenly interpret it as ‘0’, ultimately resulting in CRC check errors and incorrect transmission of the entire data frame. The specific process is illustrated in the figure.
Due to the distributed effects on the bus, data transmission errors occur, leading to reduced overall network performance. There are two methods to solve this issue:
(1) Reduce the data transmission baud rate;
(2) Use 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 may work in some cases but poses risks to the system. The RS-485 interface transmits signals differentially, requiring no reference point to detect the signal system; it only needs to detect the potential difference between the two lines. However, it is important to note that the transceiver will only function properly if 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 in the figure, when transmitter A sends data to receiver B, the output common-mode voltage of transmitter A is VOS, and due to the existence of a ground potential difference VGPD between the two systems, the common-mode voltage at the receiver’s input becomes VCM=VOS+VGPD. The RS-485 standard specifies that VOS≤3V, but VGPD can vary significantly (from several to several tens of volts), potentially accompanied by strong interference signals, causing the common-mode input VCM to exceed normal limits, resulting in interference currents on the signal lines that affect normal communication or damage the device.
Conclusion:
The serial port is a very versatile device interface, commonly used in instrument and equipment communication interfaces, often for remote data acquisition or remote control. The development of serial ports is relatively simple, making them one of the favorite interfaces among many engineers.
—THE END—
Source: E Vision
Statement: The materials in this article are collected from the internet, edited by Industrial Control Helper. The videos, images, and text used in the article are copyrighted by the original authors. If there are any copyright issues, please contact 15388920506 (same WeChat number) in a timely manner, and we will confirm the copyright immediately and pay remuneration according to national regulations!
Suggestions: The article may inevitably have omissions or errors, and we encourage everyone to freely express their opinions in the comment section; what you know may be what others want to understand! This way, we can help more people learn more! Thank you for your support!
Previous Hot ArticlesHOT
The editor takes you into Industrial Control Helper, let’s explore the little secrets of Industrial Control Helper…
From Sheet Metal to Car: Let’s Go to BYD to See How Cars Are Made!
How to Become an Excellent Industrial Robotics Engineer?
Step-by-Step Guide to Understanding Electrical Control Circuit Diagrams
Thank You for 2017, Let’s Accelerate in 2018!

Previous Hot ArticlesHOT
The editor takes you into Industrial Control Helper, let’s explore the little secrets of Industrial Control Helper…
From Sheet Metal to Car: Let’s Go to BYD to See How Cars Are Made!
How to Become an Excellent Industrial Robotics Engineer?
Step-by-Step Guide to Understanding Electrical Control Circuit Diagrams
Thank You for 2017, Let’s Accelerate in 2018!