Design Article

IMG1

The RS-485 Design Guide

Thomas Kugelstadt, Texas Instruments

4/26/2008 9:34 AM EDT

Ratified in the early 80's as a new balanced transmission standard, RS-485 has emerged as the industry's seemingly eternal interface workhorse. Much literature has been written on the subject since, which can be overwhelming to system engineers who rarely are confronted with interface design.

This article serves as an introductory guide to designers new to RS-485 by discussing the main aspects of the standard. Studying the additional application notes referenced at the end of this article can help a designer to accomplish a robust data transmission design in the shortest time possible.

Standard Purpose
RS-485 only defines the electrical characteristics of drivers and receivers used in balanced multipoint transmission lines. As an electrical-only standard, RS-485 is commonly referenced by higher level standards as their physical layer.

Network Topology
Bus nodes are networked in a daisy-chain, or bus topology (Figure 1). That is, each node connects to the main cable trunk via short stubs. The interface bus is usually designed for half-duplex transmission, meaning that only one signal pair is used, across which the driving and receiving of data must occur at different times.


Figure 1. RS-485 Daisy chain (left), and half-duplex bus structure (right).

This implementation requires the protocol controlled operation of all nodes via direction control signals, such as driver/receiver enabled signals, to ensure that only one driver is active on the bus at any time. Having more than one driver accessing the bus simultaneously leads to bus contention, which must be avoided at all times.

Signal Levels
RS-485 drivers must provide a differential output of a minimum of 1.5V across a 54 load, while RS-485 receivers must detect a differential input with a minimum of 200mV (Figure 2). These two values provide sufficient margin for a reliable data transmission, even under severe signal degradation across the cable and connectors. This robustness is the primary reason why RS-485 is good for long distance networking in noisy environments.


Figure 2. RS-485 specified minimum bus signal levels.

Cable Type
RS-485 Applications benefit from differential signaling over twisted pair cable. This is because noise from external sources couples equally into both signal lines as common-mode noise, which is rejected by the differential receiver input.

Industrial RS-485 cables are of the sheathed, unshielded, twisted pair type (UTP) with a characteristic impedance of 120 and 22 AWG. Figure 3 shows the cross section of a single pair, UTP cable for half-duplex networks.


Figure 3. Example of RS-485 communication cable.

Beyond network cabling, it is mandatory that the printed circuit board layouts and the connector pin assignments of RS-485 equipment keep both signal lines close and equidistant to another to maintain the network's electrical characteristics

Bus Termination and Stub Length
Data transmission lines should always be terminated and stubs should be as short as possible to avoid signal reflections on the line. Proper termination requires matching the terminating resistors, RT, to the characteristic impedance, Z0, of the transmission cable. Because RS-485 recommends cables with Z0 = 120, the cable trunk is commonly terminated with 120 resistors, one at each cable end (Figure 1 right).


Figure 4. RS-485 terminations with common-mode noise filters.

Applications in noisy environments often add common-mode noise filtering by replacing the 120 resistors with two R-C low-pass filters (Figure 4). It is important to match the resistor values (preferably with precision resistors) to ensure equal roll-off frequencies of both filters. Larger resistor tolerances cause the filter corner frequencies to differ and common-mode noise to be converted into differential noise, thus compromising the receiver's noise immunity.

The electrical length of a stub (the distance between a transceiver and cable trunk) should be shorter than 1/10 of the driver's output rise time, and is given through: (1)

where: LBus = maximum length of an unterminated cable (ft) tr = driver (10/90) rise time (ns) v = signal velocity of the cable as factor of c c = speed of light (9.8 x10^8 ft/s or 9.8E8 ft/s)

Table 1 lists the maximum stub lengths of the cable in Figure 4 for various driver rise times.


Table 1: Stub length and unterminated cable length versus rise time.

Failsafe
Failsafe operation is a receiver's ability to assume a determined output state in the absence of an input signal. Three possible causes can lead to the loss of signal (LOS): 1) open-circuit: caused by a wire break, or by disconnecting a transceiver from the bus 2) short-circuit: caused by an insulation fault connecting the wires of a differential pair to another, 3) idle-bus: occurring when none of the bus drivers is active

