How to solve the abnormal application of RS-485 automatic transceiver circuit?

The RS-485 bus is a half-duplex communication bus, so the MCU is usually required to control the transceiver state of the RS-485 transceiver. In order to save the I/O resources of MCU, RS-485 automatic transceivers came into being, but this kind of transceivers will encounter some application problems more or less, how to solve these problems? This article will show you how it works.

The RS-485 bus is a half-duplex communication bus, so the MCU is usually required to control the transceiver state of the RS-485 transceiver. In order to save the I/O resources of MCU, RS-485 automatic transceivers came into being, but this kind of transceivers will encounter some application problems more or less, how to solve these problems? This article will show you how it works.

1. Brief introduction and application analysis of automatic transceiver circuit

1. Principle of automatic transceiver circuit

The common RS-485 automatic transceiver circuit is shown in Figure 1. The logic truth table of the circuit is shown in Table 1. When TXD is low, DE and RE are high, and the RS-485 transceiver is in the sending state. AB is at a low level, that is, sending a low-level signal to other nodes; when TXD changes from a low level to a high level, DE and RE become low, and the RS-485 transceiver is in the receiving state, at this time, AB leads The pin is in a high-impedance state, R3 pulls the B pin to GND, and R4 pulls the A pin to VCC. At this time, AB is at a high level, that is, a high level signal is sent to other nodes. Since the RS-485 transceiver is in the receiving state when the TXD is at a high level, it is only necessary to keep the TXD at a high level to receive data, that is, when the automatic transceiver circuit sends a high level, it is also in the receiving state.

Figure 1 Schematic diagram of RS-485 automatic transceiver

Table 1 Schematic diagram of automatic transceiver circuit

2. Common application problems and solutions of automatic transceiver circuits

1. The communication speed is slow

There are two main reasons why the RS-485 automatic sending and receiving communication speed is slow. First, if the automatic transceiver circuit shown in Figure 1 is used, the turn-off time of the triode is longer (mainly due to the longer storage time when the triode is turned off). The time is 10.2ns as shown in Figure 2, and the turn-off delay time is 1.14μs as shown in Figure 3. Therefore, if TXD sends a low level, the DE&RE pin will rise to a high level after a long time, and send a low level. The delay time is longer, the circuit shown in Figure 1 sends a low-level signal delay time as shown in Figure 4 is 1.468μs.

Figure 2 Turn on delay time

Figure 3 Turn-off delay time

Figure 4 Delay of sending low level signal

Second, the high level of the automatic transceiver circuit is driven by external pull-up and pull-down resistors, and the rising edge is slow. The waveform is shown in Figure 5. It can be seen that the rising edge of sending high level is slow, which limits the application of high-speed communication .

Figure 5 Send high rise time

2. There is a risk of abnormal communication during high baud rate communication

As shown in Figure 6, TXD goes high, DE&RE pin goes low, and the AB differential voltage rises slowly. Since the RS-485 transceiver is already in the receiving state at this time, the AB differential voltage rises to RS-485 Before the threshold level of the transceiver, the RXD pin will appear a low-level signal for a period of time. For example, for a transceiver with a threshold level of -200mV~-50mV, before the AB differential voltage rises to -50mV, the RS-485 transceiver is all It can output a low level, and the time of this low level signal is related to the rise time of the AB differential voltage and the receiving delay of the RS-485 transceiver. Because the serial port generally divides each bit into 16 parts, and detects the level signal of the middle three parts to determine the signal level of this bit, so if the low level signal is maintained to the signal detection of each bit, it will make the MCU A start bit is received, and thus erroneous data is received, so this problem also limits the application of high-speed communication and reduces the reliability of communication.

Figure 6TXD sends a high-level signal, and RXD receives a low-level signal

In response to such problems, ZHIYUAN Electronics’ wide-voltage input patch-type isolated RS-485 automatic transceiver module SC4450S (as shown in Figure 7) can be used. The phenomenon of level signal, the communication waveform is shown in Figure 8, which greatly improves the communication reliability.

Figure 7 SMD Isolated RS-485 Transceiver SC4450S

Figure 8 SC4450S communication waveform

