Modbus Transceiver Circuit Design
Modbus is a protocol, and the physical layer it usually runs on is a shared two wire bus with differential signalling. The protocol stack is a software problem, while the reliability of a Modbus link in a plant depends on the electrical details: biasing, termination, timing and the way the transceiver is driven.
The Physical Layer in One Page
A Modbus serial link uses one twisted pair for data and a common reference for the ground. The pair carries a differential signal, so noise that appears on both conductors is subtracted at the receiver and disappears. That is the whole reason the standard survives in electrically noisy plants.
Up to thirty two unit loads can share one bus, and a unit load is defined by the input impedance of the transceiver. A modern device that presents a fraction of a unit load allows more nodes, but the limit is still set by the driver, the cable and the data rate.
A separate return conductor is part of the recommendation rather than an optional extra. Without it, the common mode voltage of the two ends can float outside the range the receivers accept, and the link fails intermittently at some installations and works perfectly in the workshop.
Driving the Bus in Both Directions
The transceiver has a driver enable and a receiver enable, and the firmware must never enable the driver while another node is transmitting. That requires a defined turnaround: the last byte is shifted out, the shift register is empty, and only then does the driver turn off.
The timing of that turnaround is where most half duplex links lose their first byte of a reply. Turning the driver off too early truncates the final character, and turning it off too late holds the pair busy while the reply begins. The datasheet gives the transmit complete flag, and it should be used rather than a delay loop.
A transceiver with automatic direction control removes the problem by sensing the data on the transmit pin and switching the driver itself. It works well at a fixed data rate and should be checked at the extremes of the temperature range, because the internal timing shifts with temperature.
Bus biasing and Idle State
When no node is driving, the pair is undefined and the receivers may report random data. A pair of bias resistors pulls the positive line up and the negative line down so the idle state is read as a mark, which is the rest state of the interface.
The bias network has to overcome the termination and the leakage of every node on the bus. With two terminations of a hundred and twenty ohms, the parallel value is sixty ohms, and the bias current must produce a differential voltage of at least two hundred millivolts across it. Sizing the resistors from that requirement, rather than copying a value from an application note, avoids a bus that works with three nodes and fails with twenty.
Biasing belongs at one place on the bus, usually the master. Fitting bias at every node multiplies the current and loads the driver without improving the idle state. The same rule applies to termination, which is covered in our guide to EMI suppression design principles alongside the other measures that keep a differential pair clean.

Termination and Stubs
A short bus needs no termination and a long one needs it at both ends. The rule of thumb is that termination matters when the round trip delay of the cable approaches the rise time of the driver, which for typical RS-485 parts happens somewhere beyond a few tens of metres.
Stubs are the other half of the problem. A long spur from the main pair reflects the signal and creates a notch in the response, and the effect grows with the data rate. Keeping every drop shorter than a tenth of the rise time distance prevents the worst of it.
The termination resistor must be at the physical end of the cable, not at the connector of the last node if that node has a further run of cable attached. A termination placed in the middle reflects the wave that passes it and makes the link worse than no termination at all.
Protection and Grounding
Industrial buses carry surge and common mode voltage that a bare transceiver cannot withstand. A transient suppressor at the connector, followed by a small series resistor, limits what reaches the device during a lightning induced event or a fault in the plant wiring.
Galvanic isolation is common in installations where the two ends are on different earth systems. An isolated transceiver removes the ground loop, and the isolation barrier has to be rated for the potential difference with margin, including the transient part of the stress.
The common conductor should be tied to the local ground through a resistor or a small capacitor rather than directly, in some installations, to limit the current that flows through it. The choice depends on the installation, and the reasoning follows the same pattern as any mixed signal ground problem, described in our guide to mixed signal board design.

Data Rate, Cable and Distance
The product of data rate and cable length is roughly constant for a given cable. At nine thousand six hundred baud a kilometre is achievable with a good twisted pair, while at a hundred and fifteen kilobaud the practical limit falls to a few hundred metres.
Cable capacitance and characteristic impedance both matter. A pair with a hundred and twenty ohm impedance and low capacitance per metre preserves the edges, while a general purpose cable with a higher capacitance rounds them and closes the eye at the receiver.
Data rate is usually set by the slowest device on the bus rather than by the cable. A single transducer with a slow interface forces the whole link down, which is a common reason for a link that is reliable at low rates and unusable at higher ones.
Testing and Commissioning
Commission a bus from one end. Bring up two nodes first, confirm the idle state with an oscilloscope on the pair, and then add nodes one at a time. A bus that is fitted with termination and bias without checking the idle state often starts up with the receivers seeing noise.
Measure the differential voltage in the idle state and during transmission. The idle value should be comfortably in the mark region, and the driven value should exceed the receiver threshold with plenty of margin at the far end of the cable, which is the worst point.
Record the setting of every node, including the address, the data rate and the parity. Most field faults on these links are configuration mismatches rather than electrical failures, and a written record turns a long diagnostic session into a two minute check. The quality and release practices that keep the interface hardware consistent are collected in our PCB design release checklist.
Common Faults and Their Causes
A link that reports timeouts on every second request is usually a turnaround problem at the master. Check the transmit complete flag, the driver enable timing and whether the receiver is disabled while the driver is active.
A link that works in one building and fails in another points to a ground potential difference. Measure the voltage between the two common conductors with a multimeter, and add isolation if it is more than a few volts.
A link that fails only at the end of the day, or only when a particular machine runs, points to a noise source rather than to the protocol. Route the pair away from the drive cables, add a common mode choke, and check that the cable shield is earthed at one point only.
FAQ
Do I need termination resistors on a short Modbus link? On a bench of a few metres they are usually unnecessary. Fit them at both physical ends once the cable runs beyond a few tens of metres or the data rate is high.
Why does my Modbus reply lose its first byte? The driver is being disabled before the last character has left the shift register. Wait for the transmit complete flag rather than a fixed delay.
Where should the bias resistors be fitted? At one point on the bus, normally the master. Fitting them at every node multiplies the load and reduces the differential swing.



