Skip to content
TRRequest a quote

Modbus RTU RS-485 Line Design: Termination, Bias

RS-485 daisy-chain topology, termination at both ends, single-point bias, shield and poll time calculation: a field checklist for Modbus RTU.

Published: · Author: Mekatrio team

A significant share of “Modbus doesn’t work” complaints come from the line, not the software. Devices answer one by one on the bench, then timeouts start once they are installed in the panel. In this article we explain how to build a Modbus RTU line on RS-485, where each number comes from, and what has to be decided per project.

Topology: use a chain, not a star

The Modbus serial line specification describes a single main line (trunk). Devices connect to this line directly one after another (daisy chain); short branches are used if necessary. Both ends of the line are terminated.

  • A branch (derivation) must be at most 20 m. If you use a multi-port distributor, the limit for each branch is given as 40 m / n (n: number of ports).
  • No termination resistor is placed on a branch cable.
  • Star topology is not recommended. Long star arms cause signal reflections and make it unclear which end should be terminated.

The practical rule is simple: run one cable from panel to panel, and have each device tap off that cable. A cable that leaves the terminal block and goes to the device as a 5 m “pigtail” counts as a short branch; a 30 m run-off does not.

Termination: at both ends, at most two resistors per line

The termination resistor goes at the two physically farthest ends of the line. Fitting resistors to devices in the middle breaks the rule of at most two terminations per line and loads the line unnecessarily.

150 ohm or 120 ohm?

There is a common confusion here:

  • The Modbus specification gives a 150 ohm, 0.5 W resistor.
  • The common industrial cable for RS-485 has a characteristic impedance of 120 ohm, and the TI application note therefore finds 120 ohm practical at the ends. Many devices have a jumper or DIP switch for internal termination; confirm the value from the device datasheet.

The engineering answer: the termination resistor should be close to the characteristic impedance of the cable. 120 ohm on a 120 ohm cable; 150 ohm if the cable datasheet is close to 150 ohm. On short, low-speed lines both work; the difference appears on long lines or at high baud rates. If you are not sure, check the cable manufacturer’s impedance value.

If bias is to be applied, the specification mentions the combination of a 1 nF series capacitor with 120 ohm (0.25 W) as a “better choice”. In noisy environments, TI also shows a termination option made of two 60 ohm resistors and a 220 pF filter.

Bias: at a single point, usually on the master side

When no device is driving the line (idle), the A/B lines are undefined and noise can be read as false characters. In this case, bias holds the line at a defined level.

  • Bias is applied at a single point for the whole line; this is usually the master side. The D1 line is pulled up to 5 V and the D0 line is pulled down to common.
  • The resistor value is in the range of 450-650 ohm. 650 ohm allows more devices to be connected to the line.
  • Other devices must not apply bias. If a “bias on” jumper is left on every device, the resistors end up in parallel and the line is overloaded.
  • On a line with bias, the maximum allowed number of devices is reduced by 4.

A common mistake: the master module already has bias inside, and bias is also left on in the RS-485 converter in the panel. Two bias points corrupt the line at the signal level.

Cable and grounding

  • Use shielded twisted-pair cable. D0/D1 run through this pair; a third wire is needed for common. In a 4-wire system, a second pair is added.
  • Common (the signal common) joins all devices and is connected to protective earth at a single point for the line, usually on the master side.
  • The shield is grounded at one end. If you ground it at both ends, the ground potential difference creates current through the shield.
  • Wire cross-section: AWG 24 is enough for data; if you are approaching 1000 m, choose a thicker wire because of cable resistance. The specification says at most 600 m if Cat5 cable is used. TI cites 22-24 AWG, 120 ohm as industrial RS-485 cable.
  • Do not run parallel to power and VFD/motor cables in the same duct; use a separate route.

On lines where the ground potential difference may be large, connecting different buildings or different transformer groups, an isolated transceiver or an external isolator is required. Such choices are made per project.

Length and baud rate

The specification gives at most 1000 m for 9600 baud and AWG26 or thicker wire. As baud rate rises, distance falls; the exact limit has to be read from the cable length versus data rate graph in TI SLLA272D. At low speed the resistance of the cable sets the limit; at high speed it is reflections and signal distortion.

First choice in the field: if the line is long, 9600 or 19200 baud; if the line is short, go up to the highest speed the devices support. Verify the line before raising the baud rate.

32 devices and 247 addresses are not the same thing

  • Address space: slave addresses are 1-247, 0 is broadcast, and 248-255 are reserved. This is a logical limit.
  • Physical limit: without a repeater, 32 devices are always allowed on an RS-485 Modbus system. Depending on the unit load of the receivers and on bias, more may be possible; TI mentions up to 256 with 1/8 unit load receivers. This is safe only if all device datasheets confirm it.

So 247 addresses do not mean you can attach 247 devices to a single line. If the number exceeds 32, consider a repeater or a second line.

Parity and framing: 8E1 default, 8N2 alternative

An RTU character is 11 bits: 1 start, 8 data, 1 parity, 1 stop. In the specification:

  • The default is 8E1 (even parity). Even parity is mandatory to support.
  • If parity is not to be used (8N2), two stop bits are required; for compatibility, it is recommended that no-parity also be supported.

If the framing setting differs between the two sides, the result is usually a CRC error or a timeout. Baud rate, parity and stop bits must be the same on the master and all slaves.

Poll time calculation: approximate

Calculating the poll time up front prevents the question “why is it this slow with 20 devices”. The formula:

T = (request bytes + response bytes) x 11 / baud + 2 x t3.5 + t_slave + timeout margin

Example: reading 10 registers with function 03.

Item Value
Request 8 bytes
Response 5 + 2 x 10 = 25 bytes
Total 33 bytes x 11 bits = 363 bits
Data time at 9600 baud about 37.8 ms
t3.5 (at 9600) about 4 ms (two of them: about 8 ms)
Total per device about 50 ms (including slave processing time)
20 devices, sequential cycle time about 1 s
At 19200 baud about half

These values are approximate; the time the slave takes to prepare its response varies from device to device. Above 19200 baud the specification recommends fixed values: t1.5 = 750 us, t3.5 = 1.75 ms. Do not set the timeout too short; you also do not want one faulty slave to lengthen the whole cycle. Limit the number of retries for a device that does not respond.

Checklist

  • The line is a single trunk, devices in a chain; no star.
  • Branches at most 20 m, no termination on a branch.
  • Termination only at the two ends; value according to cable impedance (120 or 150 ohm).
  • Bias at a single point (450-650 ohm); bias off on the other devices.
  • Shielded twisted pair + common wire.
  • Shield grounded at one end, common grounded at one point.
  • Separate route from power and VFD cables.
  • Length suitable for the chosen baud rate (up to 1000 m at 9600).
  • Device count under 32, or unit load calculation done.
  • Each slave’s address is unique (1-247).
  • Same baud rate, parity and stop bits on all devices (8E1 or 8N2).
  • D0/D1 (A/B) labels checked against the device brand; swapped if necessary.
  • Poll time calculated, timeout set accordingly.

If problems come up, in this order

First parity/baud/address, then A/B direction, then termination and number of bias points, then shield and common. Looking at the idle level with an oscilloscope while the line is idle gives quick information about bias; a USB-RS485 converter and a Modbus analyzer show the frames directly.

If you would like support with line design and commissioning, see our Industrial automation page.

Sources: MODBUS over Serial Line Specification and Implementation Guide V1.02; TI SLLA272D.

Tags

Want to discuss this for your project?