Share this

How to improve the reliability of the 485 bus system

2026-04-06 06:58:32 · · #1
Introduction In recent years, with the increasing awareness of fire prevention and the continuous improvement of relevant laws and regulations, automatic fire alarm systems have developed rapidly and been widely used, becoming the most important means of preventing fires and protecting people's lives and property. This requires automatic fire alarm systems to have high reliability and stability. Currently, most domestic fire alarm systems use RS485 half-duplex asynchronous communication buses for networking to achieve communication between fire alarm controllers and between fire alarm controllers and fire display panels. However, in actual use, due to the large number of devices, long communication lines, and various interferences on site, the reliability and stability of communication are often low, resulting in the inability to guarantee the quality of the network system. In the network design of automatic fire alarm systems, through extensive experiments, the author found that if the circuit is designed simply in a conventional way when using the RS485 bus, the following two problems may exist in actual engineering: first, the transmission and reception of communication data are unreliable; second, in multi-machine communication mode, the failure of one node (such as a system crash) often causes the entire system's communication framework to collapse, and also makes troubleshooting difficult. To address the aforementioned issues, effective improvements were made to the hardware and software design of the RS-485 bus interface, significantly enhancing the reliability and stability of the networking system. 1. Design of the RS-485 Bus Interface Hardware Circuit As shown in Figure 1, the 89C51 microcontroller has a built-in asynchronous communication interface, connected to an external RS485 transceiver 75LBC184. Three optocouplers are used for electrical isolation between the 89C51's asynchronous communication port and the 75LBC184. 1.1 Design of the 75LBC184 DE Control Terminal Because the main unit and sub-units in a fire alarm control system are often far apart, the total length of the communication line often exceeds 1000 m, and the power-on or reset of the sub-units often does not occur at the same time. If the DE terminal potential of a certain 75LBC184 is 1 at this time, its RS485 bus output will be in a transmitting state, i.e., occupying the communication bus, thus preventing other sub-units from communicating with the main unit. This situation is particularly pronounced when a sub-unit malfunctions (such as crashing), causing the entire system's communication to collapse. Therefore, in circuit design, the DE terminal potential of 75LBC184 should be 0 when the system is powered on and reset. Since the 89C51 outputs a high level from its I/O port during reset, the electrical connection in Figure 1 effectively solves the problem of the extension unit "biting" the bus during reset. 1.2 Parameter Selection for Isolation Optocoupler Circuit In fire alarm systems, real-time monitoring and response to the situation on-site are required, therefore the baud rate of communication data is often quite high (the communication rate between the controller and the display panel in this system is 6250 bps). The bottleneck limiting the increase in communication baud rate is not the on-site wiring (unshielded twisted-pair cables are generally used in on-site construction), but rather the optocoupler circuit used for signal isolation by the microcontroller system. Here, TIL117 is used. In circuit design, high-speed optocouplers, such as 6N137 and 6N136 chips, can be considered; alternatively, the design of ordinary optocoupler circuit parameters can be optimized to ensure optimal operation. For example, if resistors R2 and R3 are chosen to be too large, the LED of the optocoupler will transition from cutoff to saturation more slowly; if they are chosen to be too small, the exit from saturation will be very slow. Therefore, the values ​​of these two resistors must be carefully selected. Different models of optocouplers and driving circuits result in slight differences in these resistor values, which should be carefully considered in circuit design and usually determined experimentally. 1.3 Design of the 485 Bus Output Circuit The design of the output circuit must fully consider various interferences on the line and the matching of the line's characteristic impedance. During signal transmission, electromagnetic interference and terminal reflections are generated, causing effective and ineffective signals to superimpose on the transmission line, which can severely disrupt communication. To solve this problem, some chip drivers are designed with a slope-limiting method to prevent the output signal edge from being too steep, thus avoiding excessive high-frequency components on the transmission line and effectively suppressing interference. When selecting a chip, it is best to choose an RS485 interface chip with this function. Meanwhile, RS485 interface chips are susceptible to damage from electrostatic discharge (ESD) during use, soldering, or equipment transportation. Furthermore, due to the complex engineering environment and the presence of various interference sources, especially in outdoor applications where transmission lines are installed, the interface chip and even the entire system are vulnerable to lightning strikes. Therefore, the transmission end of the 485 bus must be protected. Using anti-ESD or lightning-resistant chips in the circuit design can effectively prevent such losses. This system uses the 75LBC184, whose driver is designed with a limited slope output and is resistant to lightning strikes, withstanding up to 8 kV of ESD, demonstrating excellent performance in practical use. Considering special circumstances of the line (e.g., a short circuit in the 485 chip of a certain extension unit), to prevent communication of other extension units on the bus from being affected, two 20 Ω resistors, R10 and R11, are connected in series at the 485 signal output of the 75LBC184. This ensures that a hardware failure in this unit will not affect the communication of the entire bus. In the on-site installation of fire alarm products, twisted-pair cables are generally used as the communication carrier. Its characteristic impedance is approximately 120 Ω, so during line design, a 120 Ω matching resistor (R8 in Figure 1) should be connected at both the beginning and end of the RS485 network transmission line to reduce signal reflection. Due to the characteristics of the RS485 chip, the receiver's detection sensitivity is ±200 mV, i.e., differential input VA-VB ≥ +200 mV, output logic 1; VA-VB ≤ -200 mV, output logic 0; however, when the absolute value of the potential difference between terminals A and B is less than 200 mV, the output is uncertain. If all transmitters on the bus are disabled, the receiver outputs logic 0, which may be mistaken for the start of a communication frame, causing malfunction. The solution is to artificially make the potential at terminal A higher than that at terminals B. This way, the RXD level is uniquely high during periods when the RS485 bus is not transmitting (when the bus is floating), preventing the 89C51 microcontroller from being mistakenly interrupted and receiving garbled characters. This problem can be effectively solved by adding pull-up and pull-down resistors R7 and R9 to the A and B outputs of the 485 circuit. 2. RS-485 Bus Interface Software Design The software design of the RS-485 interface has a significant impact on the reliability of the system network. Since the 485 bus is an asynchronous half-duplex communication bus, the bus can only be in one state at any given time. Therefore, this method is generally suitable for master-to-slave communication. There must always be one device on the bus in master mode, inspecting other slaves. This necessitates the development of a reasonable communication protocol to coordinate the time-sharing of the bus. Here, a data packet communication method is used. Communication data is sent in frames and packets. Each packet consists of a preamble, length code, address code, command code, content, and checksum. The RS-485 communication software consists of: a preamble (the header for synchronizing each data packet), a length code (the total length of the packet), a command code (the control command from the host to the extension (or the extension responding to the host), an address code (the extension's local address), content (various information within the packet), and a checksum (a verification code, which can use parity checks, SUM checks, or CRC checks). When designing RS-485 communication software, special attention should be paid to the software programming of the RS-485 control terminal DE. To ensure reliable data transmission and reception, an appropriate delay should be added during RS-485 bus state switching before data transmission and reception. Specifically, in the data transmission state, the control terminal DE is first set to 1; after a delay of approximately 1 ms, valid data is sent. After a data packet is sent, another 1 ms delay is applied, and then the control terminal DE is cleared to 0. This processing of the control terminal DE ensures a stable working process during bus state switching. In conclusion, the RS-485 bus has advantages such as simple circuit design, convenient software design, and low cost, and is widely used in fire alarm systems. After improvements to the hardware and software interfaces, this system significantly enhances communication reliability and stability, meeting the practical needs of fire alarm systems. The improved 485 bus interface described in this paper has been successfully applied to hundreds of fire alarm systems without any communication failures.
Read next

CATDOLL 136CM Seina

Height: 136cm Weight: 23.3kg Shoulder Width: 31cm Bust/Waist/Hip: 60/54/68cm Oral Depth: 3-5cm Vaginal Depth: 3-15cm An...

Articles 2026-02-22