Selection of matching resistors in RS485 communication
The 485 bus is a commonly used differential signal transmission method, which boasts strong anti-interference capability, long transmission distance, and a large number of nodes. It is widely applied in fields such as communication and industrial automation. To ensure communication stability, devices typically utilize isolated RS-485 modules for signal isolation. However, during the actual networking of RS-485, situations may arise where communication cannot be established or errors occur. In such cases, it becomes necessary to add pull-up and pull-down resistors to both line A and line B. This article will analyze and explain how to add these resistors and what resistance values to use.
I.Operating principle of 485 bus
According to the RS-485 standard, the 485 bus transmits differential signals through two wires (A and B). The receiver has a receiving sensitivity of ±200mV.
- When the voltage difference between A and B, VAB=UA-UB, is ≥+200mV, the 485 transceiver outputs a high level, with a logic of 1;
- When the voltage difference between A and B, VAB=UA-UB, is <-200mV, the 485 transceiver outputs a low level, with a logic of 0;
- When the voltage difference between A and B, -200mV≤VAB=UA-UB≤+200mV, the 485 transceiver may output either a high level or a low level, representing an uncertain state.

- Why do we need pull-up and pull-down resistors
When the 485 bus is idle, all 485 transceivers are in a receiving state, with none driving the bus. Since there is no signal source generating differential voltage on the bus, the voltages on the A and B signal lines are essentially the same at this time, i.e., VAB = UA - UB ≈ 0.
When the 485 bus is in an open-circuit state, a certain 485 transceiver is disconnected from the bus. Since the disconnected transceiver no longer affects the bus, the differential voltage between the remaining transceivers is also essentially zero.
When the output of the 485 transceiver is insufficient to generate a 200mV voltage difference between A and B, the 485 bus signal state can no longer reflect the transmitter state, and the receiver cannot correctly identify the signal. To prevent the 485 bus from entering an uncertain state, we can add pull-up and pull-down resistors to the A and B signal lines (usually with A connected to a pull-up resistor and B connected to a pull-down resistor) to ensure that the bus has a fixed differential voltage in an idle or open-circuit state, thereby avoiding communication errors or failures caused by uncertain states.

- How to choose pull-up and pull-down resistors
When selecting a pull-down or pull-up resistor, how should we determine the appropriate resistance value?
If the pull-up and pull-down resistors are too large, the transceiver's driving capability will be insufficient, and it will be unable to ensure that the differential voltage of the bus is greater than +200mV or less than -200mV in an idle or open-circuit state, which may lead to unstable communication or failure.
If the pull-up and pull-down resistors are too small, exceeding the driving capability and output voltage of the RS485 transceiver, it will also lead to communication failure.

Assuming there are n 485 nodes, including m pull-up and pull-down resistors. The resistance of the pull-up and pull-down resistors is R (usually the pull-up resistor Ru and the pull-down resistor Rd use the same value). The input resistance of the transceiver is Rin, and there are 2 terminal resistors Rt at both ends of the bus. Then we have:


Adding the left and right sides of the two equations above, we can obtain after rearrangement:

In this formula, we define the difference between terminal A and terminal B of the bus as a minimum of 200mV, so we can simplify this formula to:

With this formula, we can determine the values of the pull-up and pull-down resistors based on the actual number of nodes. However, the result calculated according to this formula is only an ideal value. In practical use, factors such as the input impedance, power consumption, driving capability, and bus length of the 485 transceiver need to be comprehensively considered to ensure the stability and reliability of communication.