3. The junction capacitance of the peripheral circuit affects the communication stability of the transceiver

In the high static or surge environment, it is necessary to add a peripheral protection circuit to protect the RS-485 transceiver. If the junction capacitance of the protection circuit added on the RS-485 bus is large, it will affect the quality of the communication waveform and even cause abnormal communication. The communication waveform using the high junction capacitance protection circuit is shown in Figure 9. The communication waveform is seriously distorted, which affects the communication quality.

Figure 9 Waveform affected by high junction capacitance

In response to such problems, ZHIYUAN SC4450S can be selected. According to the protection circuit diagram 10 provided in the data sheet, the protection capability of the RS-485 bus can be comprehensively improved. The EMC protection capability can reach ±8kV for electrostatic contact and total surge The mode is ±4kV, and the differential mode is ±2kV, which meets the needs of most industrial field applications.

Figure 10 Low Junction Capacitance Protection Circuit

Figure 11 Communication waveform after adding protection circuit

4. Weak driving ability and risk of long-distance communication

When the automatic transceiver circuit sends a high level, it will always be driven by the pull-up and pull-down resistors for a period of time or all of the time. Due to the limitation of the driving ability of the 485 transceiver itself, the pull-up and pull-down resistors cannot be selected too small. Generally, the parallel value of the pull-up and pull-down resistors of all nodes on the bus cannot be less than 375 ohms. Therefore, the automatic transceiver circuit has very limited driving ability to send high-level signals. After the terminal resistance is added to the RS-485 bus, the high-level AB differential voltage is obtained by dividing the voltage between the terminal resistance and the pull-up and pull-down resistance, so the amplitude of the high-level signal sent at this time is very low, so the automatic transceiver RS-485 is used. When using a transceiver, try not to use terminating resistors.

Due to the limited driving capability of the automatic transceiver circuit, the communication distance of its application is also limited. The communication waveforms using twisted pairs with lengths of 8m and 200m are shown in Figure 12 and Figure 13. When the communication distance is 8m, the communication waveform is good and the communication is normal. When the communication distance is 200m, the communication can no longer be normal. Therefore, when the communication distance is long, a pull-down resistor and a terminal resistor can be added outside the automatic transceiver RS-485 transceiver to improve the communication waveform. The increased communication waveform is shown in Figure 14. The waveform is greatly improved, and it can be normal. Communication, but the amplitude of the signal sent high is still low.

Figure 12 Communication waveform through 8m twisted pair

Figure 13 Communication waveform through 200m twisted pair

Figure 14 Externally add 1k pull-up and pull-down resistors and add termination resistors at the beginning and end of the RS-485 bus

If there is a high requirement for communication distance, it is not recommended to use an automatic transceiver module. The isolated RS-485 transceiver RSM485ECHT or RSM3485ECHT of ZHIYUAN Electronics with transceiver control function can be selected, and the communication distance can reach 1200m. The communication speed is 500kbp, the communication distance is 1200m, and the communication waveform of 120Ω terminal resistance at the head and tail of the bus is shown in Figure 15. At this time, the amplitude of the signal sent by RSM485ECHT can reach 2.6V, which greatly improves the reliability of communication.

Figure 15. The communication distance is 1200m, the terminal resistance is added to the head and tail of the bus, and the RSM485ECHT sends the waveform

3. Summary

The automatic transceiver RS-485 transceiver can save the IO port of the MCU and reduce the workload of programming, but the conventional automatic transceiver circuit has problems such as slow communication speed, and the RXD will receive a low-level signal when sending a high-level signal. Therefore, if you need to use automatic transceiver, it is recommended to use the automatic transceiver isolation RS-485 transceiver SC4450S, which greatly improves the reliability of communication. With the low junction capacitance protection circuit recommended by SC4450S, it can withstand higher static electricity and surge levels and improve the product’s reliability. reliability. When the communication distance is long, it is recommended to use the reinforced isolation RS-485 transceiver RSM485ECHT/RSM3485ECHT, and the communication distance can reach 1200m.

Table 2 Description of recommended applications of products

The Links:   TPS650531RGER SKIIP82AHB15T1