Complete Guide to RS-485 System Design

Complete Guide to RS-485 System Design【Motor Drive | 5G RF | Signal Conditioning | Circuit Design | Power Supply Design | Circuit Layout | High-Speed Interfaces】Join the AI Robot group to access the above practical technical documents, and interact with industry peers👆👆👆The purpose of this application report is to introduce the key aspects of RS-485 system design, providing a comprehensive design guide for system designers unfamiliar with RS-485. Following the procedures discussed in this document and referring to the detailed application reports in the references section can help you complete a robust system design that meets RS-485 requirements in the shortest time possible.

The main features of RS-485:

Balanced interface

• Single 5V power supply for multipoint use

• Bus common-mode range from -7V to +12V

• Up to 32 unit loads

• Maximum data rate of 10Mbps (at a distance of 40 feet)

• Maximum cable length of 4000 feet (at a rate of 100kbps)

Network Topology

The RS-485 standard recommends using a daisy chain to connect its nodes, also known as a shared line or bus topology (see Figure 3-1). In this topology, the drivers, receivers, and transceivers used are connected to the backbone via short network stubs. The interface bus can be designed for full-duplex or half-duplex transmission (see Figure 3-2).

Complete Guide to RS-485 System Design

Figure 3-1. RS-485 Bus Structure

Full-duplex implementation requires two signal pairs (four wires), and a full-duplex transceiver that has separate bus access lines for the transmitter and receiver paths. Full-duplex mode allows nodes to send data on one pair while receiving data on another pair.

Complete Guide to RS-485 System Design

Figure 3-2. RS-485 Full-Duplex and Half-Duplex Bus Structures

In half-duplex mode, only one pair of signals is used, and it requires driving and receiving data at different times. Both implementations require control signals for direction (for example, driver/receiver enable signals) to control all nodes to ensure that only one driver is active on the bus at any time. Multiple drivers accessing the bus simultaneously can lead to bus contention, which must be avoided through software control at all times.

Signal Levels

Drivers compliant with the RS-485 standard can provide a differential output of at least 1.5V across a 54 Ω load, while receivers compliant with the standard can detect differential inputs as low as 200mV. Even in cases of severe signal degradation in cables and connectors, these two values still provide ample margin for high-reliability data transmission. This robustness is one of the main reasons why RS-485 is well-suited for long-distance networking in noisy environments.

Complete Guide to RS-485 System Design

RS-485 specifies the minimum bus signal levels

Cable Types

Transmitting differential signal pairs over twisted pairs is advantageous for RS-485 applications, as external interference sources couple equally to both signal lines in a common-mode manner, and this noise is filtered out by the differential receiver.

Industrial RS-485 cables are categorized into shielded, unshielded, twisted pairs, and unshielded twisted pairs, conforming to 22-24 AWG wire gauge with a characteristic impedance of 120 Ω. Figure 5-1 shows the cross-section of a four-wire pair cable, which is typically used for two full-duplex networks. Similar cables in two-pair and single-pair versions can be used for low-cost half-duplex system designs.

Complete Guide to RS-485 System Design

Figure 5-1. RS-485Communication Cable Example

In addition to network wiring, the RS-485 standard mandates that the printed circuit board layout and connectors must be consistent with the electrical characteristics of the network, which can be achieved by keeping the two signal lines on the printed circuit board as close and equal in length as possible.

Bus Termination and Stub Length

To avoid signal reflections, data transmission lines should always be terminated, and stubs should be as short as possible. Proper termination requires matching the termination resistance RT with the characteristic impedance Z0 of the transmission cable. The RS-485 standard recommends using cables with Z0 = 120Ω, so the cable trunk is typically terminated with a 120Ω resistor at each end (see Figure 6-1, lower part).

Complete Guide to RS-485 System Design

Figure 6-1. Correct RS-485 Termination

