The short answer
Serial Communications
RS-232 is a point-to-point link between two devices over a few tens of feet. RS-422 and RS-485 are differential links over twisted pair that run thousands of feet and, in the case of RS-485, connect many devices on one bus. A serial link works when both ends agree on the electrical standard, the baud rate, the data bits, parity, and stop bits, and when the bus is wired as a chain, terminated at its ends, biased so it idles in a known state, and given a common reference. Most serial faults are one of those things missing.
Key points
- RS-232 is single-ended and short; RS-422 and RS-485 are differential and long, and 485 is the one that supports many devices on one pair.
- A 485 bus is a daisy chain with a 120 ohm terminator at each end, never a star and never terminated in the middle.
- Biasing resistors hold the bus in a defined idle state; without them receivers see noise as data between messages.
- Run the signal common between devices. Two wires is a myth that works until the ground potentials differ.
- Baud, data bits, parity, and stop bits must match exactly at every device on the link.
Three standards
| Standard | Signalling | Devices | Practical distance | Typical use |
|---|---|---|---|---|
| RS-232 | Single-ended, voltage referenced to ground | Two | Up to about 50 ft at moderate rates | A laptop to a controller, a controller to a modem or radio |
| RS-422 | Differential, separate transmit and receive pairs | One driver, up to ten receivers | Up to about 4,000 ft | Point-to-point over distance, some multidrop |
| RS-485 | Differential, one pair shared half duplex, or two pairs full duplex | Up to 32 unit loads, more with low-load transceivers | Up to about 4,000 ft at low baud rates | Modbus RTU multidrop, drives, meters, and instruments on one bus |
RS-232 sends a voltage on one wire referenced to a ground wire, and noise on the ground appears as signal, which is why it is short. RS-422 and RS-485 send the signal as the difference between two wires of a twisted pair; noise that couples into both wires equally cancels, which is why they are long. RS-485 lets many transceivers share the pair by tri-stating their drivers when they are not talking, which is why it is the bus for multidrop and why it needs care.
Wiring an RS-485 bus
- 1
Daisy chain.
The cable runs from device to device in one line. Each device is on the line, not at the end of a branch. A star, or a long stub to a device, reflects signals and corrupts them at higher rates.
- 2
Terminate the ends.
A 120 ohm resistor across the pair at each physical end of the chain, matching the cable impedance, and nowhere else. Many devices have a switch or a jumper for it; count the terminators on the bus and make sure there are exactly two.
- 3
Bias the bus.
When no driver is active the pair floats, and receivers interpret the noise as random data. Pull-up and pull-down resistors on one device, often enabled by a jumper on the master or the converter, hold the pair in the idle state. One set of bias resistors per bus, not one per device.
- 4
Run the common.
Differential signalling tolerates some ground potential difference between devices, but not an unlimited one. A third conductor connecting the signal commons keeps every transceiver within its common-mode range. Shield is not common; use a conductor.
- 5
Use the right cable.
Twisted pair, shielded, with a characteristic impedance around 120 ohms, rated for the environment. Instrument cable meant for 4 to 20 mA is often the wrong impedance and works only at short lengths.
- 6
Ground the shield at one end.
Usually the master or panel end. Grounded at both ends it carries ground current through the shield and couples noise into the pair it is protecting.
The settings
Every device on a serial link has to agree on the baud rate, the number of data bits, the parity, and the number of stop bits, written as, for example, 9600 8N1. One device at even parity on a bus of no-parity devices sees every frame as an error. The protocol on top, usually Modbus RTU, has its own requirements: Modbus RTU specifies 8 data bits and expects even parity by default, though most devices allow none with two stop bits. The settings on a bus are documented on the network drawing beside each device, and a new device is set to match them before it is connected.
Half duplex and turnaround
A two-wire RS-485 bus is half duplex: only one device drives at a time. The master sends, releases the bus, and the addressed slave replies after a short delay. Converters and radio modems that need to switch between transmitting and receiving add turnaround time, and a master with a response timeout shorter than the round trip through them declares a device dead that is answering fine. The Modbus RTU page covers the framing and timing; the device-times-out troubleshooting page covers the symptom.
Converters and isolation
A converter between RS-232 and RS-485, or between USB and RS-485, is a transceiver in a box, and it has the same needs: correct polarity, termination if it is at the end, and biasing if it is the master. Isolated converters break the ground path between the two sides, which protects the port from a ground potential difference and from the surge that a lightning strike puts on a long field cable. On any bus that leaves the building, an isolated port at the panel end is cheap insurance.
Frequently asked questions
- What is the difference between RS-422 and RS-485?
- Both are differential over twisted pair. RS-422 has one driver and up to ten receivers on separate transmit and receive pairs, so it is point-to-point or one-to-many. RS-485 allows many drivers on a shared pair, each tri-stating when silent, so it is a true multidrop bus.
- How many devices can I put on an RS-485 bus?
- The standard allows 32 unit loads. Modern transceivers present a fraction of a unit load, so 64, 128, or 256 devices are possible depending on the devices. Modbus RTU addressing allows 247. Cable length and baud rate limit it further in practice.
- Do I really need termination resistors?
- At 9600 baud on a short bus, a link often works without them. As length and speed rise, reflections from unterminated ends corrupt frames intermittently, which is the hardest kind of fault to find. Terminate the two ends and only the two ends, every time.
- Why does the bus work with two devices and fail when I add a third?
- Usually a third terminator, a wiring star created by the branch to the new device, a duplicate address, or a device with different settings. Occasionally the new device pulls the bus with its own bias resistors fighting the master’s.
Related topics
- Modbus RTUSerial Modbus over RS-485: function codes, register addressing, the off-by-one that catches everyone, and the physical layer details that decide whether a bus is stable.
- Modbus Device Intermittently OfflineA device that answers most of the time. Termination, bias, timing, and the physical layer details that produce a bus which almost works.
- Device Times OutA polled device that answers late or not at all: how to read the driver counters, tell a dead device from a slow one, and find the timeout setting, the bus loading, the radio latency, the duplicate address, or the device that is simply too busy to answer.
- Protocol GatewaysProtocol converters between a controller and devices that do not speak its language: what a gateway does, the common pairings in water and wastewater, the mapping table that is the whole configuration, the failure modes a gateway adds, and when to use a native interface instead.
- Ground Loops in InstrumentationTwo grounds at different potentials, one signal circuit between them, and a reading that will not sit still. How to find it and how to prevent it.
- Modbus TCPModbus over Ethernet: what the MBAP header changes, why the CRC disappears, how the unit identifier works, and what does not get easier just because it is on Ethernet.
Direct contact
Have a controls question?
Reach Eric Sullivan directly about anything on this site, a controls or automation topic, or one of his personal projects.