1
\$\begingroup\$

I would like to insert two LEDs on an RS485 bus (i.e. on the RX and TX side) that flash when there is a communication passage.

I have a 24V power supply, and I could use op-amps (like the LM358) or some BJTs (NPN and PNP).

Would it be OK to use amplifiers in buffer mode or a PNP BJT?

schematic

simulate this circuit – Schematic created using CircuitLab

schematic

simulate this circuit

\$\endgroup\$
12
  • 1
    \$\begingroup\$ You can just do LED + series resistor to ground, straight from the data lines. The transceivers will have no problem driving the LED as long as you use some sensible current level, <5mA or so. What kind of LEDs are these, regular SMD 0603/0805 or so? \$\endgroup\$
    – Lundin
    Commented Jan 13, 2022 at 9:45
  • \$\begingroup\$ 485 is differential so, do you mean the RX and TX lines as produced by an interface chip? Be absolutely unambiguous about this. \$\endgroup\$
    – Andy aka
    Commented Jan 13, 2022 at 10:55
  • \$\begingroup\$ @Lundin I have already tried a similar solution, but the LEDs do not light up in any way (to be on the safe side, I even reversed their polarity to no avail). The LEDs are simple through-hole components. \$\endgroup\$
    – Alinik
    Commented Jan 13, 2022 at 11:13
  • \$\begingroup\$ @Andyaka Yes, they are produced by an interface chip: communication starts from a microcontroller and then passes through a transceiver for RS-485, i.e. a MAX1487. \$\endgroup\$
    – Alinik
    Commented Jan 13, 2022 at 11:13
  • 1
    \$\begingroup\$ @Alinik I don't think you've answered Andy's question. He already knows how RS485 works, but is asking you which side of the interface chip you're planning to connect to - the separated single-ended RX & TX lines on the microcontroller side, or the combined differential A/B lines on the RS485 bus side? \$\endgroup\$
    – brhans
    Commented Jan 13, 2022 at 12:55

2 Answers 2

2
\$\begingroup\$

Your circuit with the BJT won't work. The RS485 voltage is likely to be 3.3V or 5V signal level. But to turn off the transistor you probably need the signal to go as high as 22~23V (which it ordinarily won't).

The circuit with the op amp can work, but not in all cases.

  • For a case with a 3.3V or 5V RS485 driver and no ground offset the LED will turn on/off.
  • If there is ground offset of more than a few volts then the LED might not turn on/off.
  • Strictly speaking the RS485 standard specifies that drivers provide 1.5V minimum output voltage. A conforming driver that actually output 1.5V wouldn't provide enough voltage to turn the LED on/off.
  • Over long distances it's possible that the signal level attenuates a lot. The RS485 standard specifies that receivers detect signals as small as 200mV. At 200mV your LED certainly won't turn on/off.

Just connecting an LED, anti-parallel diode, and resistor directly to the RS485 lines can work, but not always.

  • For a case with a 3.3V or 5V driver and very little signal attenuation on the bus this will probably work.
  • One downside is that the LED+resistor will present a load and affect the impedance on the bus. It's probably fine for slower baud rates and shorter distances but could cause errors on longer distances or faster baud rates.
  • Strictly speaking the RS485 standard specifies that drivers provide 1.5V minimum output voltage. A conforming driver that actually output 1.5V wouldn't provide enough voltage to turn the LED on/off.
  • Over long distances it's possible that the signal level attenuates a lot. The RS485 standard specifies that receivers detect signals as small as 200mV. At 200mV your LED certainly won't turn on/off.

schematic

simulate this circuit – Schematic created using CircuitLab

Probably the best way is to just connect the LED to the output of an RS485 transceiver chip.

schematic

simulate this circuit

\$\endgroup\$
0
\$\begingroup\$

The last time I needed this I used a bi-directional LED with 100 ohms in series connected between A and B

No doubt that messed up the RS485 signal a littlem but didn't seem to hurt over desktop distances. A better approach would be to use an RS485 receiver chip to drive the LED.

\$\endgroup\$
1
  • \$\begingroup\$ Does this bi-directional LED connected between lines A and B of the RS485 mess up the signal on the bus both before and after the LED? I plan to insert it at the end of the bus anyway, so as not to dirty the signal for devices located downstream of the LED. \$\endgroup\$
    – Alinik
    Commented Jan 13, 2022 at 15:30

Your Answer

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

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