1
\$\begingroup\$

I've set up the following simple, non-terminated RS-485 network:

MODBUS-RTU, 4800baud

The bus is 10m long CAT5e cable, carrying a 4800 baud signal. RS-485 transceiver (TRX) is an XY-k485 module (MAX485-based).

Transmission works fine, and the sensor reports correct readings. Curious about what kind of voltages develop in the RS-485 segment, I measured the voltage between:

  • A and B of the sensor: 3.3 to 3.4 V
  • A of the sensor and GND: 3.4 to 3.5 V
  • B of the sensor and GND: 0.0 to 0.2 V

After obtaining the voltages, I've connected one 120 Ohm termination resistor at the far end of the bus like so:

enter image description here

The sensor was still reporting correct readings no problem. However, measuring the voltages between the same points again produced very different results with the termination resistor in place:

  • A and B of the sensor(term-d): 0.0 - 0.7V
  • A of the sensor and GND(term-d): 1.81 to 1.86 V
  • B of the sensor and GND(term-d): 1.79 to 1.92 V

Why did the voltages in the bus change so dramatically after the resistor was connected, and what does this change mean in terms of signal strength/transmission reliability?

I.e. are lower voltages of the "terminated" version of the bus better? Or does it make little difference, since both terminated and non-terminated versions worked just fine?

P.S: I am aware of the necessity of the termination in RS-485 networks at the "it's real important trust me bro" level, but would like to get a more in-depth look at what goes on in the bus and what physical impact connecting the resistor makes.

\$\endgroup\$
9
  • 1
    \$\begingroup\$ Looks like you may be measuring the average voltage while sending some sort of data. What are you using to measure the voltage? \$\endgroup\$
    – SteveSh
    May 28 at 0:31
  • \$\begingroup\$ At only 4800 baud rate, and only 10m length, you don't need termination. Reflections on the line from no termination will have settled looooong before the bits get sampled. \$\endgroup\$
    – brhans
    May 28 at 0:33
  • 1
    \$\begingroup\$ The drivers can only source a given amount of current, so placing any load is going to decrease the voltage. The critical parameter is that the voltage between A and B should be greater than +/-200mV to be considered a valid logic level. Your schematic doesn’t show a gnd/0V reference between RS485 devices/nodes. The common mode voltage between nodes is critical. \$\endgroup\$
    – Kartman
    May 28 at 1:07
  • 2
    \$\begingroup\$ The sensor gnd being connected to your mcu ground eliminates that issue. In the last week or so there was another question relating to RS485 and voltage. Might be worth having a look. A must read for RS485 is ti.com/lit/an/snla049b/… \$\endgroup\$
    – Kartman
    May 28 at 1:26
  • 1
    \$\begingroup\$ @Noideas - You should add the grounding and power supply connections to your diagram. \$\endgroup\$
    – SteveSh
    May 28 at 1:36

2 Answers 2

1
\$\begingroup\$

The first notice is that you are using the MAX485 with 3.3V and it's not intended to be used at 3.3V but 5V so all your findings may be irrelevant due to wrong supply voltage. The chip doesn't even have to work at all at 3.3V.

The second notice is that you only wire two data lines between devices. While that may work under correct assumptions about the cicuit, RS-485 is not a two-wire bus, it's a bus with two data wires and ground between devices. So it won't work unless the devices already share a ground, through other cabling, power supply, or earthing.

The bus drivers are not infinitely strong, they are only as strong as needed.

With no termination, there is only very small load (one bus receiver is few ten kilo-ohms) so a small current flowing and the driver output strength/impedance can drive it to near supply voltages.

But when a DC load such as 120 ohm termination resistor is added, that's tens of milliamps load, and the bus driver can't drive it to 0V and 3.3V supply any more.

And it does not matter, as all RS-485 drivers are specified to drive a fully terminated bus with 32 standard receivers on it, so that the voltage at the receivers is still far beyond margins of receiving properly (about 1.5V while about 0.2V required.

But your case is a bit weird. You have 3.3V drivers and 100 ohm cabling, and a single termination on one end of the bus.

If you terminate, you would terminate both ends of the bus.

Many standards that do use 100 ohm cabling still suggest 120 ohm terminations on both ends of the bus, so 100 ohm termination is not recommended, as you also have only 3.3V transceiver.

Normally 5V is used for the driver.

\$\endgroup\$
4
  • \$\begingroup\$ Thank you for the detailed answer. I've double-checked the XY-k485 module. The chip used on the board is likely to be MAX485, but can also be MAX483 (3v3 version) - the markings on the ICs themselves seem to have been laser'd off. The module already features a 120 Ohm termination on the PCB, so connecting the other 120 Ohm resistor completes the dual termination requirement. \$\endgroup\$
    – Noideas
    May 29 at 7:44
  • \$\begingroup\$ Does the module also have failsafe bias resistors? The module seems to be one of those cheap black boxes without manuals or instructions - with automatic transmit enable etc, so it seems you really can't trust it or know how it works without reverse-engineering it. \$\endgroup\$
    – Justme
    May 29 at 7:48
  • \$\begingroup\$ Indeed, the module does not feature complete datasheet documentation or schematics. The somewhat believable diagram can be seen here: link. It does have some ESD protection and fuses, does it count? \$\endgroup\$
    – Noideas
    May 29 at 7:56
  • \$\begingroup\$ Also, is automatic direction switching a bad practice in RS485? \$\endgroup\$
    – Noideas
    May 29 at 7:58
1
\$\begingroup\$

Some RS485 transceivers come with pull-up resistors so you don't have to add them yourself. Before you added the termination resistor, the pull-up resistors could pull the lines to the supply voltages when no one is transmitting. With the termination resistor, the lines don't get pulled as close to the supply.

By the way, it is recommended to use 120Ω termination resistors because you are supposed to use 120Ω transmission lines. If you only have a 100Ω line then maybe it is better to use 100Ω termination resistors.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.