Eight meters on 30 m of RS-485 at 9600 baud: do I need termination, or is it something else?
Student here, first time with RS-485, so sorry for basic questions.
Our lab has eight small Modbus RTU energy meters on one RS-485 line, about 30 m of cable in total, 9600 8N1. A Pi 4 with a USB-RS485 dongle polls them with pymodbus every 10 s and sends the values to Hermetry. Most of the time it works, but every hour some meters time out for a poll or two, always different ones:
pymodbus.exceptions.ModbusIOException: Modbus Error: [Input/Output]
No Response received from the remote unit/Unable to decode response
I read that you need 120 ohm termination resistors at the ends, and also that you don’t need them for short cables. Which is it? Is 30 m short? There are no resistors on our line at the moment. Cable is some 2-core speaker-ish cable from the lab cupboard.
Always terminate, put 120 ohm at every meter.
Does cable length really matter at only 9600 baud?
Tyler, please don’t, eight 120 ohm resistors in parallel load the line to 15 ohm and nothing will talk.
Owen: at 9600 baud a bit lasts about 104 µs. On 30 m of cable a reflection goes up and back in well under a microsecond, so it has died out long before the receiver samples. Termination is about long cables and high baud rates, and you are nowhere near that. That’s David’s answer too.
What you’re missing is biasing. Between frames nobody drives the line, and an unbiased line floats near 0 V differential, so noise looks like start bits. That gives exactly the random, different-meter-each-time errors you see. Many cheap USB dongles have no bias resistors. Put them at the master end: about 680 ohm from A (+) to 5 V and 680 ohm from B (-) to GND. If you later add 120 ohm termination at both ends, bias is no longer optional at all.
Also, in this order:
- Use twisted pair, and run a third wire as signal ground/common. Speaker cable has neither the twist nor the impedance.
- Daisy-chain, no star. Short stubs at each meter.
- In pymodbus, a response timeout of 1 s and one retry, and a short pause between meters.
On the Hermetry side, if a poll fails, send nothing for that meter in that round instead of a 0 or the old value. Then the chart has a small gap rather than a fake reading.
Added 680 ohm bias at the Pi end and swapped to a proper twisted pair with a ground wire. 24 hours without a single timeout. I hadn’t even heard of biasing, thanks Laura. And no, I didn’t put 120 ohm on every meter.
Fair, I mixed up two different setups. Bias it is.
- Bu konuyu yanıtlamak için giriş yapmış olmalısınız.
Sohbete katılın
Soru sormak ve yanıtlamak, yararlı gönderileri beğenmek ve sorununuzu çözen yanıtı işaretlemek için oturum açın. Her katkı puan ve seviye kazandırır.

