Analysis of the design steps of RS-485 bus interface circuit[Copy link]
There are two ways to match the bus. One is to add matching resistors. A 120Ω matching resistor should be connected between the differential ports VA and VB at both ends of the bus to reduce the reflection and absorption noise caused by mismatching, effectively suppressing noise interference. However, the matching resistor consumes a large current and is not suitable for systems with strict power consumption restrictions. Another more power-saving matching solution is RC matching. Using a capacitor C to cut off the DC component can save most of the power, but the value of capacitor C is a difficult point, and a compromise needs to be made between power consumption and matching quality. In addition to the above two methods, there is also a matching solution using diodes. Although this solution does not achieve true matching, it uses the clamping effect of the diode to quickly weaken the reflected signal to improve the signal quality, and the energy saving effect is significant.
2. Configure pull-up resistors at the RO and DI ends. Asynchronous communication data is transmitted in bytes. Before each byte is transmitted, a low-level start bit is used to implement handshake. In order to prevent interference signals from falsely triggering RO (receiver output) to produce a negative jump, causing the receiving end MCU to enter the receiving state, it is recommended that RO be connected to an external 10kΩ pull-up resistor. 3. Ensure that the RS-485 chip is in the receiving input state when the system is powered on. For the transceiver control end TC, it is recommended to use the MCU pin to control it through an inverter, and it is not appropriate to use the MCU pin to control it directly to prevent interference with the bus when the MCU is powered on. 4. Bus isolation. The RS-485 bus is a parallel two-wire interface. Once a chip fails, the bus may be "pulled to death", so its two-wire port VA, VB and the bus should be isolated. Usually, a 4~10Ω PTC resistor is connected in series between VA, VB and the bus, and a 5V TVS diode is connected between the ground to eliminate line surge interference. If there is no PTC resistor and TVS diode, ordinary resistors and voltage regulators can be used instead. 5. Choose chips reasonably. For example, to prevent strong electromagnetic (lightning) shocks for external devices, it is recommended to use TI's 75LBC184 and other lightning protection chips. If the number of nodes is required to be large, SIPEX's SP485R can be selected.