Forums

RS485 is bidirectional does it mean it is fullduplex?

Started by Swizi June 15, 2005
Paul Keinanen <keinanen@sci.fi> wrote:
>On Wed, 15 Jun 2005 16:04:56 -0800, floyd@barrow.com (Floyd L. >Davidson) wrote: > >>>>While this is essentially correct, I'd add: >>>> - Don't forget ground - i.e. 2-wire is actually 3-wire, and 4-wire is >>>>actually 5-wire. >>> >>>This is generally true in practice. >> >>It *can't* be true in practice. The presumption is to provide a >>signal ground, and it simply doesn't. >> >>Any attempt at providing a signal ground is merely going to connect >>frame ground between the two locations, > >DO NOT connect the frame grounds together with the data cable >(shield). This cable shield can conduct 1-100 A of AC current, which >should have otherwise gone through the neutral wire.
Every telephone cable in the country has the shield connected to ground at both ends. 100 A of AC! Where are you getting these numbers for 100's of volts and 100's of Amps?
>>which will very likely cause >>more noise induction into the signal pairs than anything else. > >10 A of dirty 50/60 Hz AC current with usually a lot of odd harmonics >(especially at 150/180 Hz in three phase systems with electronic >loads) can indeed cause a lot of interface to the data within the >cable. Exactly for this reason, the signal cable shield should NOT be >grounded at both ends.
There won't be any 10 A of "dirty 50/60 Hz AC". As I've said *every* telephone cable in the country is grounded at both ends. Take a look at every splice box you can find, and you'll see a ground wire running down the pole to a ground rod. Each and every section of cable is grounded at both ends. Whatever electric fields that may cause induction into the cable will cause significantly more (and no it will *not* be any 10 A) current in the much lower resistance shield than in the individual pairs. Plus the pair will not be grounded (although grounding spare pairs at both ends will have the same effect as grounding the shield), or at least not through as low a resistance as the shield. Hence sigificantly more current will be flow in the shield as a result of any induction. That current flowing in the shield will produce an *opposing* field, that will cancel at least some of the noise induced into the individual pairs!
>>>> - RS-422 is also multidrop (10 max drops, IIRC). >>> >>>The RS-422 impedance levels allows for multiple receivers, but I do >>>not see how a multidrop bidirectional system could be implemented >>>within the RS-422 specification. >> >>What would prevent it? It's a fairly simple 4-wire arrangement >>with a single master and 10 slaves plus a single 100 Ohm >>termination on each cable. > >IIRC, the original RS-422 specification did not contain specifications >for tri-stating the transmitter, so doing it directly would be a bit
And absolutely unnecessary too. RS-422 works on two pairs. The master transmitter and all slave receivers are on one, and the master receiver and all slave transmitters are on the other. They are *all* high impedance devices, relatively. There has to be a 100 Ohm load resistor on each pair.
>hard. However, both RS-232 and RS-422 can be used in a multidrop >configuration with a few diodes, but this would reduce the noise >margins, since the bus would only be actively driven into the Space >state, while passively pulled by bias resistors to the Mark (which >also is the idle state).
Unnecessary for RS-422. -- Floyd L. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) floyd@barrow.com
Grant Edwards <grante@visi.com> wrote:
>On 2005-06-16, Floyd L. Davidson <floyd@barrow.com> wrote: >> Grant Edwards <grante@visi.com> wrote: >>>On 2005-06-15, Floyd L. Davidson <floyd@barrow.com> 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. > >It doesn't carry any signal current, but it is the ground to >which the receiver's input signal range specs are references. >It's the ground that defines what "0V" is for the signal >inputs. I call that the signal ground.
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.
>> And any variation of current seen will be strictly noise. > >What current?
Induced current into that ground wire accompanying the signal pairs. That's why you don't want it to be one small wire if it in the same bundle as the signal pairs.
>> 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. > >I really don't understand what you're talking about. The
It is a bit complex. Many people who work with cables don't understand it very well. But any one who sits down and studies it a bit can understand it. It isn't even rocket science! ;-)
>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.
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.
>> What kind of distances have you tried that with? > >A couple kilometers.
That's a pretty good run for RS-485.
>> 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.
What kind of cable was this? Cable you installed, or telco cable?
>> 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.
The cable still has to be grounded at both ends. That connects your two frame grounds together too.
>> 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.
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. -- Floyd L. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) floyd@barrow.com
Paul Keinanen <keinanen@sci.fi> wrote:
>On Wed, 15 Jun 2005 18:26:09 -0800, floyd@barrow.com (Floyd L. >Davidson) wrote: > >>That is a frame ground, and not a signal ground. It will carry >>no signal current at all. > >The ground wire does not carry any signal current. The signal ground C >is required to supply the bias current.
There is no point in repeating what I just said.
>Assume that the receiver input stage consists of a differential pair >made up of NPN transistors. These NPN transistors require that a bias >current flows into the base in order to get a collector current >flowing and thus a meaningful output voltage from the differential >pair.
Likewise, there is no point in explaining the basics of differential comparitors. ...
>In this configuration only two wires are required. No signal grounds
Yes. Now that you've arrived at exactly what I said...
>wires nor any connection to local frame ground are required, but the >transceiver supply must be floating. The problem with this system >especially in multidrop systems is that the terminating resistors are >at the end of the bus, but the bias resistors must be used at each >station and are effectively in parallel, loading the bus. This may >limit the number of stations connected to the bus.
And this has what to do with the comment you quoted and are discussing? -- Floyd L. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) floyd@barrow.com
"Floyd L. Davidson" <floyd@barrow.com> wrote in message
news:877jguk8ql.fld@barrow.com...
> >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. > > I don't have a lot of experience with thunderstorms, so I can't > really comment on that. Otherwise, that simply is not true.
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"). Meindert
"Floyd L. Davidson" <floyd@barrow.com> wrote in message
news:873brik81n.fld@barrow.com...
> Every telephone cable in the country has the shield connected > to ground at both ends.
I can assure you that the screen of my telephone cable is NOT connected to ground on my side. Which is logical too, because you want to keep any current through the screen as low as possible and that can onlybe achieved by connecting the screen at only one side.
> And absolutely unnecessary too. RS-422 works on two pairs. The > master transmitter and all slave receivers are on one, and the > master receiver and all slave transmitters are on the other.
And all those slave transmitters should be disabled, except the one that's talking to the master.
> They are *all* high impedance devices, relatively. There has to > be a 100 Ohm load resistor on each pair. > > >hard. However, both RS-232 and RS-422 can be used in a multidrop > >configuration with a few diodes, but this would reduce the noise > >margins, since the bus would only be actively driven into the Space > >state, while passively pulled by bias resistors to the Mark (which > >also is the idle state). > > Unnecessary for RS-422.
So, if all slaves have a dominant Mark, how is one slave going to drive a Space on the line? Meindert
"Floyd L. Davidson" <floyd@barrow.com> wrote in message 
news:87br67mqp4.fld@barrow.com...
> "Steve at fivetrees" <steve@NOSPAMTAfivetrees.com> wrote: >>"Tim Mitchell" <timng@sabretechnology.co.uk> wrote: >>> RS485 is a 2-wire half duplex system where there is one transmitter and >>> multiple receivers. >>> >>> RS422 is a 4-wire duplex system which goes between two devices, each of >>> which has a transmitter and receiver. >> >>While this is essentially correct, I'd add: >> - Don't forget ground - i.e. 2-wire is actually 3-wire, and 4-wire is >>actually 5-wire. > > 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.
I'm a bit shocked at the amount of traffic this point has generated. It's fairly fundamental. If we were talking about balanced transformer-coupled audio, you'd be right. But we're not - we're talking about common-mode voltage, which is effectively +/-7V for RS-485 (on top of the 0-5V signal range, hence +12/-7V). This (small) range is fine for connections that are physically close, but really *not* fine for long lines across disparate grounds. (In the old days of RS-422, I saw a lot of fried drivers for this very reason.) In practice, one usually designs in an optically-isolated RS-485 interface, to allow the 3rd/5th wire to be explicitly connected without cross-connecting grounds. So, I repeat: one *has* to consider common-mode. That 3rd or 5th wire must be there, whether implicitly (via a common local ground) or explicitly (via a physical cable). Steve http://www.fivetrees.com
"Paul Keinanen" <keinanen@sci.fi> wrote in message 
news:vdu0b1hspo7iliauj82dv1rceenrmjav3k@4ax.com...
>> - RS-422 is also multidrop (10 max drops, IIRC). > > The RS-422 impedance levels allows for multiple receivers, but I do > not see how a multidrop bidirectional system could be implemented > within the RS-422 specification.
The first clue is in the RS-422 spec; I quote: "The driver has the capability to (...) drive up to 10 parallel connected receivers." The second clue is in the fact that many of the old RS-422 drivers had tristate control inputs. (I would agree, however, that this appears not to be mentioned in the RS-422 spec.) In any case, multidrop RS-422 was widely used. (All the comms for all the products from the company I was working for in the late 70s and 80s were done this way.) It worked. Steve http://www.fivetrees.com
On 2005-06-16, Floyd L. Davidson <floyd@barrow.com> wrote:

>>> That is a frame ground, and not a signal ground. It will carry >>> no signal current at all. >> >>It doesn't carry any signal current, but it is the ground to >>which the receiver's input signal range specs are references. >>It's the ground that defines what "0V" is for the signal >>inputs. I call that the signal ground. > > It's a frame ground.
Sorry, never heard that phrase before. I assuem "frame" and "chassis" were the same. In the installations I've dealt with the RS-485 common is certainly not chassis ground on either end.
> 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.
And you've got to somehow guarantee that the recievers common mode DC voltage is within spec. If the only DC connections to the outside world are the A/B signal lines, how is that accomplished?
> Optical isolators are are nice because they have a > significantly higher "useful dynamic range". Otherwise, the > signal on the cable is still the same.
>>> And any variation of current seen will be strictly noise. >> >>What current? > > Induced current into that ground wire accompanying the signal > pairs. That's why you don't want it to be one small wire if > it in the same bundle as the signal pairs. > >>> 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.
Are you talking about "inducing" a DC voltage?
>>I really don't understand what you're talking about. The > > It is a bit complex. Many people who work with cables don't > understand it very well. But any one who sits down and > studies it a bit can understand it. It isn't even rocket > science! ;-) > >>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. > > 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.
What "noise"? I'm talking about controlling common-mode DC level difference between the RS-485 transmitter and receiver.
>>> What kind of distances have you tried that with? >> >>A couple kilometers. > > That's a pretty good run for RS-485.
I think the spec is 10km for decent twisted pair and low baud rates (<1M).
>>> 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. > > What kind of cable was this? Cable you installed, or telco > cable?
Cable an electrician installed.
>>> 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. > > The cable still has to be grounded at both ends.
The shield may be grounded at one end or the other, but the RS-485 common is not.
> That connects > your two frame grounds together too. > >>> 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. > > 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.
What are "frame grounds" and what do they have to do with the RS-485 bus???
> 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. 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.
> 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.
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. -- Grant Edwards grante Yow! Someone is DROOLING at on my collar!! visi.com
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.  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.

Peace everyone =p

-kunil

On 2005-06-16, kunil <kunilkuda@gmail.com> wrote:
> 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. -- Grant Edwards grante Yow! Bo Derek ruined at my life! visi.com