Applications in noisy environments often replace the 120Ω resistor with two 60Ω resistors, forming a low-pass filter to provide additional common-mode noise filtering capability (see the right half of Figure 6-1). It is essential to match the resistor values (preferably using 1% tolerance resistors), to ensure that the frequency roll-off of both filters is equal. A larger resistor tolerance (i.e., 20%) can lead to different cutoff frequencies for the filters, and common-mode noise can convert to differential noise, thus reducing the receiver’s immunity.

The electrical length of the stub (the distance between the transceiver and the cable trunk) should be less than 1/10 of the driver output rise time, and can be derived from the following formula:

Complete Guide to RS-485 System Design

Where:

L stub = maximum stub length (ft)

tr = driver (10/90) rise time (ns)

v = signal speed expressed in terms of c factor

c = speed of light (9.8 x 108 ft/s).

Table 6-1 provides the maximum stub lengths corresponding to the rise times of various drivers shown in Figure 5-1 (78% rate).

Table 6-1. Stub Length vs. Rise Time

Complete Guide to RS-485 System Design

Drivers with long rise times are well-suited for applications requiring long stub lengths and reduced EMI generated by devices.

Fail-Safe Protection

Fail-safe protection allows the receiver to output a defined state in the absence of an input signal.

There are three possible causes for loss of signal (LOS):

1. Open circuit: cable break or transceiver disconnected from the bus

2. Short circuit: differential pair wires touching each other due to insulation failure

3. Bus idle: occurs when all bus drivers are inactive.

Under the above conditions, when the input signal is zero, traditional receivers would output a random state, but modern transceivers include a bias circuit that can protect against open circuits, short circuits, and bus idle conditions, ensuring that even in the absence of a signal, the receiver can force an output to a defined state. The downside of these fail-safe designs is that the worst-case noise tolerance is only 10mV, so in noisy environments, external fail-safe protection circuits must be added to increase noise tolerance.

The external fail-safe protection circuit consists of a resistor divider, which can generate sufficient bus differential voltage to drive the receiver to produce a defined output state. To ensure sufficient noise tolerance, in addition to the 200mV receiver input threshold, VAB must also include the maximum measured differential noise, VAB = 200mV + Vnoise.

Complete Guide to RS-485 System Design

With a minimum bus voltage of 4.75V, (5V – 5%), VAB = 0.25V, and Z0 = 120Ω, RB is 528Ω. Inserting two 523Ω series resistors into RT establishes the fail-safe protection circuit shown in Figure 7-1.

Complete Guide to RS-485 System Design

Figure 7-1. External Idle Bus Fail-Safe Protection Bias Circuit

Bus Load

The output of the driver depends on the current it must provide to the load, so adding transceivers and fail-safe protection circuits to the bus increases the total load current required. To estimate the possible maximum number of bus loads, RS-485 specifies a unit load (UL) assumption, which represents approximately 12kΩ of load impedance. Compliant drivers must be able to drive up to 32 of these unit loads. Modern transceivers typically reduce the unit load, for example, to 1/8 UL, allowing for up to 256 transceivers to be connected to the bus. The fail-safe protection bias can contribute up to 20 units of bus load, thus reducing the maximum number of transceivers N to:

Complete Guide to RS-485 System Design

Thus, when using 1/8-UL transceivers, a maximum of 96 devices can be connected to the bus.

Data Rate vs. Bus Length

At a given data rate, the maximum bus length is limited by transmission line losses and signal jitter. When the jitter of the baud period is 10% or more, data reliability drops sharply, and Figure 9-1 shows the relationship curve between cable length and data rate for traditional RS-485 cables under 10% signal jitter.

Complete Guide to RS-485 System Design

Figure 9-1. Cable Length vs. Data Rate

A. The first part of the graph shows the high data rate region for short cable lengths. Here, transmission line losses can be neglected, and the data rate is primarily determined by the rise time of the driver. Although the standard recommends a data rate of 10Mbps, modern high-speed interface circuits can operate at data rates up to 40Mbps.

B. The second part shows the transition from short data lines to long data lines. Transmission line losses must be considered. Therefore, as cable length increases, the data rate must decrease. According to the rule of thumb, the product of line length [m] and data rate [bps] should be < 107. This rule is much more conservative than the performance of modern cables.

