Meter interfaces

RS-485 wiring, termination and bias

RS-485 wiring for Modbus RTU: cable, RJ45 and D-sub pinout, daisy-chain topology, stubs, termination, bias, A/B polarity, common conductor and length.

An RS-485 bus for Modbus RTU is one twisted-pair trunk, daisy-chained from device to device, with a terminator at each physical end and bias at one point. Most RS-485 faults come from breaking one of those rules: a star branch, a third terminator, bias at two devices or swapped conductors. This guide explains each rule and how to check the installed state.

This guide is part of the Modbus and RS-485 series. The RS-485 vs Modbus guide explains what each of the two names defines. This guide uses the Modbus serial line guide for the protocol-specific values. Always check them against the instructions for the exact devices.

Wire one daisy-chained trunk

Run one cable from the first device to the last, and connect each device on the way. Do not branch the bus into a star.

A two-wire RS-485 Modbus RTU trunk A ZMB Modbus interface at one end of a daisy-chained trunk with A, B and common conductors. Three meters connect along the trunk. A 120 ohm terminator sits at each end, and bias is applied at one point. ZMB interface Modbus RTU master bias here A B C 120 Ω Meter unit ID 1 Meter unit ID 2 Meter unit ID 3 trunk: A, B and common Bias at one point only 120 ohm at each end Daisy chain with short stubs, and a unique unit ID on each device
A two-wire RS-485 trunk: the master at one end, devices along the trunk on short stubs, a 120 Ω terminator at each end and bias at one point.

Each connection from the trunk to a device is a stub (the Modbus guide calls it a derivation). Keep stubs as short as the terminals allow. The Modbus serial guide sets a limit of 20 m for one stub, and 40 m divided by the number of stubs on a multi-port tap. A long branch to a distant meter is a second trunk, not a stub, and it needs a repeater.

Draw the bus as installed: the cable route, the length of each section, every device, every joint and every repeater. The master does not have to be at one end. A controller in a middle cabinet is in the middle of the trunk.

Terminate the two ends, and only the ends

A terminator stops the signal reflecting back from the end of the cable. It goes across the two signal conductors at each physical end of the trunk. The Modbus serial guide requires a termination near each end and allows no more than two on one pair. It also forbids a terminator on a stub.

The value should match the characteristic impedance of the cable, typically 120 Ω for RS-485 twisted pair. The Modbus serial guide gives two choices:

  • a 150 Ω, 0.5 W resistor; or
  • a 120 Ω, 0.25 W resistor in series with a 1 nF capacitor, which is the better choice when the line is biased.

Many meters and interfaces have a built-in terminator on a switch or a jumper. Count every enabled one. The terminators are in parallel, so each extra one lowers the load that the drivers see:

Terminators of 120 Ω enabledParallel resistance
2 (correct)60 Ω
340 Ω
430 Ω

The RS-485 termination and bias checker finds contradictions such as three terminators or bias at two points:

Bias at one point, if a device needs it

When no device transmits, nothing drives the bus. Noise can then look like data to a receiver. Bias (the Modbus guide calls it polarisation) holds the idle bus in a defined state: a pull-up resistor from D1 to 5 V and a pull-down from D0 to common. The Modbus serial guide sets these rules:

  • each device's documentation must say whether it needs bias and whether it provides it;
  • if any device needs bias, fit one pair of resistors of 450 to 650 Ω, at one point for the whole bus, usually at the master;
  • no other device may apply bias;
  • with bias fitted, the number of devices allowed on the bus is 4 fewer.

Many modern transceivers are "failsafe": they read an idle bus correctly without bias. Check the device documentation rather than adding bias by habit.

Why termination and bias interact

A receiver needs at least 200 mV between the two conductors to read a defined state. Bias makes that voltage through a divider with the terminators. With the idle bus, 5 V bias supply and 650 Ω resistors:

TerminatorsLoad between the conductorsIdle voltage
Two 150 Ω resistors75 Ω0.27 V
Two 120 Ω resistors60 Ω0.22 V
Two 120 Ω resistors with 1 nF capacitorsNo DC loadWell above 0.2 V

