Why RS-485 Is Not Just UART Over a Longer Cable
RS-485 is often discussed together with UART and Modbus. Manuals say “RS-485 serial port”, and many tools treat it like a longer serial port.
That is convenient, but it creates bad debugging habits. UART defines asynchronous byte framing. Modbus RTU defines master requests to slave registers. RS-485 defines an electrical layer for differential signaling, multi-drop buses, longer distance, and noisy environments.
They are different layers:
UART: byte framing and baud rate
Modbus RTU: request/response and CRC
RS-485: differential electrical layer, multi-drop bus, half-duplex link
RS-485 is not just UART over a longer cable. It brings field problems: cable, termination, biasing, grounding, direction control, and topology.
Differential Signaling Is for Noise Immunity
RS-485 uses a differential pair, often labeled A/B, D+/D-, or 485+/485-.
The receiver looks at the voltage difference, not one wire’s absolute voltage to ground:
receiver sees: V(A) - V(B)
This helps reject common-mode noise. Motors, relays, inverters, long cables, and ground potential differences may couple similar noise into both wires. Differential reception can cancel part of it.
That is why RS-485 fits long cables and industrial sites better than TTL UART.
But differential signaling is not magic. Cable quality, shielding, grounding, termination, topology, and common-mode range still decide stability.
Half-Duplex Makes Direction Control Real
Many RS-485 systems use two-wire half-duplex:
same pair
drive the bus while sending
release the bus while receiving
The transceiver needs direction control, often through DE/RE.
If direction switches too early:
- the last bytes may not finish
- the receiver sees CRC error or an incomplete frame
If direction switches too late:
- the local node keeps driving the bus
- the slave response begins while the bus is still held
- multiple responses may collide
RS-485 code is not only write(fd, buf, len). You need to understand UART FIFO, shift register empty, driver enable, and inter-frame timing.
Some USB-RS485 adapters control direction automatically, but automatic control still has latency and edge cases. For intermittent CRC errors, direction control is worth checking.
Termination Handles Reflections
An RS-485 cable is a transmission line. With long cables and fast edges, signals reflect at impedance discontinuities.
Termination matches the cable end impedance and reduces reflection. A common value is 120 ohms, depending on cable characteristic impedance.
The important point: termination belongs at the two physical ends of the bus, not every node.
If every node adds 120 ohms, the equivalent load becomes too heavy. If there is no termination, or termination is in the wrong place, long and fast links may show intermittent bit errors, CRC errors, and distance-dependent instability.
Short, slow, small systems may be forgiving. Once failures correlate with cable length, baud rate, or node count, inspect termination carefully.
Biasing Defines Idle State
On a half-duplex bus, there are times when no node drives the line. The bus can float.
Bias resistors, also called fail-safe biasing, give the idle bus a defined differential state so receivers do not interpret noise as random data.
Without suitable biasing:
- garbage bytes appear during idle
- Modbus RTU frame boundaries get disturbed
- errors appear when the bus is quiet
- adding one device changes behavior
Bias is usually provided at one suitable point, not randomly at every node. If many devices include internal biasing, the resulting load and idle level may become unpredictable.
Grounding and Isolation Still Matter
RS-485 is differential, but receivers still have a common-mode input range. If ground potential difference is too large, the signal may leave the allowed range.
Common engineering choices:
- provide a reference ground to keep common-mode voltage bounded
- use isolated RS-485 to break ground loops and high common-mode paths
“Two wires are enough” may work on a bench, but not always across long distance, separate power supplies, and harsh sites.
If communication correlates with motor start, relay switching, surge, enclosure grounding, or lightning events, the issue may be grounding, isolation, or surge protection, not Modbus or serial parameters.
A/B Labels Are Not Always Consistent
RS-485 A/B labeling is not always intuitive across vendors. Some use A/B, some D+/D-, some 485+/485-.
The direct field issue is reversed polarity.
Symptoms include:
- no response
- garbage bytes
- visible waveform but protocol decode fails
- adapter label and device manual seem opposite
Do not argue about naming too long. Confirm differential polarity, swap the pair for testing, inspect idle level and waveform.
Topology Is Not Arbitrary Star Wiring
RS-485 fits bus topology:
node -- node -- node -- node
Short stubs may work, but long stubs, star topology, and arbitrary branching create impedance discontinuities and reflections.
Common field problems:
- long trunk and long branches
- junction boxes forming stars
- termination not at physical ends
- shield grounded at many points causing current loops
- cable runs parallel to high-power wiring
These problems do not appear in protocol fields. They look like “short cable works, long cable fails”, “low baud works, high baud fails”, or “everything breaks when a motor starts”.
Relationship With Modbus RTU
Modbus RTU often runs over RS-485, but they are not the same thing.
RS-485 can carry private protocols, Modbus RTU, or other serial protocols. Modbus RTU can also run over other serial links.
Layered debugging:
CRC errors, garbage, intermittent frame loss: inspect RS-485/UART parameters and physical layer
exception code: request reached device, inspect Modbus function, address, permission, state
wrong value: inspect register address, byte/word order, scale factor
no response: inspect address, direction control, A/B polarity, baud rate, power, bus contention
Treating RS-485 faults as Modbus function-code faults wastes time.
Field Debugging Order
Use this order:
- Confirm serial parameters: baud, data bits, parity, stop bits.
- Confirm A/B polarity; swap for testing if needed.
- Confirm half-duplex direction control and release timing.
- Confirm termination only at physical ends.
- Confirm biasing and stable idle state.
- Confirm grounding or isolation and common-mode range.
- Confirm topology: trunk, stubs, star, termination positions.
- Confirm cable and interference: shielding, grounding, power lines, surge.
- Confirm protocol: address, CRC, timeout, retry, polling period.
Three Final Judgments
First, RS-485 is an electrical layer, not UART or Modbus itself.
Second, half-duplex direction control, termination, biasing, grounding, and topology are frequent field failure sources.
Third, RS-485 faults often appear as upper-layer timeouts, CRC errors, and random bytes. Separate layers before changing protocol code.
Further Reading
- UART: asynchronous byte framing, baud rate, and sampling
- Why Modbus Is Simple but Still Fails in the Field: application-layer debugging for Modbus RTU over RS-485