EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

RS485 over optical fiber cable

Started by pozz October 30, 2018
On 02/11/2018 19:31, Tauno Voipio wrote:
> On 2.11.18 17:22, Mike Perkins wrote: >> On 02/11/2018 13:44, pozz wrote: >>> Il 31/10/2018 17:48, Grant Edwards ha scritto: >>>> On 2018-10-31, John Speth <johnspeth@yahoo.com> wrote: >>>>> On 10/31/2018 7:03 AM, Grant Edwards wrote: >>>>>> On 2018-10-31, pozz <pozzugno@gmail.com> wrote: >>>>>> >>>>>>> I think I need it for 500m link.&#4294967295; Is the usual 120R ok? >>>>>> >>>>>> The terminating resistor value is chosen to match the cable's >>>>>> impedance. >>>>> >>>>> I have no experience with long wire RS485 applications.&#4294967295; I find it >>>>> hard >>>>> to believe that an appropriately sized resistor is not on the top >>>>> of the >>>>> list of RS485 best practices.&#4294967295; I have solved so many "long" wire >>>>> problems by just adding termination resistors (in my case long >>>>> wires are >>>>> actually short but appear long due to edge speeds). >>>> >>>> And don't forget the _bias_ resistors to make sure that the line idles >>>> in the proper state when no drivers are enabled. >>> >>> Yes, bias resistors are needed, even if modern transceivers seem to >>> work well even without them (they are fail-safe even when all the >>> drivers on the bus are disabled). >>> >>> >>>> And yes, a signal ground connection is also _required_. Even though >>>> the signaling is differential, a signal ground is required to make >>>> sure you don't violate the common-mode voltage specs on the >>>> transceivers. >>> >>> I will have two battery-powered devices, connected by a RS485 link. >>> In this case, both devices are isolated from mains and Earth. >>> Do you think it's safe to avoid signal ground connection between the >>> two devices in this situation? >>> >>> It's difficult to me to understand what happens to the common-mode >>> voltage at the receiver, if its power supply (battery) is isolated >>> from the rest of the world. >> >> I might consider using two resistors in series as the 'terminating >> resistor' and to use the mid point as the receiver's ground. > > > The receiver supposes that the midpoint is in the middle between the > supplies to it (typically at 2.5 V). The differential signal is one line > at 5 V and the other at 0 V.
The Common Mode Range for RS-485 is -7V to +12V, i.e. +/-7V on top of the 0-5V signal range. A good receiver, or one that adheres to the standard should not insist on a midpoint of 2.5V
> The bias resistors are still necessary to handle an idle line.
Agreed. -- Mike Perkins Video Solutions Ltd www.videosolutions.ltd.uk
On Fri, 2 Nov 2018 18:21:55 +0000 (UTC), Grant Edwards
<invalid@invalid.invalid> wrote:

