RS-485 Problem Solver

You can avoid many pitfalls and save troubleshooting by paying attention to some fundamentals.
Avoiding Pitfalls

The best approach is preventive: Determine a device’s communications characteristics before system design is complete—and then ask the right questions during system design:
  1. Is this device configured for two-wire or four-wire systems?
  2. Is a signal ground connection available?
  3. Is the device isolated? Does it include any surge suppression devices?
  4. What value bias resistors, if any, are used in the device—and are they accessible for modification?
  5. Is the device terminated—and accessible for modification?
  6. What is the device’s response time (“turnaround delay”)?
  7. What is the programmable address range of the device?
  8. What baud rate or range of baud rates is supported?
Tristate Control Using RTS

When you use an RS-485 converter with RTS control, set the RTS high before data is sent. Also, set the RTS line low after the last data bit is sent.

When an RS-485 network is connected in a two-wire, multidrop, party-line mode, connect the receiver at each node to the line. Configure the receiver to get an echo of its own data transmission. This setup is desirable in some systems, but troublesome in others. So check the data sheet for your converter to determine how the receiver “enable” function is connected. Check the requirements of your application software to see if it supports RTS control. If in doubt, choose a converter with Send-Data control.
Using Send-Data Control
If Send-Data control is used, the converter automatically disables the transmit data line at a fixed interval after the last bit, typically one character length.
Interval length is important. If too short, you can miss parts of each character being sent. If longer than the turnaround delay of the responding devices, your system may try to switch the data line from transmit to receive before the node with the Send Data converter is ready to receive data. In the latter case, you will miss portions, even complete characters, in the response.
Is it a Two-Wire or Four-Wire System?

RS-485 systems can be either two-wire or four-wire systems. The two-wire configuration—with the additional ground conductor here—reduces cabling cost, but is restricted to half-duplex communications (cannot receive and transmit at the same time). The majority of RS-485 devices are two-wire configurations.

Devices configured for four-wire communications bring out A and B connections for both transmit and receive pairs. You can connect transmit lines to receive lines to create a two-wire configuration. The latter type device gives the most configuration flexibility.

Note: Four data wires, plus an additional signal ground wire are used in a “four-wire” connection. The signal ground line should also be connected in the system to keep the common-mode voltage, Vcm, at the receiver within a safe range. If you operate the interface circuit without signal ground connection, you sacrifice reliability and noise immunity.
To Terminate or Not?

Termination matches impedance of a node (transmitter/receiver) to the impedance of the transmission line (cable). When impedances are mismatched, the transmitted signal is not completely absorbed by the load and a portion reflects back into the line.
But termination increases load on the drivers, increases installation complexity, changes biasing requirements, and makes system modification more difficult.
Also, adding termination greatly increases power consumption and requires the network to be re-biased. Termination may not have any benefit when used at low data rates or on short runs. Termination is not recommended when using port-powered RS-232 to RS-485 converters.

If you use terminators, understand their pros and cons. You’ll need resistors of more than 90 . Typically, they’ll be placed only at the extreme ends of the data line. Place no more than two terminations in any system that does not use
repeaters. Always recalculate the bias resistors when you add termination to a system.
Biasing the Network

To maintain the proper idle-voltage state, you must apply bias resistors to force the data lines to the idle condition.
These bias resistors are pullup resistors on the data B line (typically to 5 V) and pulldown resistors (to ground) on the
data A line. In a four-wire configuration, place the bias resistors on the receiver lines.
The value of the bias resistors depends on termination and number of system nodes. Generate enough DC bias current to maintain at least 200 mV between data A and B lines.
You can place bias resistors anywhere in the network or split them among multiple nodes. However, the parallel combination of all bias resistors in a system must be equal to or less than the calculated biasing requirements.

Symptom of under-biasing (resistor value too high): decreased noise immunity to complete data failure. Over-biasing
(resistor value too low) has less effect: its primary result is increased load on the drivers. Port-powered RS-232-to-RS-485 converters can be sensitive to over-biasing.
Get the Right Cabling

Don’t overlook the signal ground conductor when ordering cable. An extra twisted pair must be specified to have enough conductors to run a signal ground. A two-wire system then requires two twisted pair; a four-wire system requires three twisted pair. Because the added cost of shielded cable is usually minimal, use it.

Transmission line losses consist of AC losses (skin effect), DC conductor loss, leakage, and AC losses in the dielectric. In high-quality cable, conductor and dielectric losses are approximately equal. Polyethylene cables offer much lower attenuation than PVC cables.

Surge Protection: Isolation
Unwanted energy, which may come from high-voltage cables running near the data cables, creates the potential for a
fault condition due to insulation failures or inadvertent contact by an installer.
This surge could contact any number of conductors in the data cable, presenting a differential surge. Although voltages and currents associated with this surge are much lower than those modeled by ANSI or IEC, they can be
steady-state on the data network.

To protect each device, reference each to only one ground, eliminating the path through the device for surge currents
searching for a return.
With an isolated port, the isolated circuitry floats to the level of the transient without disrupting data communications. As long as the circuitry’s floating level does not exceed the breakdown rating of the isolators (typically 1,000 V-2,500V), the port is protected.
Surge Protection: Shunting

Selected voltage rating is typically 6-8 V. Because these devices typically add capacitive load to the data lines, derate
the total line length; several hundred feet is usually adequate.
Install protective devices as close as possible to the port to be protected.

Also you must provide an extremely low impedance connection to the local earth ground of the unit being protected. This ground is crucial to proper operation. Use heavy gauge wire and keep it as short as possible. If cable length exceeds one meter, you must use copper strap or braided cable.
Be aware that, besides the high-frequency nature of transients, there can be an enormous amount of current present. For example, several thousand amps typically result from applications of the combination wave test in the ANSI and IEC specification.
Use 100 Ω resistors in series with the signal ground path to limit ground currents.
Special Considerations for Fault Conditions
Data systems potentially exposed to short circuits to power conductors require an added fuse-type device in addition to shunting type suppression. Choose a low fuse value—125 mA is typical—so the fuse will open before the shunt device is damaged.
Some Troubleshooting Considerations

Get a schematic of each serial port to assist in troubleshooting and repairs.
Ensure a 200 mV- 6 V range for attenuation on balanced-differential transmission lines.

Use a signal ground line to keep common-mode voltage within the -7 V to +12 V range.

Use a driver that disconnects from the transmission line when a particular node is not transmitting.
Specify isolated equipment wherever possible for reliability.

Add fuse-type devices to shunting protection to guard against short circuits.