Chapter · RS-485 and Modbus
RS-485: the wire
Why a plain serial line fails on a long run, how two wires carry a difference, what common mode is, how many stations share one trunk, one driver at a time, and the two ends.
- 01Two layers, one long line4 minA plain serial line measures each bit against a ground that moves when the wire is long. RS-485 fixes the wire and Modbus fixes the message, two separate jobs that are easy to blame on each other.
- 02A difference makes the bit4 minAn RS-485 receiver reads the sign of A minus B and only when the difference is big enough, about 200 millivolts. Chip makers and the standard label the two wires oppositely, so a bus that stays silent often has A and B crossed, which is harmless to swap.
- 03Noise that moves together4 minA voltage that lands equally on both wires cancels in the receiver, but only while both inputs stay inside its window of minus 7 V to plus 12 V. Twisting makes the noise nearly equal on both wires, and a ground offset adds to it.
- 04One trunk, many taps5 minMany stations share one pair of wires by hanging on a single trunk through short taps. The limit is not how many boxes you screw on but how many unit loads their receivers add up to, and a station's number is an address set in the station, not a place on the cable.
- 05One driver at a time4 minTwo wires carry one talker at a time. RS-485 has no rule that says who that is, so Modbus supplies one, and each station's drive lever, the D E and R E pins, only connects its own output to the pair. The lever has to be released after the last bit has left, not before.
- 06The quiet bus and its two ends5 minA terminator of 120 ohm goes at each of the two ends of the trunk and nowhere else, to stop pulses bouncing back. And when no driver is on, the pair floats, and only bias gives an idle bus a level that a receiver can read.
Start at 01 and read down — the order is the order things get easier in. Or take the one with your part in it; every article stands on its own, and links back to whatever it needs.