RS485 is bidirectional does it mean it is fullduplex?

I was told by my professor that specification of RS485 is a half duplex RS485 four wire mode has got four pin Rx+, Rx-, Tx+, Tx-. Where the maste device Tx+ and Tx- will be connected to the slaves Rx+ and Rx respectively. Simlarly Master's Rx+ & Rx- will be connected to the slave' Tx+, Tx- . Other than the master all the device will be in receive mode, s if only there is the transmission RTS is pulled 1 and they(slaves) ca transmitt.

The master is always in receive mode and can also transmitt. In this cas the master is in the fullduplex mode, it is violating the RS48 specification! So could anyone guide me to the right direction regardin what I have understood.

This message was sent using the comp.arch.embedded web interface o

formatting link

Reply to
Swizi
Loading thread data ...

In article , Swizi writes

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.

--
Tim Mitchell
Reply to
Tim Mitchell

If you use a 4 wire connection, that is TxA to RxB in one direction (Wher A is one unit and B is another) and TxB to RxA in the other, then you ca work in full duplex. Of course B can represent a number of "outstations (32 by the original RS485 spec) and provided only one drives the bus a any given time you can still have full duplex operation.

RS485 allows you to work with a 2 wire connection between A and B. The T and RX lines are paralleled. Only one driver can drive the lines at an given time and hence it can only work in half duplex. As far as I know th RS485 spec only addresses the electrical specification and not any form o protocol that deals with half or full duplex operation.

Incidentally some manufacturers produce devices that allow up to 12 "outstations" by reducing the load of the receivers relative to th standard load of the sepcification. I once wrote an in-house app-note on the subject which you can find here

formatting link

If you want more detail, check out the references you will find th subject covered in much greater depth.

maste

slave'

s

This message was sent using the comp.arch.embedded web interface o

formatting link

Reply to
antedeluvian

Half duplex means that only one device at a time on the network can transmit.

Full duplex is when both (all) devices can transmit simultaneously.

Depending on what RS-485 interface you are using you can have half duplex or full duplex RS-485.

For half duplex you have a single twisted pair that is connected to the transmitter and to the receiver of each device. The transmitters of the devices that are not transmitting must be in high impedance.

For full duplex you have two twisted pairs. The first is connected to the transmitter of the master and to the receivers of the slaves. The second is connected to the receiver of the master and to the transmitters of the slaves.

But since you can only have one device transmitting at a given time on the same twisted pair, even in full duplex RS-485, the master must initiate the transfer by selecting a slave. Then both the master and the slave can transmit in full duplex (simultaneously).

This is purely a problem of protocol, i.e. software. RS-485 full duplex interface chips allow two devices to transmit simultaneously. You must arbitrate when you have more than one slave.

Reply to
Lanarcam

The 485 spec defines an electrical bus consisting of 2 wires and thats it. It talks about what the loads of each transceiver must be and the amount of ground difference the bus can take without causing an "off" transceiver to turn on unexpectantly. The fun thing was that they never tried to specify connectors or anything handly like that, so the spec was widely excepted and generally different from one machine to the next (though screw terminals, I suppose became the defacto standard).

