Go Down

Topic: Ground wire for RS485 or not? (Read 12336 times) previous topic - next topic

lemming

I have been looking at wiring up a multidrop RS485 link over a distance up to a kilometre and have been encountering differing views on whether just the A and B wires are needed or whether a ground wire is also required for reliable communication. Some web pages say that the ground wire is necessary while other say that it is not necessary and others say that it actually hampers reliable communication.

An example is at: http://www.chipkin.com/rs485-cables-why-you-need-3-wires-for-2-two-wire-rs485/

The comments from (apparently) professionals to the Q&A tutorial at the start of the page also shows a lack of consensus.

I was wondering what some of you guys have experienced with RS485 in this respect and your views?

be80be

#1
Oct 04, 2015, 05:19 pm Last Edit: Oct 04, 2015, 05:26 pm by be80be
They call lots of stuff 2 wire but i've never used any wire to hook it up  that didn't have the power with it.
red black green and yellow. Alarm wire.

Quote
The RS-485 differential line consists of two pins:

A aka '-' aka Data - (D-) aka TxD-/RxD- aka inverting pin
B aka '+' aka Data + (D+) aka TxD+/RxD+ aka non-inverting pin
SC aka G aka reference pin. Ground

DVDdoug

It's a 2-wire differential protocol and you don't need a ground wire.

But an some applications, such as DMX512 lighting control, a 3-conductor XLR connector is used with a shielded cable.

68tjs

A ground wire is mandatory !

Differential links provides a gain (x2) and noise immunity.
But it is imperative that the receiver and transmitter share the same reference voltage OV ie GND

The only exception are in the case  when there is use of a flux, magnetic  with transformers or optical with fibre or optocoupler
Ceux qui savent qu'ils ne savent rien en connaisse autant que ceux qui croient tout savoir et qui n'en connaissent pas plus qu'eux.
Pierre DAC.

be80be

A ground wire is mandatory !

Differential links provides a gain (x2) and noise immunity.
But it is imperative that the receiver and transmitter share the same reference voltage OV ie GND

The only exception are in the case  when there is use of a flux, magnetic  with transformers or optical with fibre or optocoupler
Like I said lots of stuff calls it self 2 wire but it still needs the ground I never installed any alarms with optical with fibre or optocoupler. But a lot with four wire and some with shielding and 3 wires nice stuff and you can bet it was right way to do it cause after all it's there to save your life It's was for fire as well as break in .

nickgammon

Here is the suggested wiring from the LTC1480:




Note that they have a shield grounded at one end (presumably to avoid earth loops). All three devices are grounded but there is no indication that the grounds themselves are connected together.




Quote
But it is imperative that the receiver and transmitter share the same reference voltage OV ie GND
I thought that the whole idea was that the 2 data wires carried a differential voltage. Thus the reference voltage is each other.

By comparison, MIDI cables use a similar technique. There are two data wires (they are not differential, but carry a current which drives an LED in an optocoupler). You connect the ground (shield) at one end only. Otherwise you set up an earth loop.




More information here: https://www.maximintegrated.com/en/app-notes/index.mvp/id/763

Interestingly, that mentions ground (but not a shield):

Quote
Wire

RS-485 is designed to be a balanced system. Simply put, this means there are two wires, other than ground, that are used to transmit the signal.





Another link: http://www.bb-elec.com/Learning-Center/All-White-Papers/Serial/Basics-of-the-RS-485-Standard.aspx

Quote
Signal ground, don't forget it. While a differential signal does not require a signal ground to communicate, the ground wire serves an important purpose. Over a distance of hundreds or thousands of feet there can be very significant differences in the voltage level of "ground." RS-485 networks can typically maintain correct data with a difference of -7 to +12 Volts. If the grounds differ more than that amount, data will be lost and often the port itself will be damaged. The function of the signal ground wire is to tie the signal ground of each of the nodes to one common ground. However, if the differences in signal grounds is too great, further attention is necessary. Optical isolation is the cure for this problem.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

tomtom1000

RS485 is a symetrical two wire protocol. the same system as sound cables with the 3 pin XLR.
we often use this over two wire but these wire must be twisted for such a long distance. if your cable has a shield, ground it on both sides, this gives better noise to signal ratio.

anyway , most devices (modems) have a power supply without ground (only 2 pins on the 220v side) so the ground potential difference is not a  problem. most 485 devices can run on one pair (half duplex) or two pairs (full duplex) if available use two pairs but if you dont have massive amount of data, one pair is ok.

