Rs485IsBidrectional

TableOfContents

* RS485 is bidirectional does it mean it is fullduplex? http://groups.google.com/group/comp.arch.embedded/browse_frm/thread/22511591b16678dd/4184893c4c3f9888?lnk=st&q=RS485&rnum=1#4184893c4c3f9888 RS-485 is a differential (balanced) system, and there is no signal ground connection. The cable used might well include a frame ground, but that is for noise induction cancellation, not signal ground.

Hence it actually is a 2-wire or 4-wire link.

> - RS-422 is also multidrop (10 max drops, IIRC). > - RS-422 is often implemented using a pair of RS-485 devices these days, >since the RS-485 spec is superior to the original RS-422 spec. This confuses >things slightly, but means that RS-485 tends to be used in both 3-wire and >5-wire configurations.

The practical problem is that the receiver is made of bipolar transistors and hence require some kind of base current. This current can be supplied through a more or (usually) less clean common ground connection or the differential signal path can be treated as bipolar current loop with the "fail safe" termination resistors supplying the small base current to the transistors.

The specification includes the maximum ground offset voltage permissable. (I don't recall what it is, or how realistic it is for common 4000 foot runs of twisted pair cable.) But attempting to supply a separate "signal ground", for example via a single separate cable pair, will almost certainly result in a poor frame ground connection instead! That is not a good idea over a 4000 foot loop, but it probably wouldn't make any difference at all if the cable run is relatively short. (Unless it is between two locations on separate power distributions, and one of them has a bad ground.)

I have the same experience. I ran an RS-485 network in a factory invonment, using one twisted pair for data and two other pairs to distribute the power. Total length appr. 500 meters (1500 feet). Never ever had a problem, all boards shared the same power supply ground. When a link had to be made between two buildings, the power was split and only both datalines were connected. At both ends, the systems we ground. Every thunderstorm blew the Tx chips. You *absolutely do* want a good ground connect at both ends.

The only think you absolutely want is some means to prevent excessive common mode voltage outside the range of the TX chips. How you achieve this, is not important. This could easily be done with the "third wire" to connect both commons (I explicitly won't call it "ground").

Paul Keinanen
On Wed, 15 Jun 2005 15:40:22 -0800, f...@barrow.com (Floyd L.

Davidson) wrote: >The specification includes the maximum ground offset voltage >permissable. (I don't recall what it is, or how realistic it is >for common 4000 foot runs of twisted pair cable.)

It would be unrealistic to assume that the grounding electrodes of two separate buildings would stay within the -7.. +12 V common mode range at all times (especially during thunderstorms), so optoisolation should be used to keep the grounds separate. The real question is, is the 0.5 - 2.5 kV isolation found on many RS-485 cards enough or should a fiber optic cable be used instead.

>But attempting to supply a separate "signal ground", for example >via a single separate cable pair, will almost certainly result >in a poor frame ground connection instead!

You do not want a good ground connection at least not at both ends in this situation. (Floyd L. Davidson has other views ). It is quite common to use a 100 ohm resistor between the signal ground wire and the frame ground (PE) to limit the loop current. Preferably, at least one end of the connection should be floating (optoisolated) in which case the signal ground wire goes only to the C terminal of the floating interface, but there is no connection between the signal ground and frame ground (PE) at that end.

17
Floyed could be right on the copper rod thing. This is how MeshNetworking is grounded. At every point where sections of cable is spliced, the shield on both sides of the splice is bonded, and grounded to an earth ground. That is generally a copper rod driven into the ground. post18 You are presumably talking about the static drain and foil shield that wraps around all the pairs. I've seen the cables and I'll certainly acknowledge its existance.

OTOH, when I think of a telephone cable, I think of a pair. The pair is *not* grounded. In fact, FCC part 68 is quite clear on it being balanced and the balance having to be maintained.

As to the splice points, no, not all of them are grounded. They are grounded where the cable loops into a building, but not necessarily on the pole.

See Meshgrounding think it is HardWare

Post 19 When the cable is installed, at each point where a new section (roll) is started, the cables are spliced and grounded. I think you are referring to there being a ground at the network interface on a building, but that is not grounding a shield. It grounds a surge protection device, not the cable.

post20: Even if there would be a small voltage difference between the ground potential around stations A and B, the current would still be limited by the grounding resistance at each electrode. This resembles the common grounding practice which used in quite few RS-422/485 systems, in which the shield is not connected directly to the frame ground, but instead a 100 ohm resistor is used to limit the "ground loop" current. While your claims about grounding the telephone cable at every 1-2 km is believable, it does not justify your claim that RS-485 cables can be directly grounded (without current limiting resistors) at both ends in all cases.

post43 You keep saying this, but it's wrong. If you won't believe us, use Google to do some searching. A few seconds of searching turned up: http://www.hw-server.com/rs232_signals.html

It's about RS-232, but the grounding issue under discussion is the same (except it's worse with RS-232, since ground differences are seen as signal). I'll quote a section:

1 Protective Ground Name: AA Direction: - CCITT: 101

This pin is usually connected to the frame of one of the devices, either the DCE or the DTE, which is properly grounded. The sole purpose of this connection is to protect against accidental electric shock and usually this pin should not be tied to Signal Ground.

This pin should connect the chassis (shields) of the two devices, but this connection is made only when connection of chassis grounds is safe (see ground loops below) and it is considered optional.

Ground loops are low impedance closed electric loops composed from ground conductors. When two grounded devices are connected together, say by a RS-232 cable, the alternating current on the lines in the cable induces an electric potential across the ends of the grounding line (either Protective Ground or Signal Ground), and an electric current will flow across this line and through the ground.

Since the loops impedance is low, this current can be quite high and easily burn out electric components. Electrical storms could also cause a burst of destructive current across such a loop. Therefore, connection of the Protective Ground pin is potentially hazardous. Furthermore, not all signal grounds are necessarily isolated from the chassis ground, and using a RS-232 interface, especially across a long distance, is unreliable and could be hazardous. 30 meters is considered the maximum distance at which the grounding signals can be connected safely. <<

I repeat: what you keep proposing makes no sense. I can only presume that you're confusing this issue with something else entirely.

Consider what happens when lightning strikes one location - local ground potentials go *nuts*. Your (apparent) connection between two local ground systems will try to connect them together, and it will lose. Bigtime.

You've mentioned telephone system cabling: I'm no expert, but I had thought telephone cables were current-driven loops, with the power supplied by a -48V supply and a local ground *at one end*. Perhaps this is only the subscriber loop. For *very* long trunk cable runs, I have seen what you describe - shield connected to local ground via a dirty great grounding pole - but I had understood that the series impedance of the shield was quite high, which is what saved it from becoming a very long and expensive fuse. This is not what we're discussing here (the need for all RS-485 signals to be within a defined common-mode range).

Steve http://www.fivetrees.com

lanarcam
(http://www.spheresystems.com.au/RS485.html)

77 Common mode voltage floating
> RS-485 is a differential (balanced) system, and there is no > signal ground connection. The cable used might well include a > frame ground, but that is for noise induction cancellation, not > signal ground.

In my experience, the third/fifth wire is required to limit the common mode voltage seen by the receivers. In that respect, it is a signal ground. IIRC, most receivers them can only tolerate 8-12V common-mode DC. If you let the two devices float with respect to each other, you can get fairly high common-mode voltages and the recievers will stop working.

post78 :That is a frame ground, and not a signal ground. It will carry no signal current at all. And any variation of current seen will be strictly noise. The trick is to get the induction into the ground wire to then, in the cable between the ground wire and the signal pairs, cancel the induction into the signal cables.

What kind of distances have you tried that with? I'd expect that across the room or around the bend might be just fine (and wouldn't be needed because the offset between the ground systems wouldn't be high enough to be a problem). But if this went down the road 3000-4000 feet, and you actually did get a ground offset high enough to be a problem, using a single wire in the same cable to equalize the ground potential should add enough noise to your cable run to make it a real problem.

A proper ground on each would be much better. And a cable sheath that is properly grounded at *both* ends, to the same single point building ground that the RS-485 equipment is tied to, would be the preferred way to make sure there wasn't too much common mode difference.

A well grounded cable sheath, at both ends, almost certainly will correct the problem. Which is to say, I've never seen it fail, but have seen instances where it was not as good as we'd have liked to see. Invariably that has to do with inability to get a good ground connection. But it *is* good enough for RS-485, as long as the ground systems for equipment on both ends are in fact connected to the ground system the cable is attached to. Multiple grounds won't do, even if they are relatively good. The cable and the equipment both must be tied separately to a single building ground.

Groundwire picks up noise
Thought I'd throw my 2 cents in. I used to design systems like this back in the 80's and you should be aware that there is always the potential that you could cross power grids. I worked on a project where the same company had 2 buildings across the street from each other and they were on seperate power grids. The grid different was not in volts, but in 10's and 100's of volts. It was something we never expected but it's real, and your ground wire won't protect against this.

dbrown

"Floyd L. Davidson"  wrote in message news:87u0jzjav2.fld@barrow.com...

- Hide quoted text - - Show quoted text - > Grant Edwards  wrote: >>On 2005-06-15, Floyd L. Davidson  wrote:

>>> RS-485 is a differential (balanced) system, and there is no >>> signal ground connection. The cable used might well include a >>> frame ground, but that is for noise induction cancellation, not >>> signal ground.

>>In my experience, the third/fifth wire is required to limit the >>common mode voltage seen by the receivers. In that respect, it >>is a signal ground. IIRC, most receivers them can only tolerate >>8-12V common-mode DC. If you let the two devices float with >>respect to each other, you can get fairly high common-mode >>voltages and the recievers will stop working.

> That is a frame ground, and not a signal ground. It will carry > no signal current at all.

> And any variation of current seen will be strictly noise. The > trick is to get the induction into the ground wire to then, in > the cable between the ground wire and the signal pairs, cancel > the induction into the signal cables.

> What kind of distances have you tried that with? I'd expect > that across the room or around the bend might be just fine (and > wouldn't be needed because the offset between the ground systems > wouldn't be high enough to be a problem). But if this went down > the road 3000-4000 feet, and you actually did get a ground > offset high enough to be a problem, using a single wire in the > same cable to equalize the ground potential should add enough > noise to your cable run to make it a real problem.

> A proper ground on each would be much better. And a cable > sheath that is properly grounded at *both* ends, to the same > single point building ground that the RS-485 equipment is tied > to, would be the preferred way to make sure there wasn't too > much common mode difference.

81
really don't understand what you're talking about. The differential receiver inputs can deal with only a few volts of common mode DC voltage. You have to use a ground that's common between the transmitters and receivers to make sure that the common-mode DC voltage seen by the receivers is within spec.

> What kind of distances have you tried that with?

A couple kilometers.

> I'd expect that across the room or around the bend might be > just fine (and wouldn't be needed because the offset between > the ground systems wouldn't be high enough to be a problem). > But if this went down the road 3000-4000 feet, and you > actually did get a ground offset high enough to be a problem, > using a single wire in the same cable to equalize the ground > potential should add enough noise to your cable run to make it > a real problem.

It didn't seem to.

> A proper ground on each would be much better.

Not allowed for safety reasons. The RS-485 transceivers at both ends are optically isolated from earth.

> And a cable sheath that is properly grounded at *both* ends, > to the same single point building ground that the RS-485 > equipment is tied to, would be the preferred way to make sure > there wasn't too much common mode difference.

Nope. The cable sheild is earth ground at one end or the other and can't be electrically connected to the RS-485 signal or "ground" signals.

82 Signal ground and differential signals
It's a frame ground. A signal ground would be a return path to ground for the signal. RS-232 has such a signal, and is "single ended", hence all signal lines share the same common ground return line.

Differential ciruits are "balanced", the signal is between the two wires of a pair. Neither of them is at ground, so neither is called a "signal ground". The signal does not depend on any relationship to ground.

If course, the receiver typically cannot tolerate a common mode voltage greater than some specified voltage. That that is not a signal voltage in any way. It just biases the devices out of their useful dynamic range.

Optical isolators are are nice because they have a significantly higher "useful dynamic range". Otherwise, the signal on the cable is still the same.

Yes. You also have to be very careful about the currents induced into said ground connection. Do it the wrong way, and it adds noise to the signal pairs; do the right way and it will help cancel noise induced from the same source into those signal pairs.

The cable still has to be grounded at both ends. That connects your two frame grounds together too. It *should* be connected to earth ground at both ends. And that ground point *should* be a single point where *all* frame grounds for the entire building go. Typically equipment bays in a single row are strapped together, though sometimes individual racks will have separate grounds. There should be a single cable from each row (or each rack if some racks are isolated) to a common grounding point on each floor of a building. Each comm cable entrance would be considered just like an individually isolated rack, and would have its own ground cable going to the grounding point for that floor. (What this says is that the cable is *not* connected to a rack. That a rack in one row is *not* connected to a rack in a different row.  That no two rows share a single cable going to the ground point.  But often racks in one row share a ground cable, and often equipments mounted in one rack share ground wires.) Both ends of the cable should be grounded in that fashion.

83
I read this to mean that if the common modes are not grounded together the common mode volts will exceed +-7volts blowing the chips.

''The shield may be grounded at one end or the other, but the RS-485 common is not.'' Grant Edwards means by this that the optically isolated circuits should be connected to common on both ends of the RS485 circuits.

You keep talking about "frame grounds" and earth and stuff.

The RS-485 systems I'm talking about are all optically isolated from frame, chassis, and earth. If you don't connect the RS-485 commons together with the cable, then you end up with common-mode voltages out of spec. Study all you want, that's what happens in practice.

84
think RS485 problem is 2 : *) Noise over long distance cable and *) Faulty data because of different node voltage reference

To prevent noise over long distance cable, we can earth one side of the cable shield (refer to Ott, Henry, Noise Reduction Techiques in Electronic Systems).

To prevent faulty data because of different node voltage, we can use common line. But since RS485 is a differential mode protocol, we can use either A or B line as our common line.

However, if we connect using this fashion, when the master is in the idle mode, there will be floating voltage between A or B line (since nobody is driving the bus). Therefore, we connect pull-up/pull-down resistors in the A and B line (to give at least definite voltage level when nobody's driving the bus).

To make this "definite voltage level" same at the receiver / transceiver point, we need to earth their voltage reference node at the both side. I think everyone is correct here. Just the naming convention that makes confusion.

85 replies to 84
> May I summary this ?

> I think RS485 problem is 2 : > *) Noise over long distance cable and >  *) Faulty data because of different node voltage reference