Because the conditions above can cause conventional receivers to assume random output states when the input signal is zero, modern transceiver designs include biasing circuits for open-circuit, short-circuit, and idle-bus failsafe, that drive the receiver output to a determined state, when the input signal is zero.

While these failsafe transceivers claim to reduce component count, their worst case noise margin of 10mV necessitates the design of external failsafe circuitry

An external failsafe circuit consists of a resistive voltage divider that generates sufficient differential bus voltage, to drive the receiver output into a determined state. To ensure sufficient noise margin, VAB must include the maximum differential noise in addition to the 200 mV receiver input threshold. The values for the failsafe bias resistors, RB, are then calculated for worst case conditions, that is maximum noise at minimum supply:

(2)


with: VAB = 200 mV + VNoise

For a minimum bus voltage of 4.75 V, (5V " 5%), VAB = 0.25 V, and Z0 = 120, RB yields 528. Inserting two 523 resistors in series to RT, (Figure 5, left), establishes a single failsafe circuit at one bus end.


Figure 5. External idle-bus failsafe biasing.

Editor's note
Problems with editing tools caused some equations and other elements to be removed from text, then further problems made it impossible to fix them in timely fashion. It is these problems, not errors in the author's original text, that prompted most of the criticism below. These errors have now been fixed. Bus Loading
Because a driver's output depends on the current, it must supply into a load. Adding transceivers and failsafe circuits to the bus increases the total load current required. To estimate the maximum number of bus loads possible, RS-485 specifies a hypothetical term of a unit load (UL), which represents a load impedance of approximately 12k. Standard compliant drivers must be able to drive 32 of these unit loads. Today's transceivers often provide reduced unit loading, such as 1/8 UL, thus allowing the connection of up to 256 transceivers on the bus.

Because failsafe biasing contributes up to 20 unit loads of bus loading, the maximum number of transceivers, N, is reduced to:


.

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

Data Rate versus Bus Length
The maximum bus length is limited by the transmission line losses and the signal jitter at a given data rate. Because data reliability sharply decreases for a jitter of 10 percent or more of the baud period, Figure 6 shows the cable length versus data rate characteristic of a conventional RS-485 driver for a 10 percent signal jitter.


Figure 6. Cable length versus data rate.

In Figure 6, Section 1 represents the range of low data rates where the line length is limited by the predominantly non-reactive (resistive) losses of the cable. In Section 2, the cable's reactive losses increase with frequency, thus making a reduction in cable length necessary. A rule of thumb states that the product of the line length [ft] times the data rate [bps] < 3107. At short lengths the cable losses are discarded and only the driver rise time limits the maximum data rate possible (Section 3).

Minimum Node Spacing
Adding bus capacitance in the form of devices and their interconnections lowers the bus impedance and causes impedance mismatches between the media and the loaded section of the bus. Input signals arriving at these mismatches are partially reflected back to the signal source, distorting the driver output signal.

Ensuring a valid receiver input voltage level during the first signal transition from an output driver anywhere on the bus requires a minimum distance between bus nodes, approximated through:

(4)


where CL is the lumped load capacitance and C, the media capacitance (cable or PCB trace) per unit length.


Figure 7. Minimum node spacing with device and media capacitance.

While Equation 4 presents the relationship for the minimum device spacing as a function of the distributed media and lumped-load capacitance, Figure 7 shows this relationship graphically.

Load capacitance includes contributions from the line circuit bus pins, connector contacts, printed-circuit board traces, protection devices, and any other physical connections to the trunk line as long as the distance from the bus to the transceiver (the stub) is electrically short.

Grounding & Isolation
Remote data links often possess large ground potential differences (GPDs), which add to the transmitter output as common-mode noise. If large enough, these voltages can exceed the receiver's input common-mode range and cause damage to the component. Therefore, relying on the local earth ground as a reliable path for the return current is not advised (Figure 8a).


Figure 8. Design pitfalls to be aware off: a) high GPD; b) high loop current; c) reduced loop current, yet highly sensitive to induced noise due to large ground loop.