With plain 120 Ω terminators there is almost no margin above 200 mV, before any tolerance or noise. That is why the Modbus guide prefers the capacitor version on a biased bus: the capacitor blocks the DC bias current, and the resistor still terminates the fast signal edges. These figures ignore the receivers, the cable and component tolerances. Use them to understand the design, not to accept a bus.

Polarity, common and shield

A and B are not consistent. The Modbus serial guide names the conductors D0 and D1, and maps them to the RS-485 terminal names A/A' and B/B'. Manufacturers do not all follow this. Some label their terminals A/B the other way round, and others use D+/D−, 485+/485− or TX+/TX−. Use the signal definition in each device's manual, not the letter printed on the terminal. The Modbus guide's recommended colours are yellow for D1, brown for D0 and grey for common.

Connect the common. RS-485 is differential, but the receivers still need the voltages of the two conductors to stay inside their common-mode range. The Modbus guide includes a common conductor, connected to protective earth at one point only, usually at the master. Isolated interfaces change this. Follow the device documentation and the site earthing design.

Treat the shield separately. The shield, the signal common and protective earth have different jobs. Do not join them by habit.

Choose the cable

The Modbus serial guide sets these rules for the cable:

  • Use shielded cable, and connect the shield to protective earth at one end of each cable.
  • Use one balanced twisted pair for D0 and D1, and a third conductor for the common. A four-wire bus needs a second pair.
  • AWG 24 (about 0.2 mm²) is always thick enough for Modbus data over the full 1,000 m.
  • Prefer a characteristic impedance above 100 Ω, especially at 19,200 baud and faster.

A shielded 1.5-pair or 2-pair cable made for RS-485 meets all four rules. Its pair carries the data and the extra conductor or pair carries the common. Its impedance is usually 120 Ω, which matches the 120 Ω terminators above.

Category 5 and 6 cable

The Modbus serial guide allows Category 5 cable up to 600 m. Its characteristic impedance is 100 Ω, which is not the higher value the guide prefers at 19,200 baud and faster. Category 6 has the same nominal impedance. The guide does not mention it, so apply the same 600 m limit.

  • Put D0 and D1 on the two conductors of one twisted pair. Never use one conductor from each of two pairs: the pair loses its rejection of noise.
  • Use a conductor of another pair for the common.
  • Most network cable is unshielded (U/UTP). The guide requires a shield, so choose a screened type such as F/UTP.
  • With RJ45 plugs, follow the device's pin-out. The guide warns that a crossed cable on a two-wire bus can cause damage.

RS-485 pinout: RJ45, 9-pin and terminals

RS-485 itself defines no connector. Most meters and controllers use screw terminals. Where a Modbus device has an RJ45 or a 9-pin D-sub socket, the Modbus serial guide fixes the pin-out:

SignalRJ45 pin9-pin D-sub pinRequirementNote
D1 (B/B′)45RequiredThe more positive line when the bus is idle
D0 (A/A′)59Required
Common81RequiredSignal and supply common
VP72RecommendedPositive 5 V to 24 V DC supply
PMC33OptionalPort mode control

Many devices do not follow it. RJ45 ports on inverters, drives and PLCs often use other pins, and some D-sub ports use pins 3 and 8, the Profibus convention. Check each manual before you make up a cable, and never plug an RS-485 RJ45 lead into an Ethernet switch.

Two-wire or four-wire

Most meters and controllers use two-wire RS-485. One pair carries data in both directions, and only one device transmits at a time (half duplex). Four-wire RS-485 uses a separate pair for each direction (TXD and RXD), and it is optional in the Modbus serial guide. Modbus is still one request and one response at a time, so four wires gain little speed.

To connect two-wire devices to an existing four-wire system, the guide joins TXD0 to RXD0 to make D0, and TXD1 to RXD1 to make D1. A four-wire cable used as a two-wire bus in this way allows only half the trunk length. Where a device supports both modes, a switch or a setting selects one. Check that every device on the bus uses the same mode.

Cable length, devices and baud rate

LimitValue in the Modbus serial guide
Trunk length1,000 m at up to 9,600 baud on AWG 26 or thicker cable; half that for four-wire cable used as two-wire
Category 5 cableUp to 600 m
Stub length20 m maximum
Devices without a repeater32, or more with low unit-load devices documented for it; 4 fewer with bias
Addresses1 to 247

