Selection of bias resistor and terminal resistor in RS-485 automatic transceiver circuit

Infineon / Mitsubishi / Fuji / Semikron / Eupec / IXYS

Selection of bias resistor and terminal resistor in RS-485 automatic transceiver circuit

Posted Date: 2024-01-24

Today I will continue to share a technical article from ZLG

The RS-485 automatic transceiver circuit has one less I/O pin in application than the circuit with control pin, and will be more popular when the main control resources are tight. So how does the automatic transceiver circuit realize the automatic transceiver function and what factors need to be considered when selecting the bias resistor and terminal resistor?

RS-485 automatic sending and receiving principle

The common RS-485 automatic transceiver circuit diagram is shown in Figure 1. The transceiver receiving enable pin RE and the transmitting enable pin DE are short-circuited to the collector of transistor Q1, the transmitting terminal DI and the transmitter set of transistor Q1 are grounded, and the MCU's TXD is connected to the base of transistor Q1. The following is the working process of the automatic sending and receiving circuit.

When the MCU sends 0 through TXD, the transistor Q1 is turned off and DE is enabled. Because DI is connected to ground, a low level is sent at this time;

When the MCU sends 1 through TXD, transistor Q1 is turned on and RE is enabled. At this time, the connection between the DI pin of the transceiver and the AB terminal is in a high-impedance state. Because of the existence of AB's pull-up and pull-down resistors, the bus logic state is is 1, the node enters receive mode and transmit high mode.

Figure 1 Simplified diagram of RS-485 automatic sending and receiving circuit

The role of bias resistors and termination resistors

The bias resistor of the RS-485 bus is mainly used to determine the logic state of A and B. Our RS-485 automatic transceiver products have internal pull-up and pull-down resistors. Users can adjust the logic state according to the actual application environment, such as logic 1 with low level amplitude, etc. For this reason, we choose to add a pull-up and pull-down resistor with a smaller resistance to improve the driving capability. This resistor is connected in parallel with the built-in pull-up and pull-down resistor of the A/B line inside the module.

The terminal resistor of the RS-485 bus is mainly used for impedance matching of the signal line, providing a discharge path for the parasitic capacitance energy of the communication cable, and improving the signal quality. The differential characteristic impedance of our commonly used RS-485 shielded twisted pair is 100Ω~150Ω. Due to the high input impedance of the RS-485 transceiver (the minimum input impedance of RSM485PHT is 1/4 unit load, which is 48kΩ), when the signal is transmitted to At the end of the bus, due to the instantaneous impedance transmission of the reception, the signal transmission is reflected. At the same time, if the communication distance is long, the parasitic capacitance of the cable is large, and the energy is discharged slowly. At this time, we need to use a terminal resistor to eliminate or reduce the impact of this situation on the communication signal.

Because the logic 1 on the bus side of the RS-485 self-transmitting and receiving circuit is provided by the bias resistor of AB, its driving capability is weaker than the push-pull method. Therefore, the terminal resistor value selected for the self-transmitting and receiving circuit is generally too large and will usually be smaller. Bias resistors to regulate bus voltage.

Ideal RS-485 bus levels

Normally, the logic level 1 between transmitting drivers A and B is between +2 and +6V, and the logic level 0 is between -2 and -6V. The receiver also has provisions relative to the transmitter. Normally, when the level between the receivers AB is greater than +200mV, the output logic level is 1, and when it is less than -200mV, the output logic level is 0, see Figure 2 below. The differential level of A and B should be at logic 1 during idle time.

Figure 2 RS-485 logic level diagram

Considering the line resistance and signal anti-interference ability, during communication, we generally keep the logic 1 level at the bus end as far away as possible from +200mV, and the logic 0 level as far away as possible from -200mV. The rising and falling edges of the data waveform are as steep as possible without overshooting or ringing in the waveform. Figure 3 below shows an ideal RS-485 communication waveform.

Figure 3 Ideal RS-485 communication waveform diagram

Selection of bias resistor

This article takes our company's self-transmitting product RSM485PHT as an example. This product has a built-in complete DC-DC circuit and signal isolation circuit, has strong immunity and high reliability, and has automatic sending and receiving functions. The A and B lines of this product have built-in 47kΩ pull-up and pull-down resistors, and the minimum input impedance of the transceiver is 48kΩ.