Connecting remote grounds directly by ground wire also is not recommended (Figure 8b) as this might cause large ground-loop currents to flow, which again will couple into the data lines as common-mode noise.

Reducing loop currents by inserting resistors in the ground path, as suggested by RS-485, is only half the battle won. The existence of a large ground loop keeps the data link sensitive to noise generated somewhere else along the loop. Thus, a robust data link has not yet been established (Figure 8c).

The most reliable approach to a robust, long distance data-link is via galvanic isolation. In this case the signal and supply lines of a bus transceiver are isolated from its local signal and supply sources.

Supply isolators such as isolated DC/DC converters, and signal isolators such as digital, capacitive isolators, prevent current flow between remote system grounds and avoid the creation of current loops.

Figure 9 shows the detailed connection of multiple isolated transceivers. Here, all but one transceiver connects to the bus via isolation. The non-isolated transceiver on the left provides the single-ground reference for the entire bus.


Figure 9. Isolation of multiple fieldbus transceiver stations with single-ground reference .

Click here for full image

Conclusion
Without claiming to be complete, the objective of this paper is to cover the main aspects of an RS-485 system design. Despite the enormous amount of technical literature on the subject, this document's intent is to provide system designers new to RS-485 with design guidelines in a very comprehensive way.

Following the discussions presented in this paper and consulting the detailed application reports in the reference section will help with accomplishing a robust, RS-485 compliant system design in the shortest time possible.

An extensive product range of RS-485 transceivers is available from Texas Instruments. Device features include low EMI, low-power (1/8 UL), high ESD protection (from 16 kV up to 30 kV), and integrated failsafe functions for open-, short- and idle-bus conditions. For long distance applications requiring isolation, the product range extends to unidirectional and bidirectional, digital isolators in dual, triple and quad versions (from DC to 150 Mbps), and isolated DC/DC converters (with 3V and 5V regulated outputs), to provide the power supply across the isolation barrier.

References
Further information is available at www.TI.com/interface by entering the literature numbers below into the Keyword Search field, or following the links provided. Interface Circuits for TIA/EIA-485 (RS-485) (slla036c): http://focus.ti.com/general/docs/techdocsabstract.tsp?abstractName=slla036c

Device spacing on RS-485 buses (slyt241): http://focus.ti.com/lit/an/slyt241/slyt241.pdf

A statistical survey of common-mode noise (slyt153): http://focus.ti.com/lit/an/slyt153/slyt153.pdf Failsafe in RS-485 data buses (slyt080): http://focus.ti.com/lit/an/slyt080/slyt080.pdf

Operating RS-485 Transceivers at Fast Signaling Rates (slla173): http://focus.ti.com/general/docs/techdocsabstract.tsp?abstractName=slla173
The RS-485 Unit Load and Maximum Number of Bus Connections (slla166): http://focus.ti.com/general/docs/techdocsabstract.tsp?abstractName=slla166
422 and 485 Standards Overview and System Configurations (slla070c): http://focus.ti.com/general/docs/techdocsabstract.tsp?abstractName=slla070c
The ISO72x Family of High Speed Digital Isolators (slla198): http://focus.ti.com/general/docs/techdocsabstract.tsp?abstractName=slla198

About the Author
Thomas Kugelstadt is a Senior Applications Engineer at Texas Instruments where he is responsible for defining new, high-performance analog products and developing complete system solutions that detect and condition low-level analog signals in industrial systems. During his 19 years with TI, he has been assigned to various application positions in Europe, Asia and the U.S. Thomas is a Graduate Engineer from the Frankfurt University of Applied Science.


print

email

rss

Bookmark and Share

Joinpost comment




Please sign in to post comment

Navigate to related information

Most Popular

Product Parts Search

Enter part number or keyword
PartsSearch


FeedbackForm