> To prevent noise over long distance cable, we can earth one side of the > cable shield (refer to Ott, Henry, Noise Reduction Techiques in > Electronic Systems).

> To prevent faulty data because of different node voltage, we can use > common line.

Yes.

> But since RS485 is a differential mode protocol, we can use > either A or B line as our common line.

I don't see how you can use A or B as a "common" line.

> However, if we connect using this fashion, when the master is > in the idle mode, there will be floating voltage between A or > B line (since nobody is driving the bus). Therefore, we > connect pull-up/pull-down resistors in the A and B line (to > give at least definite voltage level when nobody's driving the > bus).

What happens when nobody is driving the bus is a (mostly) different issue. Usually solved by pulling one line to the reference/common node and the other to 5V (with respect to the reference node).

The reference node connection between the two ends is required to keep the A/B signal values being output by the transmitter within the common-mode voltage range spec for the receiver.

> To make this "definite voltage level" same at the receiver / > transceiver point, we need to earth their voltage reference > node at the both side.

You don't need to earth either one, as long as the transmitter/receiver reference nodes at the two ends are tied together.

87 Impedance at both ends needs resistor/cap in parallel
post88: No, the whole idea is that you *want* that current to flow. In particular it is the 60 Hz power line induced current that makes up most of the current flow. Keep in mind that the whole idea is to allow the current flow to generate an equal and opposite induction into the signal pairs.

post89 Paul disagrees: I don't think anyone wants 53A being carried by the shield of a signal cable. I know I certainly wouldn't like to see that happen. This is the sort of thing that we have been trying to get you to see as a real risk for some of the systems we are dealing with. I have even seen scope leads fry due to someone not respecting the earthing scheme in place (on a high power motor drive).

> Keep in mind that the whole idea is to allow the current flow to > generate an equal and opposite induction into the signal pairs.

If you are speaking of twisted pair screened cable (the type in very extensive use in my workplace) then I thought that we had already agreed that the twist in the cable cancels out most of the noise of a signal because the noise is a common mode across the pair. The screen, in this case, really does extend the shielding of the enclosure out to the plant. I am certain that these principles are in many of the books on telecommunications and electrical theory.

post90: >The screen, in this >case, really does extend the shielding of the enclosure out to the plant. I >am certain that these principles are in many of the books on >telecommunications and electrical theory.

You do realize that the "shield" effect, at 60 Hz power line frequencies, reduces noise in a cable by about 0.04 dB? In other words, it has no effect at all. I'd have to look up the numbers, but it essentially has little effect at any frequency below about 10KHz. Obviously the shield on a telephone cable is electro-magnetic fields out of the cable.
 * not* there to reduce noise simply by keeping stray

94
>> Typically equipment bays in a single row are strapped together, >> though sometimes individual racks will have separate grounds. >> There should be a single cable from each row (or each rack if >> some racks are isolated) to a common grounding point on each >> floor of a building.

>You keep talking about "frame grounds" and earth and stuff.

It's necessary to grasp the difference in what "ground" is, and I'm not really aware of what your exposure to it is. I was assuming that since you wanted to talk about RS-485 at the hardware level that you'd probably been exposed to all of this, but wouldn't necessarily have remembered it or found any of it significant. In that case, simply using the vocabulary correctly will enforce a proper set of definitions on the discussion.

But if you aren't into electricity for the sake of electricity... yeah, this starts getting to sound like word soup! Sorry about that.

>The RS-485 systems I'm talking about are all optically isolated >from frame, chassis, and earth. If you don't connect the RS-485 >commons together with the cable, then you end up with >common-mode voltages out of spec. Study all you want, that's >what happens in practice.

What you are doing will result in equalizing the common mode DC offset from different grounds. It is *not* the best way to do it, simply because it can (not necessarily, but *can*) cause just as many problems as it solves. Done properly, you don't have trouble with 1) common mode offset, 2) induced AC and other transient, or 3) lightening surges. But any of those can be handled in other ways... which increase the potential for trouble with one of the others.  The shorter the cable run, and the fewer hazards it is exposed to, the fewer problems.  Hence it can easily be done in ways that are not the best, and yet work very well for years.  But that doesn't mean those methods are "correct".

>I don't care what you do with the cable shield, and frame >grounds and chassis grounds, but they aren't connected to >RS-485 common.

They should be. But you've got two different circuits you are talking about too. One on each side of the optical isolation. On one side the common mode range is narrow, and on the other is is very high. The isolators are used over the cable, so ground potential offset is not a problem (because the offset voltage will never approach the common mode limit for the optical isolators). On the other side, they are *all* connected to a common ground, if they are properly engineered.

Links
* http://www.hw-server.com/rs232_signals.html * http://www.spheresystems.com.au/RS485.html * RS485, ["RS485"]