RS485 cconnection problem and Ground interaction - Solved!

Current situation:
Arduino with RS485 (MAX485) interface talking to a number of other similar devices also fitted with RS485 for sensor monitoring and other building automation tasks. RS485 signals are carried over cat5e cabling along with 24V DC to cater for power requirements of each device. i.e 4 wires are used for +RS485, –RS485, +24V and Common (-ve) (Voltage is stepped down from 24v DC at each device)

The problem:
Communication over the RS485 link works fine at the lab using an external power supply. However when the device is connected at the desired location using the bus wired 24Vdc as explained above, the comm link no longer works.

Findings:
It appears that this problem is related to the Common - Ground connection. Bus wiring Common is isolated from the building Ground and I have measured a voltage difference between the “two grounds” of about 3-4V. As long as the arduino is powered from an external power supply (isolated) everything is ok. When the arduino (and associated RS485 circuitry) is powered from the bus wired power and hence the bus wired Common is connected to that of arduino ground , comms fail. Note: Arduino Ground (-ve) is effectively connected to building ground because of another existing RS232 link.

Question:

One way to get around this is to just use separate power supply for the arduino. Would it be possible to power the arduino from the bus power maintaining ground isolation at the same time??

Watcher:
Current situation:
Arduino with RS485 (MAX485) interface talking to a number of other similar devices also fitted with RS485 for sensor monitoring and other building automation tasks. RS485 signals are carried over cat5e cabling along with 24V DC to cater for power requirements of each device. i.e 4 wires are used for +RS485, –RS485, +24V and Common (-ve) (Voltage is stepped down from 24v DC at each device)

The problem:
Communication over the RS485 link works fine at the lab using an external power supply. However when the device is connected at the desired location using the bus wired 24Vdc as explained above, the comm link no longer works.

Findings:
It appears that this problem is related to the Common - Ground connection. Bus wiring Common is isolated from the building Ground and I have measured a voltage difference between the “two grounds” of about 3-4V. As long as the arduino is powered from an external power supply (isolated) everything is ok. When the arduino (and associated RS485 circuitry) is powered from the bus wired power and hence the bus wired Common is connected to that of arduino ground , comms fail. Note: Arduino Ground (-ve) is effectively connected to building ground because of another existing RS232 link.

Question:

One way to get around this is to just use separate power supply for the arduino. Would it be possible to power the arduino from the bus power maintaining ground isolation at the same time??

Here is a good source on implementing RS232, RS485 communication

Digi Corp implementation manual

for Standard RS485 you need a ground. this document goes into pretty good detail.

Here is a good table from that document:

Chuck.

Chuck, thanks for the info and document. I will sure go through it!

Maybe I should have mentioned that I am actually connecting to an existing system where the number of devices theoretically could be up to 128. Hence I have to use existing wiring baud rate (9600 bps) etc.

EDIT: Excellent document on RS232/RS485! One of the best i ve read. Thanks.

Watcher:
Chuck, thanks for the info and document. I will sure go through it!

Maybe I should have mentioned that I am actually connecting to an existing system where the number of devices theoretically could be up to 128. Hence I have to use existing wiring baud rate (9600 bps) etc.

The number of devices on the bus is limited by the 'load'. The MAX485 is rated to drive 32 receivers on the bus, other chips have different drive potential. The Max487 is rated to drive 128 receivers.

Chuck.

The number of devices on the bus is limited by the 'load'. The MAX485 is rated to drive 32 receivers on the bus, other chips have different drive potential. The Max487 is rated to drive 128 receivers.

Yes I am aware of this . I am waiting for a batch of MAX487 as well as MAX3085 to arrive to give it a try.

However, this (limited fanout) still doesn't explain the fact that even with a MAX485 when connected with an external power supply (hence a separate ground wire) it all works fine and the problem only appears when the bus power is used as explained in the original post.

Watcher:
Yes I am aware of this . I am waiting for a batch of MAX487 as well as MAX3085 to arrive to give it a try.

However, this (limited fanout) still doesn't explain the fact that even with a MAX485 when connected with an external power supply (hence a separate ground wire) it all works fine and the problem only appears when the bus power is used as explained in the original post.

Have you put a scope on the bus lines?

Your description sounds like a bad connection, how much capacitance do you have at each device?

What is your 24Vdc power supply capable of providing(amps)?

You say you have a 3..4V ground loop, How much current ?

The Digi reference recommends a 100ohm inline with the RS485 ground.

Put a known resistance in the ground path and measure the current. Millamps may be survivable. Amps aren't.

Or you could use one of Maxim's High Galvanic Isolation drivers like the MAX14853. More parts, but works with up to 2500V of ground loop for 60s or 440v for ever.

Chuck.

another Simple test, put a 100 ohm resistor across ty

Unfortunately it isn't easy to put a scope at the location where the problems arises because of accessibility issues.

What do you mean by capacitance at each device? Distributed supply rail capacitance?

24V DC power supply can supply up to 1 A at 24V. My device only uses about 50mA

I will measure the ground loop current and get back to you

Watcher:
Unfortunately it isn't easy to put a scope at the location where the problems arises because of accessibility issues.

What do you mean by capacitance at each device? Distributed supply rail capacitance?

I was wondering if the remote sensor was causing brownouts. If you had a high resistance on the 24v line and did not have a load when you measured it, It would show 24v but as soon as you put a load on it, it could nosedive below the minimum of your 24->5 converter. Can you test the delivered voltage when the sensor is incircuit?