Higher baud rates, more devices and poorer cable shorten the length. The TI design guide explains how cable capacitance and signal rise time set the practical limit.

An electrically correct bus can still be too slow. The Modbus RTU timing calculator shows how long one polling cycle takes. A higher baud rate shortens the time on the wire, not the response time of each device, and one offline device can add a full timeout to every cycle.

Symptoms and their likely causes

SymptomCheck first
No device answersSerial settings, addresses, polarity of the master's own terminals
One device never answersIts address, its serial settings, its polarity, its stub
Answers with CRC errors, more at higher baud ratesTermination at the wrong places, long stubs, a star branch
Errors when the bus is idle, or on the first frameMissing or duplicated bias
Errors after a second master is connectedTwo masters on one bus; only one may poll
Correct replies, wrong valuesNot a wiring fault: check the register map and data type

Change one thing at a time, and record what you changed. The Modbus troubleshooting guide continues with protocol faults.

Keep a short bus with a ZMB

A ZMB Modbus interface sits next to the equipment that it reads and sends the registers over the Zigbee mesh to the Gateway. The RS-485 cable then runs a few metres inside one panel, not across the building, and the ZMB is the master at one end of that short trunk. The Modbus RS-485 commissioning guide covers the full commissioning sequence.

Common questions

Where do RS-485 termination resistors go?

Across the two signal conductors at each physical end of the trunk, and only there. Two terminators per bus is the rule; the Modbus serial guide does not allow more than two on one pair. If the master sits in the middle of the cable run, it must not be terminated.

What value should an RS-485 terminator be?

It should match the characteristic impedance of the cable, typically 120 Ω for RS-485 twisted pair. The Modbus serial guide allows 150 Ω (0.5 W), or 120 Ω (0.25 W) in series with a 1 nF capacitor when the line is biased.

What is RS-485 bias (polarisation)?

A pull-up resistor on one signal conductor and a pull-down on the other, fitted at one point, so that the receivers see a defined idle state when no device transmits. The Modbus serial guide specifies 450 to 650 Ω to 5 V and to common.

How long can an RS-485 cable be?

The Modbus serial guide gives 1,000 m for 9,600 baud on AWG 26 or thicker cable, with the length halved for four-wire cable used as two-wire. Higher baud rates, more devices and poorer cable reduce it.

How many devices can be on one RS-485 bus?

32 standard unit loads without a repeater. Devices with a lower unit load allow more, if their documentation says so. The Modbus serial guide reduces the number by 4 when the bus is biased.

What cable should I use for RS-485?

Shielded twisted-pair cable with one pair for the data and a third conductor for the common, such as a 1.5-pair or 2-pair cable made for RS-485. The Modbus serial guide says that AWG 24 is always thick enough for Modbus data and that an impedance above 100 Ω is preferred at 19,200 baud and faster. RS-485 cable is usually 120 Ω, which matches the terminators.

Can I use Cat5 or Cat6 cable for RS-485?

The Modbus serial guide allows Category 5 cable up to 600 m. Use one twisted pair for the two data conductors and a conductor from another pair for the common. Choose a screened type, because the guide requires a shield and most network cable is unshielded. Category 6 has the same 100 Ω nominal impedance.

Is RS-485 two-wire or four-wire?

Both exist. Most meters and controllers use two-wire RS-485, where one pair carries data in both directions. Four-wire RS-485 uses one pair for each direction and is optional in the Modbus serial guide. Every device on one bus must use the same mode, and both need a common conductor as well.

What is the RS-485 pinout?

RS-485 has no standard connector of its own; most devices use screw terminals. For Modbus devices with an RJ45 socket, the Modbus serial line guide puts D1 (B) on pin 4, D0 (A) on pin 5 and the common on pin 8, with a recommended 5 V to 24 V DC supply (VP) on pin 7 (pin 2 on the D-sub). On a 9-pin D-sub, D1, D0 and the common are on pins 5, 9 and 1. Many devices use other pins, so always check the manual.