C. The third part shows the lower frequency range, where line resistance (rather than switching) limits cable length. Here, the cable resistance approaches the value of the termination resistance. This voltage divider leads to signal attenuation of -6dB. For 120Ω 22 AWG cable UTP, this situation occurs at approximately 1200m.

Minimum Node Spacing

The RS-485 bus is a distributed parameter circuit, whose electrical characteristics are primarily determined by the inductance and capacitance distributed along the physical medium (including interconnect cables and printed circuit board traces). Adding capacitance to the bus in the form of devices and their interconnections reduces the bus impedance, leading to impedance mismatches in the medium and load portions of the bus. When the input signal reaches these locations, part of the signal is reflected back to the signal source, causing distortion of the driver output signal.

To ensure that the first signal transmitted from the driver remains valid at the receiver input, the minimum load impedance Z’ > 0.4 x Z0 must be maintained at any point on the bus, which can be achieved by keeping the minimum distance d between bus nodes:Complete Guide to RS-485 System Design

Where CL is the lumped load capacitance, C is the medium capacitance per unit length (cable or PCB trace).

Complete Guide to RS-485 System Design

Figure 10-1. Minimum Node Spacing vs. Device and Medium Capacitance

The above equation shows the functional relationship between minimum device spacing and distributed medium and lumped load capacitance; the above figure graphically illustrates this relationship. The load capacitance comes from the bus circuit pins, connector contacts, printed circuit board traces, protection devices, and any other physical connections to the trunk. Therefore, the electrical distance from the bus to the transceiver (stub area) should be kept as short as possible.

The following describes the capacitance values of various components:

• The capacitance of a 5V transceiver is typically 7pF, while the capacitance of a 3V transceiver is about twice that, approximately 16pF. The capacitance of PCB traces varies depending on their structure, increasing by about 0.5~0.8pF per centimeter. The capacitance of connectors and suppressor devices can vary widely. The distributed capacitance of the medium ranges from 40pF/m (low-capacitance unshielded twisted pair cable) to 70pF/m (backplane).

Grounding and Isolation

When designing remote data links, designers must assume significant ground potential differences (GPD) exist. These voltages Vn will superimpose on the transmission line in the form of common-mode interference. Even if the total superimposed signal is within the common-mode range of the receiver input, relying on local grounding as a reliable current return path is also very risky (see Figure 11-1 a).

Complete Guide to RS-485 System Design

Figure 11-1. Design Traps to Note: a) Excessive Ground Potential Difference, b) Excessive Loop Current, c) Reduced Loop Current, but Large Loop Ground, Highly Sensitive to Induced Noise

Since remote nodes may draw power from different parts of the electrical device, modifications to such devices (i.e., during maintenance work) can cause the ground potential difference to exceed the common-mode range of the receiver input. Therefore, a data link that works fine today may stop functioning at some point in the future. It is also advisable not to directly connect the remote ground through the ground wire (see Figure 11-1 b), as large loop ground currents can drive common-mode noise onto the signal lines.

To connect the remote ground directly, the RS-485 standard recommends isolating the device ground from the local system ground by inserting resistors (see Figure 11-1 c). Although this method reduces loop currents, the presence of large loop grounds still makes the data link sensitive to noise generated somewhere along the loop. Therefore, up to now, a robust data link has not been established.

A robust RS-485 data link method that can tolerate thousands of volts of ground potential difference and is suitable for long-distance transmission is signal and power supply isolation (see Figure 11-2).

Complete Guide to RS-485 System DesignIn this case, power isolators (such as isolated DC/DC converters) and signal isolators (such as digital capacitive isolators) can prevent current from flowing between remote system grounds and avoid generating loop currents. While Figure 11-2 shows the detailed connection of two transceiver nodes, Figure 11-3 provides examples of multiple isolated transceivers. All transceivers except one are isolated from the bus. The non-isolated transceiver on the left provides a single ground reference for the entire bus.Complete Guide to RS-485 System Design

Leave a Comment