in theory the same data signal goes over both lines, one signal positive, one signal negative. any distortion signal which comes to the cable adds the same peak (for example positive distortion peak) to both lines.
the circuit on the receiver side takes the postive signal from one line and INVERTS the negative signal from the other line. the distortion comes on both lines positive, but since the signal on the second line will be inverted, the distortion signal will be zero.

my installation with rs485 uses only one pair (taking data from a clock to a point aprox. 500 meters away) works perfect.

EIA-485 says  that using the ground can be a advantage for longer lines, but its not nessecary.
wikipedia gives a few good explanations about differential or symetrical transmissions and EIA-485

Grumpy_Mike

Quote
All three devices are grounded but there is no indication that the grounds themselves are connected together.
Yes there is, they all use the same symbol so they are all connected together. This can be either by a wire between the two units or a wire on each unit to the read ground ( Earth ).

nickgammon

#8
Oct 04, 2015, 10:51 pm Last Edit: Oct 04, 2015, 10:52 pm by Nick Gammon
Yes, but the ground symbol, over a long distance, suggests to me that they are locally grounded.

In any case, doesn't carrying a ground wire negate the advantage of having a balanced pair? The balanced A/B pair is to cancel out induced voltages on a long cable run, right? So this is negated by supplying ground over a long cable run.
Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

be80be

I don't see a problem the wire I use has 2 wires and a shielding which is the ground. Or 4 wires and there twisted pairs. They ground at main panel. I've run miles of this on motels and it works fine.   

Grumpy_Mike

#10
Oct 04, 2015, 11:40 pm Last Edit: Oct 04, 2015, 11:42 pm by Grumpy_Mike
Quote
Yes, but the ground symbol, over a long distance, suggests to me that they are locally grounded.
No it is a symbol that means the same place, not a local one. If it were a local one then there would be two different ground symbols. There are several, notice the one in your circuit is Earth, there is only one Earth. Note if they were local grounds then there would be a number in them like on the right hand side.



Quote
The balanced A/B pair is to cancel out induced voltages on a long cable run, right?
Not quite, the twisted pair ensures that any signal picked up is common to both wires. Then the same difference is preserved between the two signals.

Quote
So this is negated by supplying ground over a long cable run.
No, if this induced signal is also picked up by the ground wire then the differential is still preserved.

nickgammon

Looks like this is relevant: http://electronics.stackexchange.com/questions/150678/looking-for-a-long-distance-1km-physical-layer/

Quoting Michael Karas from that:

Quote
For successful design and deployment of RS-485 networks I strongly recommend that you read and comprehend these application note documents:

Application Note 847 FAILSAFE Biasing of Differential Buses

http://www.ti.com/lit/an/snla031/snla031.pdf

AN-1057 Ten Ways to Bulletproof RS-485 Interfaces

http://www.ti.com/lit/an/snla049b/snla049b.pdf

B&B Electonics RS-422 and RS-485 Applications eBook

http://www.bb-elec.com/Learning-Center/All-White-Papers/Serial/RS-422-and-RS-485-Applications-eBook/RS-422-RS-485-eBook-graphics-embedded.pdf

Please post technical questions on the forum, not by personal message. Thanks!

More info: http://www.gammon.com.au/electronics

Grumpy_Mike

I think the relevant quote from these is
Quote
Although the potential difference between the data-pair conductors determines the signal without officially involving ground, the bus needs a ground wire to provide a return path for induced common-mode noise and currents, such as the receivers' input current. A typical mistake is to connect two nodes with only two wires. If you do this, the system may radiate high levels of EMI, because the common-mode return current finds its way back to the source, regardless of where the loop takes it. An intentional ground provides a low-impedance path in a known location, thus reducing emissions.

Paul__B

OK, let's get cunning about this and just look at the specifications of an actual RS-485 interface.

We find that the "Absolute maximum" specifications are -9 to +14V, but the working range is 0 to Vcc - being 3.3V.

This means that in order to work properly, you must constrain the voltages to those levels.  How do you propose to do this?

Well, either you know that your grounds are at the same voltage due to other connections, or you provide a ground connection for a reference along with the data wires.  If there is a concern that this will cause a "ground loop" with significant current flowing then you need to fix that problem.

Please get it straight.  RS-485 is a protocol designed to communicate over significant distance with a degree of noise immunity.  It does not provide any degree of isolation such as Ethernet.  If that is what you want, you need optic fibre.

lemming

Thanks guys for the replies.

I take it that ideally I would connect all the grounds (in the diagram in post #5) together, preferably through shield, so there is no difference between grounds that could arise through using local grounds over the 1 km distance.

However then I run the risk of a ground loop which I'm not sure how to remove. (I will do some more googling)

The other alternative is to use optoisolated RS485 transceivers.

Is this a fair precis?

Go Up