Network
Topologies
Network configuration isn’t defined
in the RS-422 or RS-485 specification. In most cases the
designer can use a configuration that best fits the physical
requirements of the system.
Two Wire or Four Wire
Systems
RS-422 systems require a dedicated pair
of wires for each signal, a transmit pair, a receive pair and
an additional pair for each handshake/control signal used (if
required). The tristate capabilities of RS-485 allow a single
pair of wires to share transmit and receive signals for
half-duplex communications. This “two wire” configuration
(note that an additional ground conductor should be used)
reduces cabling cost. RS-485 devices may be internally or
externally configured for two wire systems. Internally
configured RS-485 devices simply provide A and B connections
(sometimes labeled “-“ and “+”).
Devices configured for four wire communications bring out A
and B connections for both the transmit and the receive pairs.
The user can connect the transmit lines to the receive lines
to create a two wire configuration. The latter type device
provides the system designer with the most configuration
flexibility. Note that the signal ground line should also be
connected in the system. This connection is necessary to keep
the Vcm common mode voltage at the receiver within a safe
range. The interface circuit may operate without the signal
ground connection, but may sacrifice reliability and noise
immunity. Figures 2.1 and 2.2 illustrate connections of two
and four wire systems.
Figure 2.1 Typical RS-485 Four Wire Multidrop
Configuration
Figure 2.2 Typical RS-485 Two Wire Multidrop
Configuration
Termination
Termination is used to
match impedance of a node to the impedance of the transmission
line being used. When impedance are mismatched, the
transmitted signal is not completely absorbed by the load and
a portion is reflected back into the transmission line. If the
source, transmission line and load impedance are equal these
reflections are eliminated. There are disadvantages of
termination as well. Termination increases load on the
drivers, increases installation complexity, changes biasing
requirements and makes system modification more difficult.
The decision whether or not to use termination should be
based on the cable length and data rate used by the system. A
good rule of thumb is if the propagation delay of the data
line is much less than one bit width, termination is not
needed. This rule makes the assumption that reflections will
damp out in several trips up and down the data line. Since the
receiving UART will sample the data in the middle of the bit,
it is important that the signal level be solid at that point.
For example, in a system with 2000 feet of data line the
propagation delay can be calculated by multiplying the cable
length by the propagation velocity of the cable. This value,
typically 66 to 75% of the speed of light (c), is specified by
the cable manufacturer.
For our example, a round trip covers 4000 feet of cable.
Using a propagation velocity of 0.66 × c, one round trip is
completed in approximately 6.2 µs. If we assume the
reflections will damp out in three “round trips” up and down
the cable length, the signal will stabilize 18.6 µs after the
leading edge of a bit. At 9600 baud one bit is 104 µs wide.
Since the reflections are damped out much before the center of
the bit, termination is not required.
There are several methods of terminating data lines. The
method recommended by B&B is parallel termination. A
resistor is added in parallel with the receiver’s “A” and “B”
lines in order to match the data line characteristic impedance
specified by the cable manufacturer (120 ohms. is a common
value). This value describes the intrinsic impedance of the
transmission line and is not a function of the line length. A
terminating resistor of less than 90 ohms should not be used.
Termination resistors should be placed only at the extreme
ends of the data line, and no more than two terminations
should be placed in any system that does not use repeaters.
This type of termination clearly adds heavy DC loading to a
system and may overload port powered RS-232 to RS-485
converters. Another type of termination, AC coupled
termination, adds a small capacitor in series with the
termination resistor to eliminate the DC loading effect.
Although this method eliminates DC loading, capacitor
selection is highly dependent on the system properties. Figure 2.3 illustrates both
parallel and AC termination on an RS-485 two-wire node. In
four-wire systems, the termination is placed across the
receiver of the node.
Note 2: Refer to Chapter 7 for Information on National
Semiconductors Application Notes
Figure 2.3 Parallel and AC Termination
Biasing an RS-485
Network
When an RS-485 network is in an idle
state, all nodes are in listen (receive) mode. Under this
condition there are no active drivers on the network. All
drivers are tristated. Without anything driving the network,
the state of the line is unknown. If the voltage level at the
receiver's A and B inputs is less than ±200mV the logic level
at the output of the receivers will be the value of the last
bit received. In order to maintain the proper idle voltage
state, bias resistors must be applied to force the data lines
to the idle condition. Bias resistors are nothing more than a
pullup resistor on the data B line (typically to 5 volts) and
a pulldown resistor (to ground) on the data A line. Figure 2.4
illustrates the placement of bias resistors on a transceiver
in a two-wire configuration. Note that in an RS-485 four-wire
configuration, the bias resistors should be placed on the
receiver lines. The value of the bias resistors is dependent
on termination and number of nodes in the system. The goal is
to generate enough DC bias current in the network to maintain
a minimum of 200mV between the B and A data lines. Consider
the following two examples of bias resistor calculation.
Figure 2.4 - Transceiver with Bias Resistors
Example 1. 10 node, RS-485 network with
two 120 ohm termination resistors
Each RS-485 node
has a load impedance of 12K. 10 nodes in parallel give a load
of 1200 ohms. Additionally, the two 120 ohm termination
resistors result in another 60 ohm load, for a total load of
57 ohms. Clearly the termination resistors are responsible for
a majority of the loading. In order to maintain at least 200mV
between the B and A line, we need a bias current of 3.5 mA to
flow through the load. To create this bias from a 5V supply a
total series resistance of 1428 ohms or less is required.
Subtract the 57 ohms that is already a part of the load, and
we are left with 1371 ohms. Placing half of this value as a
pullup to 5V and half as a pulldown to ground gives a maximum
bias resistor value of 685 for each of the two biasing
resistors.
Example 2. 32 node, RS-485 network
without termination
Each RS-485 node has a load
impedance of 12Kohms 32 nodes in parallel give a total load of
375 ohms. In order to maintain at least 200 mV across 375 ohms
we need a current of 0.53 mA. To generate this current from a
5V supply requires a total resistance of 9375 maximum. Since
375 ohms of this total is in the receiver load, our bias
resistors must add to 9Kohm or less. Notice that very little
bias current is required in systems without termination.
Bias resistors can be placed anywhere in the network or can
be split among multiple nodes. The parallel combination of all
bias resistors in a system must be equal to or less than the
calculated biasing requirements. B&B Electronics uses
4.7Kohm bias resistors in all RS-485 products. This value is
adequate for most systems without termination. The system
designer should always calculate the biasing requirements of
the network. Symptoms of under biasing range from decreased
noise immunity to complete data failure. Over biasing has less
effect on a system, the primary result is increased load on
the drivers. Systems using port powered RS-232 to RS-485
converters can be sensitive to over biasing.
Extending the
Specification
Some systems require longer
distances or higher numbers of nodes than supported by RS-422
or RS-485. Repeaters are commonly used to overcome these
barriers. An RS-485 repeater such as B&B Electronics’
485OP can be placed in a system to divide the load into
multiple segments. Each “refreshed” signal is capable of
driving another 4000 feet of cable and an additional 31 RS-485
loads.
Another method of increasing the number of RS-485 nodes is
to use low load type RS-485 receivers. These receivers use a
higher input impedance to reduce the load on the RS-485
drivers to increase the total number of nodes. There are
currently half and quarter load integrated circuit receivers
available, extending the total allowable number of nodes to 64
and 128.