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

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

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

Among the various solutions for medium to long-distance communication between MCUs, RS-485 is widely used in factory automation, industrial control, community monitoring, and water resources automatic reporting due to its simple hardware design, ease of control, and low cost.
However, RS-485 bus still has defects in anti-interference, adaptability, and communication efficiency. Improper handling of some details often leads 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. The differential ports at both ends of the bus,VA and VB, should have a 120Ω matching resistor across them to reduce reflections and absorb noise caused by mismatches, effectively suppressing noise interference.However, matching resistors consume a significant amount of current and are not suitable for systems with strict power consumption limits.
The other more power-efficient matching scheme is RC matching, which uses a capacitor C to block the DC component, saving most of the power, but selecting the value of capacitor C is a challenge, requiring a compromise between power consumption and matching quality. In addition to the above two methods, there is also a diode matching scheme. Although this scheme does not achieve true matching, it utilizes the clamping effect of diodes to quickly weaken the reflected signals, thus improving signal quality and achieving significant energy savings.
2. Pull-up Resistors on RO and DI Terminals
Asynchronous communication data is transmitted in bytes, and before each byte transmission, a low-level start bit is used for 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 externally to RO.
3. Ensure RS-485 Chip is in Receive Input State During Power-Up
It is recommended to use the MCU pin to control the transceiver control terminal TC through an inverter, rather than directly controlling it with the MCU pin, to prevent interference with the bus during MCU power-up.
4. Bus Isolation
RS-485 bus is a parallel two-wire interface. If one chip fails, it may cause the bus to be “pulled 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, and a 5V TVS diode is connected to the ground to eliminate line surge interference. If PTC resistors and TVS diodes are unavailable, ordinary resistors and voltage regulators can be used instead.
5. Reasonable Chip Selection
For external devices to prevent strong electromagnetic (lightning) impacts, it is recommended to use TI’s 75LBC184 and other anti-lightning chips, while for systems requiring many nodes, SIPEX’s SP485R can be selected.
2. RS-485 Network Configuration
1. Network Node Count
The number of network nodes is related to the drive capability of the selected RS-485 chip and the input impedance of the receiver. For example, the nominal maximum value of 75LBC184 is 64 points, while SP485R’s nominal maximum value is 400 points. In actual use, due to cable length, wire diameter, network distribution, and transmission rates, the actual number of nodes may not reach the theoretical value. For example, if 75LBC184 is used in an RS-485 network distributed within 500m, and the number of nodes exceeds 50 or the rate exceeds 9.6kb/s, the operational reliability significantly decreases. It is generally recommended to select the number of nodes at 70% of the RS-485 chip’s maximum value, with transmission rates chosen between 1200-9600b/s. For communication distances within 1km, considering communication efficiency, node count, and distance, 4800b/s is optimal. For distances exceeding 1km, methods such as adding relay modules or reducing the rate should be considered 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 wire) should be as short as possible. Nodes with T-heads shorter than 10m can use T-type connections without significant impact on network matching, but for very small node spacings (less than 1m, such as LED module combination screens), star-type connections should be used. Using T-type or bead-type connections may not function 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, 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 much lower than that of full-duplex buses like RS-232. Therefore, selecting appropriate communication protocols and control methods is very important.
1. Bus Steady-State Control (Handshake Signal) Most users choose to set the transceiver control terminal TC to high level 1ms before data transmission, allowing the bus to enter a stable sending state before sending data; after data transmission is complete, TC is set to low level after a delay of 1ms, ensuring reliable sending is completed before entering the receiving state. The delay of the TC terminal has met the requirements after 4 machine cycles.
2. To ensure data transmission quality, while verifying each byte, it is important to minimize the common data packet format consisting of the header code, length code, address code, command code, data, checksum, and tail code, with each data packet length reaching 20-30 bytes. Such protocols are not very concise in RS-485 systems. It is recommended that users adopt the MODBUS protocol, which has been widely used in international standards for equipment and systems in water resources, hydrology, electric power, and other industries.
4. Power Supply and Grounding of RS-485 Interface Circuit
For measurement and control networks built by MCU combined with RS-485 microsystems, it is preferable to adopt independent power supply schemes for each microsystem, and it is best not to use a large power supply to power multiple microsystems in parallel. Additionally, power lines (AC and DC) should not share the same multi-core cable with RS-485 signal lines. RS-485 signal lines should preferably use twisted pairs with a cross-sectional area of more than 0.75 square millimeters rather than flat lines. 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 and ground of LM7805;
2. Connect a 1N4007 diode in reverse between the input and output terminals of LM7805;
3. Connect a 470-1000μF electrolytic capacitor and a 104pF ceramic capacitor in parallel between the output terminal and ground of LM7805, and connect a 1N4007 diode in reverse;
4. The input voltage should be optimal at 8-10V, with a maximum allowable range of 6.5-24V. TI’s PT5100 can be used to replace LM7805 for ultra-wide voltage input from 9-38V.
5. Optical Isolation
In certain industrial control fields, due to complex field conditions, there is 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, i.e., greater than +12V or less than -7V, the receiver will no longer function properly, and in severe cases, the chip and equipment may be damaged.
The solution to this problem is to isolate the system power supply and the RS-485 transceiver power supply through DC-DC; signal isolation through optical isolators can completely eliminate the impact of common-mode voltage. The pathways to implement this solution can be divided into:
1. Using optocouplers, isolated DC-DC, and RS-485 chips to build the circuit;
2. Using secondary integrated chips such as PS1480, MAX1480, etc.
6. Common Faults and Solutions of RS-485 Systems
RS-485 is a low-cost, easy-to-operate communication system, but its stability is weak, and mutual dependence is strong. Usually, if one node fails, it may 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.
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. Using a multimeter to measure the differential voltage between VA and VB yields zero, while the common-mode voltage to ground is greater than 3V. At this point, the common-mode voltage size can be used for troubleshooting; the larger the common-mode voltage, the closer to the fault point, and vice versa;
2. If several nodes on the bus cannot function normally, it is generally caused by a fault in one of the nodes. A fault in one node may cause the adjacent 2-3 nodes (usually subsequent) to be unable to communicate. Therefore, disconnect each node from the bus one by one; if the bus resumes normal operation after disconnecting a certain node, it indicates that this node is faulty;
3. In RS-485 systems with centralized power supply, some nodes often do not function normally upon power-up, but it is not always the same each time. This is due to unreasonable design of the transceiver control terminal TC for RS-485, causing the node transceiver state to be chaotic upon power-up, leading to bus congestion. The improvement method is to install power switches on each microsystem and power them up separately;
4. If the system is generally normal but occasionally communication fails, it is usually due to unreasonable network construction leading to the system’s reliability being in a critical state. It is best to change the wiring or add relay modules. One emergency method is to replace the failed node with a chip of better performance.
5. If the TC terminal is in a long sending state due to MCU failure, it may pull the bus down completely. 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 typically has a differential voltage around 1.2V (due to differences in network distribution and rates, the differential voltage may range from 0.8-1.5V).
Source: Internet, copyright belongs to the original author, please delete if infringed

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

Share with friends, let’s gain knowledge together!

For more valuable content, please follow “Inverter Encyclopedia

Long press the QR code to follow the public account

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

Leave a Comment