Methods to Improve RS-485 Bus Reliability and Common Fault Handling

Click↑↑Technical Training, Follow and Pinto Subscribe for Free Long-term
190,000+Industrial Control Professionals Follow this WeChat Platform: Technical Sharing, Learning Exchange, Industrial Control Videos
Among various solutions for medium and long-distance communication between MCUs, RS-485 is widely used in fields such as factory automation, industrial control, community monitoring, and hydraulic automatic reporting due to its simple hardware design, convenient control, and low cost.
However, the RS-485 bus still has defects in anti-interference, adaptability, and communication efficiency. Improper handling of certain details can often lead to communication failures or even system paralysis. Therefore, improving the operational reliability of the RS-485 bus is crucial.
1. Hardware Design of RS-485 Interface Circuit
1. Bus Matching
There are two methods for bus matching. One is to add matching resistors. A differential port at both ends of the bus,VA and VB, should be connected with a 120Ωmatching resistor to reduce reflections and absorb noise caused by mismatches, effectively suppressing noise interference.However, matching resistors consume considerable current and are not suitable for systems with strict power consumption limits.
The other more energy-saving matching scheme is RC matching, which uses a capacitor C to cut off the DC component, saving most of the power. However, the value of capacitor C is a challenge and requires a trade-off between power consumption and matching quality. In addition to the above two methods, there is also a matching scheme using diodes. Although this scheme does not achieve true matching, it utilizes the clamping effect of diodes to quickly weaken reflected signals, improving signal quality and achieving significant energy savings.
2. Pull-up Resistors for RO and DI Terminals
Asynchronous communication sends data in bytes, and before each byte is sent, a low-level start bit is used to establish a handshake. To prevent interference signals from mistakenly triggering RO (Receiver Output) to produce negative transitions, causing the receiving MCU to enter the receiving state, it is recommended to connect a 10kΩpull-up resistor to RO.
3. Ensure RS-485 Chip is in Receive Input State on Power-up
It is recommended to control the transceiver control terminal TC using an MCU pin through an inverter, rather than directly controlling it with an MCU pin, to prevent interference to the bus when the MCU is powered on.
4. Bus Isolation
The RS-485 bus is a parallel two-wire interface. If one chip fails, it can pull the bus down. Therefore, isolation should be added between the two wires VA and VB and the bus. Typically, a 4-10ΩPTC resistor is connected in series between VA, VB, and the bus, along with a 5V TVS diode to eliminate line surge interference. If PTC resistors and TVS diodes are not available, ordinary resistors and voltage regulators can be used as substitutes.
5. Reasonable Selection of Chips
For external devices, to prevent strong electromagnetic (lightning) impacts, it is recommended to use TI’s 75LBC184 or similar lightning protection chips, and for applications requiring many nodes, the SIPEX SP485R can be selected.
2. RS-485 Network Configuration
1. Number of Network Nodes
The number of network nodes is related to the driving capability of the selected RS-485 chip and the input impedance of the receiver. For example, the 75LBC184 has a nominal maximum of 64 points, while the SP485R has a nominal maximum of 400 points. In practical use, due to cable length, wire diameter, network distribution, and transmission rate differences, the actual number of nodes often does not reach the theoretical value. For instance, if the 75LBC184 is used in an RS-485 network distributed over 500m, the number of nodes exceeding 50 or a rate greater than 9.6kb/s will significantly decrease reliability. It is generally recommended to select the number of nodes at 70% of the maximum value of the RS-485 chip, with the transmission rate chosen between 1200-9600b/s. For communication distances within 1km, 4800b/s is optimal considering communication efficiency, number of nodes, and communication distance. For distances exceeding 1km, consider increasing relay modules or reducing the rate to improve data transmission reliability.
2. Distance Between Nodes and Backbone
Theoretically, the distance between RS-485 nodes and the backbone (T-head, also known as lead wires) should be as short as possible. For T-heads less than 10m, nodes can use T-type connections without significant impact on network matching. However, for very short node distances (less than 1m, such as LED module combination screens), star connections should be used; T-type or string connections will not work properly. RS-485 is a half-duplex structured communication bus, mostly used in one-to-many communication systems, so the host (PC) should be placed at one end and not in the middle to form a T-type distribution of the backbone.
3. Improving RS-485 Communication Efficiency
RS-485 is typically used in one-to-many master-slave response communication systems, and its efficiency is significantly lower than that of full-duplex buses like RS-232. Therefore, selecting the appropriate communication protocol and control method is very important.
1. Bus Steady-State Control (Handshake Signal) Most users choose to set the transceiver control terminal TC to high before sending data for 1ms, allowing the bus to enter a stable sending state before sending data; once the data is sent, TC is set to low after a 1ms delay, ensuring reliable sending before transitioning to receiving state. The delay at the TC terminal has met the requirement of 4 machine cycles.
2. To ensure data transmission quality, check each byte while minimizing the characteristic word and checksum. The common data packet format consists of a header code, length code, address code, command code, data, checksum, and tail code, with each data packet length reaching 20-30 bytes. In RS-485 systems, such protocols are not very concise. It is recommended that users adopt the MODBUS protocol, which has been widely applied in international standards in industries such as water conservancy, hydrology, and electric power.
4. Power Supply and Grounding of RS-485 Interface Circuit
For a measurement and control network built with an MCU and RS-485 micro-system, it is preferable to adopt an independent power supply scheme for each micro-system. It is best not to use a single large power supply to power the micro-systems in parallel, and the power lines (AC and DC) should not share the same multi-core cable with the RS-485 signal lines. The RS-485 signal lines should use twisted pairs with a cross-sectional area of more than 0.75 square millimeters instead of flat wires. For each small-capacity DC power supply, using a linear power supply like LM7805 is more suitable than using a switching power supply.
Of course, attention should be paid to the protection of LM7805:
1. Connect a 220-1000μF electrolytic capacitor between the input terminal of LM7805 and ground;
2. Reverse connect a 1N4007 diode between the input and output terminals of LM7805;
3. Connect a 470-1000μF electrolytic capacitor and a 104pF ceramic capacitor between the output terminal of LM7805 and ground, and reverse connect a 1N4007 diode;
4. The input voltage is best at 8-10V, with a maximum allowable range of 6.5-24V. TI’s PT5100 can be used as a substitute for LM7805 to achieve ultra-wide voltage input from 9-38V.
5. Opto-isolation
In certain industrial control fields, due to very complex on-site situations, there exists a high common-mode voltage between various nodes. Although the RS-485 interface uses differential transmission, which has some ability to resist common-mode interference, when the common-mode voltage exceeds the limit receiving voltage of the RS-485 receiver (greater than +12V or less than -7V), the receiver can no longer function normally, and in severe cases, it may even burn out chips and equipment.
The solution to such problems is to isolate the system power supply and the RS-485 transceiver power supply through DC-DC isolation; and to isolate the signal using opto-isolators, completely eliminating the impact of common-mode voltage. The approaches to implement this solution can be divided into:
1. Constructing a circuit using opto-isolators, isolated DC-DC, and RS-485 chips;
2. Using secondary integrated chips like PS1480, MAX1480, etc.
6. Common Faults and Solutions of RS-485 Systems
RS-485 is a low-cost, easy-to-operate communication system, but it has weak stability and strong interdependence. Usually, a fault in one node can lead to the overall or partial paralysis of the system, and it is often difficult to diagnose. Therefore, some common maintenance methods for RS-485 are introduced to readers.
1. If the system is completely paralyzed, it is mostly due to the breakdown of the VA and VB of a certain node chip to the power supply, resulting in a differential voltage of zero between VA and VB, while the common-mode voltage to ground is greater than 3V. At this time, the common-mode voltage can be measured to troubleshoot; the larger the common-mode voltage, the closer it is to the fault point, and vice versa.
2. If several consecutive nodes on the bus cannot work normally, it is generally caused by a fault in one of the nodes. A fault in one node can cause 2-3 adjacent nodes (usually subsequent) to be unable to communicate. Therefore, disconnect each node from the bus one by one; if disconnecting a certain node restores normal operation on the bus, that node is faulty.
3. In a centrally powered RS-485 system, some nodes often do not function normally upon power-up, but this is not consistent each time. This is due to unreasonable design of the RS-485 transceiver control terminal TC, causing the node transceiver states to be chaotic during power-up, leading to bus blocking. An improvement method is to add power switches to each micro-system and power them up separately.
4. If the system is generally normal but occasionally experiences communication failures, it is usually due to unreasonable network construction leading to the system’s reliability being at a critical state. It is best to change the wiring or add relay modules. One emergency method is to replace the failed nodes with higher-performance chips.
5. If the TC terminal is in a long transmission state due to an MCU failure, causing the bus to be paralyzed, readers are reminded not to forget to check the TC terminal. Although RS-485 stipulates that a differential voltage greater than 200mV can work normally, actual measurements show that a well-functioning system’s differential voltage is generally around 1.2V (due to network distribution and rate differences, the differential voltage may range from 0.8-1.5V).
Source: Internet, copyright belongs to the original author, infringement will be deleted
Methods to Improve RS-485 Bus Reliability and Common Fault HandlingRare Electrical Engineering Resource Material
Long press to add friends to receive↓↓
Methods to Improve RS-485 Bus Reliability and Common Fault Handling
Methods to Improve RS-485 Bus Reliability and Common Fault Handling
Share good articles by clicking View
Methods to Improve RS-485 Bus Reliability and Common Fault Handling

ClickRead the original text for moreElectrical Engineering and PLC resources for free

Leave a Comment