View all lessons
Part 1
Fundamentals
Part 2
Modbus RTU
- Lesson 5RS485 explained: A, B, common and termination20 min
- Lesson 6Baud rate and parity: why 8E1 is the default16 min
- Lesson 7The Modbus RTU frame byte by byte, plus CRC18 min
- Lesson 8Multiple Modbus devices on one RS485 bus16 min
- Lesson 9Read your first Modbus device with mbpoll22 min
- Lesson 10Modbus RTU troubleshooting: symptom to cause20 min
Part 3
Modbus TCP
Part 4
Advanced
- Lesson 16Writing to a Modbus device without breaking it18 min
- Lesson 17Word order and floats: same bytes, other value22 min
- Lesson 18Calculate your poll interval and bus load18 min
- Lesson 19Modbus security: the protocol will not help16 min
- Lesson 20Modbus integration: PLC, Home Assistant, cloud20 min
- Lesson 21Modbus commissioning checklist and cheat sheet18 min
RS485 explained: A, B, common and termination
RS485 explained for technicians: why A and B are not reliable labels, why the third wire matters, and when termination and biasing are actually needed.
What this lesson covers
- Why A and B are not reliable labels, and what the third wire does
- Termination and biasing: where the resistors go and how many
- How many devices, how many metres and which topology is allowed
Read first: Learn Modbus: why a 1979 protocol still runs
RS485 carries one Modbus signal on two wires and looks only at the difference between them, so interference that hits both wires equally disappears before it reaches the receiver. Almost everything that goes wrong on a Modbus RTU bus, from swapped A and B to a missing common or a star layout, comes from ignoring that principle. After this lesson you can measure a bus instead of guessing at it.
Why two wires and not one?
A receiver on an RS485 bus never asks how high one wire is. It asks how much higher D1 is than D0.
Put real numbers on that. A standard driver delivers at least 1.5 V differential across the loaded bus and the receiver decides at 200 mV, so there is 1.3 V of margin. Let a variable speed drive couple a spike into the cable: the conductors are twisted together, so the spike lifts both by almost the same amount and the difference barely moves.
The rule follows. A differential pair rejects whatever hits both wires equally, and only fails when something drives them apart. That is why an energy meter can share a tray with motor cabling and still read cleanly. For who asks and who answers on that pair, see the introduction to Modbus; the frames are covered in Modbus RTU explained.
Why A and B are not reliable labels
Because two manufacturers can print those letters on opposite terminals, and neither is wrong. The specification sidesteps the argument: it names the circuits D0, D1 and Common, and requires those names in device and cabling documentation.
The electrical direction is fixed even where the labels are not. At rest, with nobody transmitting, D1 sits positive with respect to D0. D1 is what other documents call B or D+, D0 is A or D-. Plenty of vendors label the line that idles high as A.
The third wire, and why it is not earth
A two-wire Modbus bus has three conductors. The specification says so in three separate places: a balanced pair for D0 and D1, plus a third wire for the Common. The name refers to the data pair, not the conductor count.
That third wire is a reference, not a safety earth. RS485 transceivers only work while the bus stays inside a common-mode window of -7 V to +12 V relative to their own ground. Tie every device to the same common and that window stays put. Leave it out and it drifts with the ground potential difference between two cabinets.
Such a bus runs for months, someone commissions a drive, and a meter starts dropping out at random. Nothing in the configuration changed, the reference did. For which conductor lands on which terminal, work from the RS485 wiring guide for Modbus.
When termination fixes something, and when it does not
Termination fixes reflections, and nothing else. Here is what that looks like on a meter.
Power the bus down and measure resistance between D0 and D1. Two 120 ohm resistors in parallel read about 60 ohm, which is a correctly terminated bus. Read about 40 ohm and there are three of them. Read kilohms and there is no termination at all.
A signal reflects wherever it meets an impedance discontinuity, so both physical ends of the trunk get a termination and nothing else does. The specification allows no more than two on one passive D0-D1 pair, and never on a derivation cable. Every extra resistor loads the driver that still owes the bus 1.5 V differential.
What biasing solves and what it costs
Fail-safe biasing solves a bus that nobody is driving. Between two transactions no driver is active, the pair floats, and a receiver reads noise as a start bit. The symptom is ghost frames and sporadic CRC errors while every wire is correct.
The fix is one pair of resistors that pulls the idle line to a defined state: a pull-up from D1 to 5 V and a pull-down from D0 to the common, each between 450 and 650 ohm. Fit them at exactly one place on the bus, normally at the client, and leave the other devices unbiased.
It is not free. A bus with line polarization carries four devices fewer than one without, and two devices that both bias internally shrink your margin instead of growing it.
It also works the other way round. Some devices ship with internal fail-safe biasing. Fit termination resistors there without strengthening that biasing and you pull the idle level down, which produces exactly the CRC errors you were trying to avoid. Read the datasheet before you terminate.
How many devices and how many metres?
Thirty-two devices without a repeater, and 1000 m at 9600 baud. Those two numbers carry the practical limits.
Server addresses run from 1 to 247, which sounds like 247 devices, but electrically a standard driver handles 32 unit loads and one standard receiver is one unit load. Transceivers with a fractional unit load go further, but only where the datasheet says so. Add line polarization and you give up four of those 32.
Length trades against speed. The specification names 1000 m at 9600 baud with AWG26 or thicker, and 600 m for Cat5. The practical rule is that length in metres times bit rate stays under 10 million: about 1000 m at 9600 baud, 500 m at 19200 and 250 m at 38400. The cable decides how close you get, which is the subject of choosing an RS485 cable for Modbus.
Which topology is allowed, and which is not
One line with two ends, and short derivations off it. That is the whole permitted set.
A trunk runs from the first device to the last, and devices connect directly (daisy chain) or through a short derivation cable. Derivations stay under 20 m, and a tap with several derivations limits each to 40 m divided by their number, so four off one tap means 10 m each. Slower buses tolerate longer stubs, so treat 20 m as a ceiling at 9600 and 19200 baud and work in single metres above that.
A star has no two ends, so its reflections cannot be terminated away. A ring has no ends at all. Both produce CRC errors that read like a cable fault.
Common mistakes
Putting termination everywhere. Fitting a resistor at every device feels thorough. Three 120 ohm resistors in parallel present 40 ohm, and the driver can no longer reach the 1.5 V differential it owes the bus. Two resistors, at the two physical ends, none anywhere else.
Leaving the common out because it works anyway. Without a shared reference the common-mode voltage can wander outside the -7 V to +12 V window, so the bus runs for months and then stops, usually right after a drive is added. Pull the third conductor.
Treating A and B as trustworthy labels. Two brands can print them the other way round, so if one node is the only one not answering, swap its two signal wires: ten seconds, no risk.
Running a star because the cable route suggests one. RS485 wants a line with short derivations. A star produces reflections that no termination removes, and the errors look like a bad cable.
Get hands-on
Measure the bus rather than experimenting on it. Every step below is non-destructive.
- 1
Stop the client
Pause polling so nothing is transmitting. Every reading below assumes an idle bus.
- 2
Measure D0 against D1
Meter on DC volts, black probe on D0, red on D1. Note the value and the sign. With correct biasing, D1 reads positive with respect to D0.
- 3
Swap the pair on one device and measure again
The sign flips. That is the picture you will recognise in the field, and it damages nothing.
- 4
Measure each line against the common
Measure D0 to common, then D1 to common. The signal sits symmetrically around the reference, which is what the third wire is for.
- 5
Power the bus down
Only with the bus dead is a resistance measurement meaningful and safe.
- 6
Measure the resistance between D0 and D1
Compare your reading with the table below and work out how many terminations sit on the bus.
one 120 ohm termination -> 120 ohm
two 120 ohm terminations -> 60 ohm
three 120 ohm terminations -> ____ ohm
No installation to hand. Build it on a bench with two resistors and a length of cable, or work the table out on paper.
Expected result: a sign that flips when you swap the wires, and a resistance that tells you how many terminations sit on the bus. The open row works out to 40 ohm. Measure that on a real installation and there is one resistor too many. What has to match on every device comes next, in baud rate, parity and timing.
Summary
- RS485 transmits the difference between D0 and D1, so interference that hits both wires equally cancels at the receiver.
- At rest D1 sits positive with respect to D0, so measure the direction instead of trusting the letters A and B.
- A two-wire Modbus bus needs three conductors, because the common keeps it inside the -7 V to +12 V common-mode window.
- Termination belongs at the two physical ends of the trunk and nowhere else: two 120 ohm resistors read 60 ohm, three read 40 ohm.
- Biasing sets the idle state of an undriven pair with 450 to 650 ohm resistors at one point, and costs four of your 32 devices.
Check yourself
Four questions about this lesson. Every answer comes with an explanation.
Question 1 of 4
Want to see how it works?
The ModbusCloud Gateway reads the devices from this course without you programming a single register.