The 4-wire 485 is two 485 buses where one is turned into a unidirectional transmitter bus from master to slaves. The master is generally always transmitting and the slave always receives. The other is receiver bus and is multidrop in the 485 sense (except the master usually doesn't talk in this scenario). This is a scenario I actually saw in the RS-422 spec however true RS-422 didn't have the same electrical spec as 485 (couldn't handle as many drops and had a different differential gound reference I believe, it has been a while since I looked at the spec). The benefit here is that the master should always be able to talk to the slaves, which can be handy if the return bus has a unit that won't be quiet.

Though the "RTS" has become the signal line of choice for controling this, I think your instructor is doing you a disservice by specifying it as some kind of 485 signal. It is never mentioned in the spec, just something that was handy when they started to marry these things to Serial controller chips. A lot of 485 is connected to embedded processors, that generally don't have RTS lines, it is just another digital io pin.

Tony

Reply to
T Marchini

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-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.

Finally (pedant mode on), the old RS-422/485 appellation is obsolete: strictly speaking it's now EIA-422 and EIA-485. (This may be useful to know for Googling purposes.)

HTH,

Steve

formatting link

Reply to
Steve at fivetrees

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.

Otherwise these are excellent points.

Trivia: Even more insignificant (since nobody uses it) the technically correct appellation apparently is EIA/TIA-485... but I've also seen TIA/EIA-485 and EIA/RS-485 used.

These are pretty good:

formatting link
formatting link

--
Floyd L. Davidson           
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com
Reply to
Floyd L. Davidson

This is generally true in practice.

However, if you are using floating devices and the "fail safe" termination, the system will work with 2 resp. 4 wires, since the "fail safe" resistors will force the receiver power supply Vcc and Gnd potential close to the line potential and thus, within the common mode range of the receiver (-5..+12 V). Treat the terminated system as a bidirectional current loop (through the terminating resistors) and it should be easy to analyze how this works.

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 4 wire RS-485 system is a non-standard strange thing, in which the master is (nearly) a standard RS-422 device, while all slaves are eavesdropping the RS-422 downlink but the uplink is a tri-state RS-485 configuration.

Good point.

Paul

Reply to
Paul Keinanen

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.

Paul

Reply to
Paul Keinanen

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.)

Telephone cable, which I assume is usually what longer runs of RS-485 would be on, is typically grounded every 3000 or 6000 feet (whatever the spool length is), or less if the cable run is shorter. That is the outer sheath of the cable, not an individual pair. (It isn't done often, but grounding all unused pairs at both ends will also reduce noise induction in the cable.)

--
Floyd L. Davidson           
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com
Reply to
Floyd L. Davidson

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, which will very likely cause more noise induction into the signal pairs than anything else.

The circuit impedance is 100 Ohms. It *is* a current loop... :-)

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.

--
Floyd L. Davidson           
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com
Reply to
Floyd L. Davidson

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.
--
Grant Edwards                   grante             Yow!  I know how to get the
                                  at               hostesses released! Give
                               visi.com            them their own television
                                                   series!
Reply to
Grant Edwards

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.

--
Floyd L. Davidson           
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com
Reply to
Floyd L. Davidson

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

Reply to
David Brown

I'm retired now David, but I spent 34 years making systems like this work, in a variety of environments that would best be described as mind boggling.

Not "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.)

Note the kicker at the end of that, about a bad ground. That can mean a faulty ground system, or it can simply mean that a "good ground" is simply not available.

Lets not get too far from reality here. If it was 100's of volts somebody has a *very* serious fault in the electrical system.

On the other hand, up to 10 volts is not rare at all.

I'm not sure which "your ground wire" you are referencing. A single wire in the same sheath as the twisted pairs used for data, won't "protect" against it for the reasons that I stated. It will probably add more noise to the data circuits, and do little else. If the ground systems are really bad it might actually equalize the offset though.

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.

Typically, telephone equipment cannot be adjusted for more than about 20 volts of ground difference. That's the range of adjustment provided on most equipment (typically that would be something referred to as an emx unit, or as dx signaling).

And of course that is with much slower data and much higher voltages than RS-482.

--
Floyd L. Davidson           
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com
Reply to
Floyd L. Davidson

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.

What current?

I 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.

A couple kilometers.

It didn't seem to.

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

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.

--
Grant Edwards                   grante             Yow!  A shapely CATHOLIC
                                  at               SCHOOLGIRL is FIDGETING
                               visi.com            inside my costume...
Reply to
Grant Edwards

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.

You do not want a good ground connection at least not at both ends in this situation. 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.

Paul

Reply to
Paul Keinanen

The ground wire does not carry any signal current. The signal ground C is required to supply the bias current.

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.

If you just connect the A wire to one base and the B wire into the other base, there would be at least one reverse biased junction in the path between A and B and no bias current would be available and the receiver would not work.

If there is the ground return, the bias current from either A or B wire would flow into the NPN transistor base, then through the constant current resistor and back to C and the stage will now operate.

The other alternative is that the "fail-safe" termination is used, in which case a large resistor is connected from receiver Vcc to one base of the differential stage, the transmission line termination resistance (typically 100-120 ohms) is connected between the transistor bases and a large resistor is connected from the other base to local DC ground. There is a small current flowing through the voltage divider biasing the differential stage properly.

When the A and B wires are connected to the ends of the terminating resistor, a large signal current will flow in either direction depending of the signal being transmitted and hence the voltage between the transistor bases will also change and the signal can be recovered. The large bias resistors from Vcc to one input and from the other input to DC ground will help to keep the floating receiver DC supply close to the signal pair average potential and hence within the common mode range.

In this configuration only two wires are required. No signal grounds 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.

Paul

Reply to
Paul Keinanen

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.

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.

IIRC, the original RS-422 specification did not contain specifications for tri-stating the transmitter, so doing it directly would be a bit 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).

Paul

Reply to
Paul Keinanen

I don't have a lot of experience with thunderstorms, so I can't really comment on that. Otherwise, that simply is not true.

You *absolutely do* want a good ground connect at both ends.

There is no "signal ground wire". What are you talking about?

I'm sorry, that is just not true, other than optisolation is not a bad thing.

--
Floyd L. Davidson           
Ukpeagvik (Barrow, Alaska)                         floyd@barrow.com
Reply to
Floyd L. Davidson

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.