Reply by November 13, 20182018-11-13
On Mon, 12 Nov 2018 19:57:18 -0800 (PST), peter jakacki
<peterjakacki@gmail.com> wrote:

>Isolation (solid-state) and 2-wire is better but over long distances you need lightning protection too, and I use combinations of transzorbs, ferrite beads, polyfuses, and miniature gas discharge tube protection and in these cases there is not a ground, but there is a very good earth.
In the context of lightning protection, what is a good earth ? With two buildings with separate mains connections and individual earthing electrodes, you do not even need a direct lightning hit, just a hit to the mains leads and some arc suppressions to earth at mains entry and you have several kA flowing into the earth. With earthing resistance as low as 1 ohm, you will have a ground potential bounce of several kV in one building. I very much doubt that ordinary isolation and some protection will handle this potential difference. When connecting two buildings with individual earthing electrodes, I would definitively use some fiber.
Reply by peter jakacki November 12, 20182018-11-12
On Wednesday, October 31, 2018 at 12:00:06 AM UTC+10, pozz wrote:
> I'd like to replace an electrical cable with a fiber cable, mainly for > electromagnetic noise immunity and long distance (I need to reach 500m). > The bitrate will be very low: 9600bps is ok. > I need to keep the cost low as possible. > > I never used fiber cables before. In similar applications I used RS485 > transceivers connected to the UART peripheral of an MCU. > > I think I need a fiber optic cable transceiver, but I don't know what to > search and how to interconnect with an MCU. > > Any help?
I have converted from RS232/RS422/RS485 to single-mode fiber over tens of kilometers. In fact I had that much bandwidth for RS232 that I would just create virtual wires from the 8 signals so baud rate etc wasn't important. What changed on one end would change on the other. For megabaud RS485 rates though I would buffer the data and send it in high speed packets to reduce latency and also allows for control signals. However for short distances up to a 1000m or so I would just use TP with proper termination which is easy if it is essentially point-to-point. Most of my systems though are multidrop and I have even used 4-core phone cable to carry DC and 485 to nodes inside a building. In one of my recent designs I had about 40 nodes connected over about 15m within a large cabinet with IDC cable and with the 485 signals on the two inner pairs, communicating at 2M baud. Despite the huge amounts of electrical noise it worked perfectly. I am really surprised though to find that in 2018 people are still talking about RS485 "bias" resistors. Doesn't anyone use fail-safe type 485 chips? I use many different ones such as 65HVD75 or VP3082/3088 etc and these provide failsafe in both line open and line short conditions without the need for bias resistors. They are also 1/4 or 1/8 load and also have much more sensitive receivers that work down to an acceptable 80mV hysteresis. There are also other types that have huge common mode range. Besides many multidrop systems have problems because techs add termination and bias to nodes that "are missing it". But I'm in the two wire camp and I am fully aware of the technician's thinking that you "need a ground" and the logic that says there could be huge ground differentials also ignores the fact that if this is so, then connecting grounds/earths across these systems would and does result in huge noisy ground currents through the same cable conveying the signal, and so the systems better have a very good earth or none at all (isolated). Isolation (solid-state) and 2-wire is better but over long distances you need lightning protection too, and I use combinations of transzorbs, ferrite beads, polyfuses, and miniature gas discharge tube protection and in these cases there is not a ground, but there is a very good earth. Getting back to low speed RS485 and just how much you can get away with. I once ran RS485 at 19,200 baud multidrop over many branches of figure eight fire proof cable up and down lift wells over 26 floors and simply relied upon blindly repeating check-summed packets three times so that the master could address all lifts or groups of lifts simultaneously. Somehow it just worked and kept on working :) So no, you don't need fiber for 500m, just protect and isolate in hazardous and noisy environments. You can even get away with good optos at such a low speed and just use those tiny 4-pin isolated DC-DC converter modules to power the RS485 chip. You don't have to change anything with the MCU and UART methods. I prefer using solid-state isolators though such as the ADuM3211ARZ as they are much easier to use. BTW, without the third wire the current flow through the differential receiver's inputs and through its ground is its reference so that one input is greater or less than the other. Think of the inputs as being resistors connected to the receiver's ground. Try connected a small battery across the receiver terminals and then swapping it to change the signal, none of which requires a third wire (for the signal). LTSpice this if you are in doubt. Cheers, Peter
Reply by Rob Gaddi November 5, 20182018-11-05
On 11/5/18 12: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? > > 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. :-(
Depending on the application, you may also be able to save power by disabling the transmitter when you're not transmitting. You'll need to think about the implications for the receiver: the failsafe logic, etc. But if you're only transmitting 1% of the time, you only need to be dumping current into those termination resistors 1% of the time. -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix.
Reply by Richard Damon November 5, 20182018-11-05
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. :-(
Reply by pozz November 5, 20182018-11-05
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. :-(
Reply by November 4, 20182018-11-04
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.
Reply by November 3, 20182018-11-03
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.
Reply by Richard Damon November 3, 20182018-11-03
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.
Reply by Mike Perkins November 3, 20182018-11-03
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
Reply by November 2, 20182018-11-02
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. :-(