Watcher:
24V DC power supply can supply up to 1 A at 24V. My device only uses about 50mA

I will measure the ground loop current and get back to you

Hopefully the loop current will be small.

Chuck.

Can you test the delivered voltage when the sensor is incircuit?

I will .

However the sensor power supply circuitry uses an LM2596 to lower the voltage to 9V and then the arduino onboard linear regulator takes over to supply the 5V needed. I very much doubt that the added (small) load will transiently lower the supply voltage.

Measurements:

Ground loop current : 6 mA
Ground voltage difference 2-4 V

Supply voltage with sensor connected 24.6V DC, No difference if sensor disconnected

Tried to connect the -24V to system ground via a 100R resistor but it didn't seem to have any effect whatsoever.

All I can think of now is to wait for the MAX3085 and give it a try...

Trying to connect a scope doesnt help since as soon as the scope's ground wire is connected, (which is earthed) , all communication is lost as explained above!

I can still detect some digital activity on the -ve RS485... but the +ve RS485 seems very noisy. Cant understand why the difference!

Watcher:
Trying to connect a scope doesnt help since as soon as the scope's ground wire is connected, (which is earthed) , all communication is lost as explained above!

I can still detect some digital activity on the -ve RS485... but the +ve RS485 seems very noisy. Cant understand why the difference!

If you power your 'scope from local voltage, set your scope for high range differential, connect probe 1 to A, probe 2 to B and just connect the probe grounds to each other, you should be able to see just the differential if the ground loop voltage is within your scope's maxim.

Your measure ground loop voltage and current should not cause a problem.

Have you thought about powering the sensor from the 24V and connecting a 100 ohm resistor from sensor ground to local ground? possibly also placing a bypass cap(1uf 50v) across the resistor. If you are inducing currents and impulses via the RS485 wires, maybe you can ground them out?

Chuck.

If you power your 'scope from local voltage, set your scope for high range differential, connect probe 1 to A, probe 2 to B and just connect the probe grounds to each other, you should be able to see just the differential if the ground loop voltage is within your scope's maxim.

Did exactly that. Wasn't easy to capture the waveform since its not possible to set trigger on A-B. It had to be either on A or on B.
See attached scope picture. Purple line is the differential. Appears noisy. First waveform was captured with the ground disconnected as explained earlier from the -ve (comms work fine) and the second with the ground connected (comms fail).

I have also tried to add an 100R resistor with no effect.

GND_connected.jpg

GND_Disconnected.jpg

Watcher:
Did exactly that. Wasn't easy to capture the waveform since its not possible to set trigger on A-B. It had to be either on A or on B.
See attached scope picture. Purple line is the differential. Appears noisy. First waveform was captured with the ground disconnected as explained earlier from the -ve (comms work fine) and the second with the ground connected (comms fail).

I have also tried to add an 100R resistor with no effect.

Based on your images, the B line has failed. You should be seeing A= -B, you are seeing A correct waveform. But, B= 0 is incorrect.

I think somewhere in your wiring B is connected to GND.

This would explain your problems. When you run the remote off local power, the B line is allowed to float, the A-B differential is within range and produces valid values.

When you attempt power from the 24V,you are effectively tying B to GND, so A can never be less than B, therefore A is always the same value (HIGH). So there is no changes that can be detected, so your communications fail.

The line probe B is connected to may actually be GND, and the line you think is GND may be B.

Chuck.

Thanks for your help. It all sounds reasonable. I forgot to mention that other existing RS485 devices on the network seem to be unaffected by changes of supply.these run on max3085 fail safe devices. I guess this is the reason..

I now have to find where B is shorted to ground somewhere in tge long bus wiring...

Watcher:
Thanks for your help. It all sounds reasonable. I forgot to mention that other existing RS485 devices on the network seem to be unaffected by changes of supply.these run on max3085 fail safe devices. I guess this is the reason..

I now have to find where B is shorted to ground somewhere in tge long bus wiring...

Good Luck.

You probably don't have a TDR do you? If you did you could shut down the bus, connect a Time Domain Reflectometer , and wala! You have pinpointed your problem!

If you had one of these then your only problem is translating the linear distance into wire distance!

Chuck.

No..i dont have a TDR..!

Watcher:
...
Findings:
It appears that this problem is related to the Common - Ground connection. Bus wiring Common is isolated from the building Ground and I have measured a voltage difference between the “two grounds” of about 3-4V. As long as the arduino is powered from an external power supply (isolated) everything is ok. When the arduino (and associated RS485 circuitry) is powered from the bus wired power and hence the bus wired Common is connected to that of arduino ground , comms fail. Note: Arduino Ground (-ve) is effectively connected to building ground because of another existing RS232 link.
...

No reinvent wheel

IEEE 802.3at Type 2 Power over Ethernet Injector to feed power, then 5 v PoE Splitter at each Arduino. PoE Splitter is designed isolated to ground.

Power of Power over Ethernet Injector

  • 802.3af (802.3at Type 1) 12.95 W
  • 802.3at Type 2 25.50 W

Update : short found between +ve RS485 and ground. Everything now ok after short repaired.

Thanks for your help!

Watcher:
Update : short found between +ve RS485 and ground. Everything now ok after short repaired.

Thanks for your help!

Glad I could Help.

Chuck.