As a balanced transport standard approved in the 1980s S, RS-485 seems to have become a never-ending interface standard in the industry. There are a lot of documents about it, but for System Engineers who seldom come into contact with interface design, such a massive amount of literature is too much for anyone.
This article is intended to discuss the main content of the RS-485 standard and provide an entry guide for designers who are new to it. Some additional application notes referenced at the end of the study can further help designers complete a reliable data transmission design in the shortest possible time.
Use of RS-485 Standard
The RS-485 only defines the electrical properties of the drive and receiver used to balance the multi-point transmission line, so many higher-level standards reference it as the physical layer.
Network Topology
Bus nodes are connected by means of chrysanthemum links or bus topologies. (See Figure 1) that is to say, each node is connected to the main cable through a short wire header. This interface bus is usually designed for half-duplex transmission. That is to say, it only uses one pair of signal lines, and the driving and receiving data can only appear on the signal lines at different times.
Figure 1: RS-485 bus structure (left) with Half Duplex bus structure (right ).
This requires that you use a direction control signal (such as a drive/receiver enabling signal) to control the Protocol that the node operates to ensure that only one drive is active at any time, however, bus competition must be avoided when multiple drivers access the bus at the same time.
Signal level
The RS-485 driver must provide a differential output of a minimum of V on 54 loads, while the RS-485 receiver must be able to detect a differential input of a minimum of MV (see figure 2 ). These two values provide sufficient margin for reliable data transmission, even when the signal passes through a cable or connector for severe attenuation. The robustness is the main reason why RS-485 applies to the long-distance network in noise environments.
Figure 2: Minimum bus signal level defined by the RS-485.
Cable Type
Transmission of differential signals on twisted pair wires brings great benefits to RS-485 applications. This is because the noise produced by the external noise source is always coupled to the two signal lines in the same way.Common Mode NoiseThis can be suppressed at the input of the differential receiver.
Industrial RS-485 cables are plastic unshielded twisted pair wires with Characteristic Impedance of 120 and 22AWG. Figure 3 shows a cross section of a UTP cable for a half-duplex network.
Figure 3: Example of a RS-485 communication cable.
In order to maintain the electrical characteristics of the network, in addition to the connection of the network cable, printed circuit board wiring and pin distribution on the RS-485 equipment connector need to maintain an equal distance between the two signal lines and close enough.
Length of bus connection and wire head
The data transmission line should be connected to the end, and the line head should be as short as possible to avoid signal reflection on the transmission line. Good client connection requires that the terminal resistance RT be matched with the characteristic impedance Z0 of the transmission line cable. The RS-485 is recommended to use a 120 Z0 cable, so each end of the cable is usually used 120 resistance for end-to-end connection.
Figure 4: RS-485 end-to-end using common mode noise filter.
Applications in a noisy environment often use two RC low-pass filters to replace these 120 resistors to enhance the filtering of common-mode noise (see figure 4 ). It is worth noting that the resistance values of the two filters should be equal (precision resistance is preferred) to ensure that the two filters have the same rolling frequency. When the resistance tolerance is too high, the deviation of the filter rotation frequency occurs, and the common mode noise is converted to the differential mode noise, which reduces the anti-noise performance of the receiver.
The electrical length of the wire head (that is, the distance between the transceiver and the cable trunk line) should be less than 1/10 of the increase time of the driver input signal. Table 1 lists the maximum length of the cable head corresponding to the rising time of different driving signals in Figure 4.
Table 1: the length of the Line header and the length of the unterminated cable for different signal rise times.
Fault Insurance
Failsafe means that the receiver can ensure a certain output state without an input signal. There are three possible causes of signal loss: 1) Open Circuit: broken wires or the transceiver is disconnected from the bus; 2) Short Circuit: insulation failure leads to short-circuits between the two wires of the differential transmission signal. 3) idle Bus: No driver works on the bus.
The preceding conditions may cause the traditional receiver to output random states when the input signal is zero, therefore, in the modern transceiver design, a special bias circuit is designed for fault Insurance in the open, short circuit, and idle bus conditions. When the input signal is zero, the circuit keeps the output of the receiver in a certain state.
Although these fault-safe receivers claim to reduce the number of components, their 10mV worst-case noise margin makes the design of the external fault-safe circuit necessary.
An external fault Insurance circuit contains a resistance divider used to generate sufficient differential bus voltage and drive the output of the receiver to a definite state. To ensure sufficient noise margin for the circuit, The VAB must cover the maximum differential noise in addition to the 200mV receiver input threshold. Calculate the deviation resistance of the fault insurance offset resistance. The resistance of RB under the worst condition (that is, the lowest voltage and the maximum noise:
Among them, VAB = 200mV + VNoise. When the minimum bus voltage is 4.75 V, VAB = 0.25V and Zo = 120, the calculation result of RB is 528. Concatenate two 523 Resistors on RT (see Figure 5 on the left) to create a fault-safe circuit at one end of the bus.
Figure 5: Insurance bias for idle external faults of the bus.
Because the drive relies on current output, a load must be provided for the output current. Adding a transceiver and a fault-safe circuit to the bus also increases the total load current required. To estimate the maximum number of loads allowed by the bus, the RS-485 defines a hypothetical unit load (UL) with a UL representing a load impedance of about 12 k. A compliant drive must be able to drive 32 such units of load. Today's transceiver is often used to reduce the unit load, such as 1/8UL, so the number of transceiver connections allowed on the bus is up to 256.
Because the fault-insurance bias circuit occupies up to 20 ul of the bus load, the maximum number of receivers allowed on the bus is reduced. Therefore, up to 96 devices can be connected on the bus when a 1/8 transceiver is used. That is
.
Relationship between data rate and Bus length
The maximum Bus length is limited by the signal jitter between Transmission Line Loss and a certain data rate. When the jitter reaches 10% or more of the Potter cycle, the data reliability decreases sharply. Figure 6 shows the cable length corresponding to different data rate characteristics of the traditional RS-485 driver with 10% signal jitter.
Figure 6: cable length at different data rates.
In figure 6, the first part represents the data rate range of the line length restricted by the loss of the main non-resistance (that is, resistance) cables. In section 2nd, the electrical resistance loss of the cable increases with the frequency, so the allowable cable length decreases as the frequency increases. The empirical code tells us that the line length (in inches) multiplied by the data rate (in bps) should be less than 3107. When the cable length is short, the cable loss can be ignored. In this case, the maximum data rate is limited to the rising time of the drive signal (part 1 ).
Minimum node spacing
Increasing the capacity of the bus reduces the bus impedance and causes the impedance mismatch between the transmission medium and the load part of the bus. When the input signal reaches these mismatch points, some of them are reflected back to the signal source, which leads to distortion of the drive output signal.
To ensure that the signal sent from any output driver on the bus reaches the valid input level when it reaches the receiver during the first signal conversion, only the minimum spacing between bus nodes is required, computation is as follows:
Among them, CL is the total load capacitance, and C is the capacitance of the transmission medium (cable or PCB cabling) unit length. The preceding figure shows the functional relationship between the minimum device spacing and the distributed media and the total load resistance. Figure 7 shows this relationship graphically.
Figure 7: Relationship between the minimum node spacing and the device and the transport medium capacity.
The load capacitance includes the capacitance of the Line Bus pin, the contact capacitance of the connector, the wiring capacitance of the printed circuit board, and the capacitance of the protection device. When the bus is connected to the transceiver (the wire head of the transceiver) the short electrical distance also includes the capacitance caused by any other physical connection connected to the trunk.
Grounding and isolation
The remote data connection usually has a large potential difference (GDP), and the difference to the output of the transmitter becomes a common mode noise. If this noise is too high, it may exceed the input common mode noise tolerance of the receiver, resulting in damage to the device. Therefore, it is not recommended that local grounding be used as a reliable path for current backflow (see Figure 8a ). We do not recommend that you directly use a ground wire to connect to a remote location (see Figure 8b) because this may lead to a large amount of local loop current, coupled to the data line to become a common mode noise. As recommended by the RS-485, the circuit current is reduced by inserting resistance on the grounding path by only half of the problem. The existence of a large grounding loop makes the data link very sensitive to noise generated elsewhere in the loop. Therefore, a reliable data link cannot be established in this way (see Figure 8c ).
Figure 8: design defects that need attention: a) The GPD is too high; B) the loop current is too large; c) the circuit current is reduced, but the ground loop is too large, and the circuit is still highly sensitive to induced noise.
The most reliable way to establish reliable long-distance data links is through insulation Isolation. When this method is used, the signal line and power line of the bus transceiver are isolated from the local signal and power supply.
Power isolator, such as an isolated DC/DC converter, and digital capacitive isolator, can prevent the current from flowing between the ground of the remote system, thus avoiding the creation of such a current loop.
Figure 9 shows the detailed connection of multiple isolated transceiver. Each transceiver, except one, is isolated from the bus. The only unisolated transceiver in the figure provides a single reference for the entire bus.
Figure 9: Multiple fieldbus transceiver locations are isolated from single reference.
Summary
Although not completely complete, the goal of this article is to cover all the major issues of RS-485 system design. Although there is a lot of technical literature on this topic, this article aims to provide a detailed design guide for new systems designers who are exposed to RS-485.
According to the methods discussed in this article, and reference some detailed application reports, can help designers in the shortest possible time to complete a reliable RS-485 standard system design.
Texas Instruments have a wide range of RS-485 transceiver products. Features of the device include low EMI, low power (1/8UL), high ESD Protection (from 16kV to 30kV), and a full set of fault insurance functions for open circuit, short circuit, and bus idle conditions. For long-range applications that require isolation, Texas Instrument's product line also extends to single-chip dual-isolating, three-isolating, and four-isolating one-way and two-way digital isolator (from DC to 150 Mbps ), and the isolated DC/DC converter (with 3 V to 5 V rectification output) to provide power at both ends of the isolation gate at the same time.
Author: Thomas Kugelstadt
Senior Application Engineer
TI