>On 2018-11-02, pozz <pozzugno@gmail.com> wrote: > >> I will have two battery-powered devices, connected by a RS485 >> link. In this case, both devices are isolated from mains and Earth. >> Do you think it's safe to avoid signal ground connection between the >> two devices in this situation? > >Yes, it's "safe" (nothing's going to melt or burst into flames and >kill people). No, I wouldn't depend on it working reliably (though it >probably will). > >> It's difficult to me to understand what happens to the common-mode >> voltage at the receiver, if its power supply (battery) is isolated from >> the rest of the world. > >There will be some sort of current leakage that will cause the the >signal ground to "float" to some voltage relative to the two signal >wires, but it's pretty difficult to predict exactly what happens.
In 230/400 V mains environment, with data lines running in parallel with mains wires for long distances, the worst that would happen is the data bus swinging between +320 V and -320 V due to capacitive coupling.As long as the data isolation voltage is larger than that swing, who cares. In practice the resultant capacitive field from a mains _cable_, is much less since much of the external field is canceled by the neutral or other phases and the coupled voltages are much lower.
>It's far easier to understand what happens when you _do_ have a signal >ground connection.
Does the century old unipolar 20 mA current loop need a separate ground wire in addition to one conductor carrying current to the receiver and an other back from the receiver ? No it doesn't, look for instance at the telephone connector. RS-422/485 with a single 100 ohm terminator resistor and minimum +/-200 mV swing, is essentially a +/- 2mA bipolar current loop. In practice, the loop current is closer to +/- 20 mA and hence the voltage swing larger. Why would a current loop need a ground voltage reference ? If bipolar transistors are used to sense the voltage across the termination resistance, the issue is providing some base current to the bipolar transistors.However, with "fail-safe" resistors installed, there is a current flowing * from Vbat+ * through upper "fail-safe" resistor * to top of termination resistor * through termination resistor * from bottom of termination resistor * through other "fail-safe" resistor * into Vbat- The transistor bases can rob enough current to bias the input transistors. Do no need for a separate ground reference wire.
On 2018-11-02 Tauno Voipio wrote in comp.arch.embedded:
[...]
> The bias resistors are still necessary to handle an idle line.
With "fail safe" receivers, a termination resistor alone will keep the differential voltage low enough for the receiver to see 'idle'. But if ypou can ad bias, why not do it? Why is Pozz trying to do this without termination? On RS485, use termination! Never had trouble with termination, have had trouble without. Just remembered an occasion where I had to source a resistor in a remote location with no electronics shop anywhere nearby. And then climb a 70m ladder to install it. Then you really wonder why they originally did not install a termination resistor. :-( -- Stef (remove caps, dashes and .invalid from e-mail address to reply by mail) I have not yet begun to byte!
On Fri, 02 Nov 2018 23:57:19 +0100, Stef
<stef33d@yahooI-N-V-A-L-I-D.com.invalid> wrote:

>On 2018-11-02 Tauno Voipio wrote in comp.arch.embedded: >[...] >> The bias resistors are still necessary to handle an idle line. > >With "fail safe" receivers, a termination resistor alone will >keep the differential voltage low enough for the receiver to see >'idle'. But if ypou can ad bias, why not do it? > > >Why is Pozz trying to do this without termination? >On RS485, use termination! Never had trouble with termination, >have had trouble without.
The only case I can understand is power consumption especially in battery powered systems. There is quite lot power dissipated in the termination resistor and in drivers. This is a real problem with RS-422 in which the transmitters are always active in idle Mark state. In RS-485 the transmitter is active only when a specific node wants to transmit,otherwise all transmitters are in tree-state. Putting a big capacitor in series with the termination resistor reducing idle consumption especially in RS-422 without hurting transients,
> >Just remembered an occasion where I had to source a resistor in a >remote location with no electronics shop anywhere nearby. And then >climb a 70m ladder to install it. Then you really wonder why they >originally did not install a termination resistor. :-(
On 02/11/2018 23:18, upsidedown@downunder.com wrote:
> On Fri, 02 Nov 2018 23:57:19 +0100, Stef > <stef33d@yahooI-N-V-A-L-I-D.com.invalid> wrote: > >> On 2018-11-02 Tauno Voipio wrote in comp.arch.embedded: >> [...] >>> The bias resistors are still necessary to handle an idle line. >> >> With "fail safe" receivers, a termination resistor alone will >> keep the differential voltage low enough for the receiver to see >> 'idle'. But if ypou can ad bias, why not do it? >> >> >> Why is Pozz trying to do this without termination? >> On RS485, use termination! Never had trouble with termination, >> have had trouble without. > > The only case I can understand is power consumption especially in > battery powered systems. There is quite lot power dissipated in the > termination resistor and in drivers. This is a real problem with > RS-422 in which the transmitters are always active in idle Mark state.
Then why not use series termination as used in all low power systems I've ever come across? -- Mike Perkins Video Solutions Ltd www.videosolutions.ltd.uk
On 11/3/18 3:05 PM, Mike Perkins wrote:
> On 02/11/2018 23:18, upsidedown@downunder.com wrote: >> On Fri, 02 Nov 2018 23:57:19 +0100, Stef >> <stef33d@yahooI-N-V-A-L-I-D.com.invalid> wrote: >> >>> On 2018-11-02 Tauno Voipio wrote in comp.arch.embedded: >>> [...] >>>> The bias resistors are still necessary to handle an idle line. >>> >>> With "fail safe" receivers, a termination resistor alone will >>> keep the differential voltage low enough for the receiver to see >>> 'idle'. But if ypou can ad bias, why not do it? >>> >>> >>> Why is Pozz trying to do this without termination? >>> On RS485, use termination! Never had trouble with termination, >>> have had trouble without. >> >> The only case I can understand is power consumption especially in >> battery powered systems. There is quite lot power dissipated in the >> termination resistor and in drivers. This is a real problem with >> RS-422 in which the transmitters are always active in idle Mark state. > > Then why not use series termination as used in all low power systems > I've ever come across? >
Series termination is really only appropriate for a point-to-point system (one driver, one receiver) as it is based on the signal going to half level until it reaches the far end when the reflection makes it become full strength, and then the reflection comes back to the driving end and the termination keeps it from bouncing back, so middle points see 1/2 levels for a period until the reflection comes back. One thing that can be done is to terminate with a series R-C network so their is no idle current, but the active edge still sees the appropriate impedance to avoid reflections. You may then add a much higher resistor across the capacitor for the fail-safe bias network (with significantly higher resistances than for a pure restive termination to provide a clean DC bias in idle.
On Saturday, November 3, 2018 at 5:36:33 PM UTC-4, Richard Damon wrote:
> On 11/3/18 3:05 PM, Mike Perkins wrote: > > On 02/11/2018 23:18, upsidedown@downunder.com wrote: > >> On Fri, 02 Nov 2018 23:57:19 +0100, Stef > >> <stef33d@yahooI-N-V-A-L-I-D.com.invalid> wrote: > >> > >>> On 2018-11-02 Tauno Voipio wrote in comp.arch.embedded: > >>> [...] > >>>> The bias resistors are still necessary to handle an idle line. > >>> > >>> With "fail safe" receivers, a termination resistor alone will > >>> keep the differential voltage low enough for the receiver to see > >>> 'idle'. But if ypou can ad bias, why not do it? > >>> > >>> > >>> Why is Pozz trying to do this without termination? > >>> On RS485, use termination! Never had trouble with termination, > >>> have had trouble without. > >> > >> The only case I can understand is power consumption especially in > >> battery powered systems. There is quite lot power dissipated in the > >> termination resistor and in drivers. This is a real problem with > >> RS-422 in which the transmitters are always active in idle Mark state. > > > > Then why not use series termination as used in all low power systems > > I've ever come across? > > > > Series termination is really only appropriate for a point-to-point > system (one driver, one receiver) as it is based on the signal going to > half level until it reaches the far end when the reflection makes it > become full strength, and then the reflection comes back to the driving > end and the termination keeps it from bouncing back, so middle points > see 1/2 levels for a period until the reflection comes back.
With parallel termination doesn't every point see a significantly lower level all the time? The drivers aren't voltage sources, they still have significant series resistance, no? Rick C.
On Sat, 3 Nov 2018 19:49:15 -0700 (PDT),
gnuarm.deletethisbit@gmail.com wrote:

>On Saturday, November 3, 2018 at 5:36:33 PM UTC-4, Richard Damon wrote: >> On 11/3/18 3:05 PM, Mike Perkins wrote: >> > On 02/11/2018 23:18, upsidedown@downunder.com wrote: >> >> On Fri, 02 Nov 2018 23:57:19 +0100, Stef >> >> <stef33d@yahooI-N-V-A-L-I-D.com.invalid> wrote: >> >> >> >>> On 2018-11-02 Tauno Voipio wrote in comp.arch.embedded: >> >>> [...] >> >>>> The bias resistors are still necessary to handle an idle line. >> >>> >> >>> With "fail safe" receivers, a termination resistor alone will >> >>> keep the differential voltage low enough for the receiver to see >> >>> 'idle'. But if ypou can ad bias, why not do it? >> >>> >> >>> >> >>> Why is Pozz trying to do this without termination? >> >>> On RS485, use termination! Never had trouble with termination, >> >>> have had trouble without. >> >> >> >> The only case I can understand is power consumption especially in >> >> battery powered systems. There is quite lot power dissipated in the >> >> termination resistor and in drivers. This is a real problem with >> >> RS-422 in which the transmitters are always active in idle Mark state. >> > >> > Then why not use series termination as used in all low power systems >> > I've ever come across? >> > >> >> Series termination is really only appropriate for a point-to-point >> system (one driver, one receiver) as it is based on the signal going to >> half level until it reaches the far end when the reflection makes it >> become full strength, and then the reflection comes back to the driving >> end and the termination keeps it from bouncing back, so middle points >> see 1/2 levels for a period until the reflection comes back. > >With parallel termination doesn't every point see a significantly lower level all the time? The drivers aren't voltage sources, they still have significant series resistance, no? > >Rick C.
Most RS-485 chips can deliver at least +/-20 mA, so there is +/-1 V across the 100//100 ohm termination, Long wires with high resistance will reduce this. The threshold is +/-0.2 V. While the voltage is lower, significant current will flow and power dissipated. This is a brute force method, but helps keeping the interference out of the connection by improving signal-to-noise ratio.
Il 02/11/2018 23:57, Stef ha scritto:
> On 2018-11-02 Tauno Voipio wrote in comp.arch.embedded: > [...] >> The bias resistors are still necessary to handle an idle line. > > With "fail safe" receivers, a termination resistor alone will > keep the differential voltage low enough for the receiver to see > 'idle'. But if ypou can ad bias, why not do it? > > > Why is Pozz trying to do this without termination? > On RS485, use termination! Never had trouble with termination, > have had trouble without.
I try to clarify my questions on termination resistors. I can really use them. The higher power dissipation is interesting in my battery-powered application, but I think I will have enough energy. So this isn't a problem. I will use a termination resistor on both sides. My concerns were on the resistor correct value. If I need a termination, I need to use a correct resistor value. Is it critical? The other problem with signal ground, I know it is better to connect it together with A and B. However it would be much more simple and cheap to use a simple couple instead of a full CAT5E cable.
> Just remembered an occasion where I had to source a resistor in a > remote location with no electronics shop anywhere nearby. And then > climb a 70m ladder to install it. Then you really wonder why they > originally did not install a termination resistor. :-(
On 11/5/18 3:40 AM, pozz wrote:
> Il 02/11/2018 23:57, Stef ha scritto: >> On 2018-11-02 Tauno Voipio wrote in comp.arch.embedded: >> [...] >>> The bias resistors are still necessary to handle an idle line. >> >> With "fail safe" receivers, a termination resistor alone will >> keep the differential voltage low enough for the receiver to see >> 'idle'. But if ypou can ad bias, why not do it? >> >> >> Why is Pozz trying to do this without termination? >> On RS485, use termination! Never had trouble with termination, >> have had trouble without. > > I try to clarify my questions on termination resistors. > > I can really use them. The higher power dissipation is interesting in my > battery-powered application, but I think I will have enough energy. So > this isn't a problem. > > I will use a termination resistor on both sides. My concerns were on the > resistor correct value. If I need a termination, I need to use a correct > resistor value. Is it critical?
Most twisted pairs are around 100 Ohms, so you use a terminating resistor near there. Being slightly off isn't normally an issue, it just says that you get a bit of a reflection. RS485 isn't that high speed (or fast edge rate) so that makes things even a bit less critical, and ring tolerances higher.
> > The other problem with signal ground, I know it is better to connect it > together with A and B. However it would be much more simple and cheap to > use a simple couple instead of a full CAT5E cable. > >
As has been said, the key requirement for the ground is to keep the common mode voltage in range. This means that when using it for long distance links you need to pay attention to grounding issues, and often need to worry about isolation to avoid ground currents.
>> Just remembered an occasion where I had to source a resistor in a >> remote location with no electronics shop anywhere nearby. And then >> climb a 70m ladder to install it. Then you really wonder why they >> originally did not install a termination resistor. :-(

The 2024 Embedded Online Conference