The hardware block diagram of this test is shown in Figure 4. When the communication rate is 500kbps, 6 communication nodes are hung on the bus, and the total length of the twisted pair is about 3m, the captured bus waveform is shown in Figure 5, logic 1 The differential voltage is approximately 1.60V.

Figure 4 RSM485PHT network communication block diagram

Figure 5 VAB waveform at 3m twisted pair, 500kbps

The figure below is the resistor voltage division equivalent diagram of this RSM485PHT test. When there are 6 nodes communicating on the bus, it is equivalent to 6 R upper, 6 R lower, and 6 R inner parallel connections. At this time, VAB is high level The calculated voltage value is VAB = (R inside/6)/(R up/6+R inside/6+R down/6)*VCC, take VCC=5.1V, V ~AB~ =1.72V. Taking into account the partial voltage of the line resistance, this calculated value of 1.72V is basically consistent with the measured waveform amplitude of 1.60V.

Figure 6 RSM485PHT resistor voltage division equivalent diagram

Because the logic 1 level amplitude at the bus end is only about 1.6V, the anti-interference ability of this amplitude is relatively weak and affects the further extension of the communication distance. Now we consider increasing the bus amplitude to 3.5 by adding an external bias resistor. Around V. According to the formula VAB=(R inner/6)/(R upper equivalent + R inner/6 + R lower equivalent)*VCC, it can be calculated that R upper equivalent = R upper equivalent ≈ 2.75kΩ, plus a pull-down resistor The value is approximately 4.1kΩ. Figure 7 shows the communication waveform of the bus when an external 3.5kΩ pull-up and pull-down resistor is connected (an external bias resistor increases the power consumption by about 5.1V/3.5k≈1.4mA, which is within the acceptable range), because the actual welding bias The resistance value of 3.5kΩ is less than 4.1kΩ, and the actual bus logic 1 amplitude is 3.92V, which is higher than the preset value of 3.5V.

Figure 7 Differential waveform diagram when adding a 3.5kΩ bias resistor

Access terminal resistance 120Ω*2

In the above environment where a 3.5kΩ pull-up and pull-down resistor is connected, a 120Ω terminal resistor is connected. At this time, the resistor voltage division is equivalent to ≈60Ω within R in Figure 6. Substitute each value into VAB = (equivalent within R) /(R upper equivalent + R inner equivalent + R lower equivalent)*VCC, the calculated voltage is about 60mV, and the test waveform is shown in Figure 8. At this time, the high level is within the threshold -200mV~+200mV, and the transceiver cannot recognize logic 1, causing communication errors.

Figure 8 Differential waveform diagram when connected to 120Ω terminal


When using our automatic transceiver module RSM485PHT or RSM485M, if the bus logic 1 level is low, the bus level can be adjusted by an external bias resistor. If the bias resistor value is too small, additional power consumption will be increased. If the resistor value is too large, the adjustment effect will be lost. will not be obvious. The bias resistor value can be calculated by calculating the equivalent resistance value based on the actual number of nodes, and then substituting it into the impedance dividing formula (VCC*R internal equivalent)/(R upper equivalent + R internal equivalent + R lower equivalent) = VAB to calculate , where VCC can be 5.1V, and VAB is generally 2.5V~4.0V.

The bus logic 1 level of the module RSM485PHT or RSM485M with automatic transceiver function is driven by the bias resistor of the AB line. Its capability is weaker than the push-pull drive, so generally we do not recommend users to add terminal resistors. If the communication rate is high, the communication distance is long, and the bus signal quality is very poor, it is necessary to add a terminal resistor to weaken the reflected signal or provide a path to discharge the parasitic capacitance energy. You can choose a resistor with a slightly larger resistance, and you can consider passing it on the AB line. Add a small value bias resistor and work together to adjust the bus level.

In general, when using automatic transceiver RS-485 for communication, you must ensure that the A/B line differential voltage will not be in the range of -200mV ~ +200mV; if the differential level amplitude of logic 1 or logic 0 is low, you can Adjust by adding a small external bias resistor; generally speaking, it is not recommended that users connect a terminal resistor. If they do, try to choose a larger resistance value and use it in conjunction with an external bias resistor.

Review Editor: Tang Zihong

#Selection #bias #resistor #terminal #resistor #RS485 #automatic #transceiver #circuit