727 views|4 replies

50

Posts

0

Resources
The OP
 

"> [Good book reading - "Illustrated Handbook for Electronic Hardware Engineers"] - ④ RS485 communication failure case sharing " data-url="https://bbs.eeworld.com.cn/thread-1275305-1-1.html" id="copy_url" class="copy_url">[Copy link]

邀请:@maychang   @chunyang   @okhxyyo   参与回复

This post was last edited by zyb329321151 on 2024-3-24 16:27

RS485 communication failure case sharing <1>

In the chapter "RS485 Bus Discussion" I shared, the main discussion was on the RS485 bus definition, main characteristics, network topology, application circuits, and failure theory analysis. Here, we will share the actual failure cases of RS485. This article will focus on the following abnormal cases:

Case 1: The influence of RS485 pull-up resistance and pull-down resistance

Problem phenomenon : In a certain industrial application, the communication between the host of Factory A and Factory B on the RS485 bus is intermittent. Without human intervention, it can be automatically restored and repeated. The system topology is shown in Figure 1.

figure 1

Verification process : ① The actual measurement found that the data sent by the host of Factory B to the host of Factory A was abnormal, and the E6 of the frame header was lost. The abnormal phenomenon is shown in Figure 2; ② Possible causes of the problem: a. The software does not match the sending and receiving time; b. The RS485 bus hardware circuit driving ability is insufficient. ③ After the host of Factory B receives the data from Factory A, increase the delay and then reply. It is found that the abnormality still exists, so reason a is eliminated. ④ Comparing the hardware circuits of Factory A and Factory B, it is found that the pull-up resistor and pull-down resistor of the device of Factory B are not welded, and the driving ability is insufficient, resulting in communication failure.

figure 2

Cause : The communication data between Factory A and Factory B was abnormal, resulting in communication interruption. The equipment of Factory B did not have pull-up resistors and pull-down resistors soldered, and the equipment driving capability was insufficient, resulting in communication abnormality.

Solution : ①Add pull-up resistors and pull-down resistors to the equipment of Factory B to improve the communication driving capability; ②Reduce the resistance of pull-up resistors and pull-down resistors of the main equipment of Factory A to improve the driving capability of the main equipment of Factory A. Considering the actual feasibility of the scheme comprehensively, the final solution ② is selected

Question review :

①Why does RS485 need pull-up resistors and pull-down resistors to improve driving capability?

In the design of RS485 communication circuit, the voltage difference between 485A and 485B is required to be greater than 0.2V. In actual applications, the 485 communication distance reaches 1200m. The voltage difference between 485A and 485B will decrease with the increase of distance, and the waveform of the signal will be distorted, which will cause communication abnormality. Therefore, in order to improve the stability of 485 communication, pull-up resistors and pull-down resistors need to be added in actual product design.

②How to select RS485 pull-up and pull-down resistors?

The communication failure in the above case can be simplified into the topology diagram shown in Figure 3:

image 3

According to the RS485 communication protocol, the voltage difference between points 485A and 485B is required to be greater than 0.2V.

Then there is a formula:

In this case, R 1 = 10KΩ, R 2 = 10KΩ, R 3 = 10KΩ . Therefore,VA-VB=29.8mV

.

According to the MAX485 data sheet, the voltage difference between 485A and 485B is greater than 0.2V for high level 1, and less than -0.2V for 0. However, 29.8mV is between -0.2V and 0.2V, and it is difficult to judge the level, which leads to intermittent communication.

When the pull-up resistor and pull-down resistor of host A are changed to 1K,VA-VB=283mV

At this time, the voltage difference is greater than 0.2V and RS485 communication is stable.

Case 2: DC resistance of RS485 cable affects communication distance

Problem phenomenon : In an industrial application, the owner provides RS485 communication cables, and the manufacturer provides communication hosts and slaves. There are 16 slaves on site, and the communication distance reaches 1 km. The test found that the slaves at a long distance cannot communicate with the host. The closer the distance between the slave and the host, the more stable the communication. The farther the distance, the worse the communication effect. The host at a distance of 1000m has 100% failure in communication.

Verification process : ① Confirm that the topology, termination matching resistance, and wiring method of the on-site host and slave meet the design requirements; ② Disconnect all slaves and test them one by one. It was found that the near-end slave was normal, and the communication of the far-end slave failed; ③ Measure the 485A and 485B waveforms of each slave, and find that the waveform of the far-end slave is distorted and does not meet the 485 bus communication requirements. ④ Measure the impedance of the communication cable and find that its DC impedance far exceeds the requirements of the RS485 communication cable. Replace the new standard communication cable and the communication is successful.

Cause of the problem : The DC impedance of the communication cable is large, the signal received by the remote slave is distorted, and the voltage difference does not meet the RS485 communication bus design standard.

Solution : Replace with new communication cables that meet the standards.

Question review : Why does the impedance of the communication cable affect the communication quality of RS485?

The communication failure in the above case can be simplified into the topology diagram shown in Figure 4:

Figure 4

According to the RS485 communication electrical standard, when the host outputs a high level,VA-VB>1.5V

Then, the signal voltage difference received by the slave is the voltage difference across the 120Ω at the slave end. Therefore, there is a formula:

Ra and Rb are the cable impedances. Since twisted pair cables are used, Ra=Rb. Therefore, if the voltage difference at the receiving end is to be >0.2V, Ra=Rb<390Ω is required. Once the communication cable impedance is greater than 390Ω, RS485 communication will be abnormal, resulting in communication failure.

This post is from Circuit Observation Room

Latest reply

Very useful, thank you!   Details Published on 2024-4-7 11:26
 
 

6593

Posts

0

Resources
2
 

This part of RS485 communication failure case sharing is very useful for actual communication design

This post is from Circuit Observation Room
 
 
 

2

Posts

0

Resources
3
 
excellent
This post is from Circuit Observation Room
 
 
 

4

Posts

0

Resources
4
 

Very useful, thank you!

This post is from Circuit Observation Room

Comments

I hope this can help you  Details Published on 2024-4-7 18:53
 
 
 

50

Posts

0

Resources
5
 
yypzgmmm2008 posted on 2024-4-7 11:26 Very useful, thank you!

I hope this can help you


This post is from Circuit Observation Room
 
 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号