• RS485 over optical fiber cable

    From pozz@pozzugno@gmail.com to comp.arch.embedded on Tue Oct 30 15:00:00 2018
    From Newsgroup: comp.arch.embedded

    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?
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From raimond.dragomir@raimond.dragomir@gmail.com to comp.arch.embedded on Tue Oct 30 07:26:31 2018
    From Newsgroup: comp.arch.embedded

    marți, 30 octombrie 2018, 16:00:06 UTC+2, pozz a scris:
    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?
    9600bps, 500m, RS485.
    It's all you need.
    Probably you also need galvanic isolation. Use optocouplers.
    Use three wires, A,B,C. C is the common ground for ONLY RS485 communication, isolated on ALL ends.
    I also use small 5V:5V DC/DC converters on all nodes to isolate the RS485 part. --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Chris@c@b.a to comp.arch.embedded on Wed Oct 31 12:16:50 2018
    From Newsgroup: comp.arch.embedded

    On 31/10/2018 1:00 am, 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?

    Depending on your idea of 'low cost' we've used these with great
    success: <https://www.moxa.com/product/TCF-142.htm>

    But for 500m and cheap, I'd also go with a solution like Raimonds (other reply).

    --
    Cheers,

    Chris.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From pozz@pozzugno@gmail.com to comp.arch.embedded on Wed Oct 31 12:41:54 2018
    From Newsgroup: comp.arch.embedded

    Il 30/10/2018 15:26, raimond.dragomir@gmail.com ha scritto:
    marți, 30 octombrie 2018, 16:00:06 UTC+2, pozz a scris:
    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?

    9600bps, 500m, RS485.
    It's all you need.
    Probably you also need galvanic isolation. Use optocouplers.
    Use three wires, A,B,C. C is the common ground for ONLY RS485 communication, isolated on ALL ends.

    Do you use CAT5E cable and connect A and B to a couple?
    What's about termination resistor? In the past I used very small RS485
    links (under 100m) with low bitrate (maximum 38400bps), so I never used termination resistor.

    I think I need it for 500m link. Is the usual 120R ok?


    I also use small 5V:5V DC/DC converters on all nodes to isolate the RS485 part.



    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From raimond.dragomir@raimond.dragomir@gmail.com to comp.arch.embedded on Wed Oct 31 05:55:44 2018
    From Newsgroup: comp.arch.embedded

    miercuri, 31 octombrie 2018, 13:41:58 UTC+2, pozz a scris:
    Il 30/10/2018 15:26, raimond.dragomir@gmail.com ha scritto:
    marți, 30 octombrie 2018, 16:00:06 UTC+2, pozz a scris:
    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?

    9600bps, 500m, RS485.
    It's all you need.
    Probably you also need galvanic isolation. Use optocouplers.
    Use three wires, A,B,C. C is the common ground for ONLY RS485 communication, isolated on ALL ends.

    Do you use CAT5E cable and connect A and B to a couple?
    What's about termination resistor? In the past I used very small RS485 links (under 100m) with low bitrate (maximum 38400bps), so I never used termination resistor.

    I think I need it for 500m link. Is the usual 120R ok?


    I also use small 5V:5V DC/DC converters on all nodes to isolate the RS485 part.
    Never used termination resistors either, even with networks up to 1km.
    I also use only baudrates up to 38400bps, usually 9600.
    I'm sure about these combinations:
    1000m/9600
    500m/38400
    All without termination resistors.
    Never used CAT cables for RS485 but I heard it's possible. If I remember correctly, the termination for CAT5 should be 100R.
    I'm using "normal" multi-wire cables, not even twisted, but shielded. Connect the shield in only one place, to earth. If you don't know where you have a good earth, connect to the biggest metal enclosure which has an earth screw :-) Don't connect the shield to any electrical ground. The ground of the RS485 (C) is a floating ground.
    With this opto-isolated RS485 system I never had headaches in very harsh environments.
    Don't trust the saying that says the RS485 is a two wire connection. It's not. It's three wire. Make sure A,B,C is connected only to A,B,C. Treat the C as a signal wire, don't use the shield of the cable for it. Don't connect the C to anything else.
    I hope this will help you.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Grant Edwards@invalid@invalid.invalid to comp.arch.embedded on Wed Oct 31 14:03:20 2018
    From Newsgroup: comp.arch.embedded

    On 2018-10-31, pozz <pozzugno@gmail.com> wrote:

    I think I need it for 500m link. Is the usual 120R ok?

    The terminating resistor value is chosen to match the cable's
    impedance.
    --
    Grant Edwards grant.b.edwards Yow! I think my career
    at is ruined!
    gmail.com
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Robert Wessel@robertwessel2@yahoo.com to comp.arch.embedded on Wed Oct 31 09:11:22 2018
    From Newsgroup: comp.arch.embedded

    On Tue, 30 Oct 2018 15:00:00 +0100, pozz <pozzugno@gmail.com> 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?


    External converters of that sort used to be fairly common, but rather
    less so these days. If you have a handful of installations with
    problems they might make sense, but are pricey otherwise. Black Box
    at least still lists one in their catalog:

    https://www.blackbox.com/en-us/store/Detail.aspx/Async-RS232-RS422-RS-485-Extender-over-Fiber---DB25-Female-ST/ME610A-US

    Another vendor:

    http://datainterfaces.com/FRM220-SERIAL-ST002.aspx

    If you're looking to embed this into your device, then you really
    ought to back up to the UART, and then put the fiber transceiver on
    the UART's RX and TX. Something along the lines of a Broadcom
    AFBR-59F2Z (just one example) would work, although that particular
    device has LVDS RX/TX inputs/outputs. Converting that to the single ended/common mode signaling from the typical UART is not hard, but
    will require some work, you might be able to find a more directly
    usable device.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mat Nieuwenhoven@mnieuw@zap.a2000.nl to comp.arch.embedded on Wed Oct 31 16:32:33 2018
    From Newsgroup: comp.arch.embedded

    On Tue, 30 Oct 2018 07:26:31 -0700 (PDT), raimond.dragomir@gmail.com
    wrote:

    marÈ i, 30 octombrie 2018, 16:00:06 UTC+2, pozz a scris:
    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?

    9600bps, 500m, RS485.
    It's all you need.
    Probably you also need galvanic isolation. Use optocouplers.
    Use three wires, A,B,C. C is the common ground for ONLY RS485 communication, isolated on ALL ends.
    I also use small 5V:5V DC/DC converters on all nodes to isolate the RS485 part.

    I second this, use optocouplers. 40 years ago we used this to drive
    printers like the Centronics 306. With a current loop system to carry
    1200 bd over (if I remember correctly) max >4 km with dual twisted
    pair low-capacity cable, screened, in a very noisy environment. Using
    dual optocouplers in the peripherals, one wire pair carried data to
    the peripheral (driving a led in the optocoupler there), the other
    pair sensed whether the peripheral was driving its led (for
    offline/busy). Worked like a charm. Of course the screen was only
    connected at one side (computer).

    Mat Nieuwenhoven


    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From John Speth@johnspeth@yahoo.com to comp.arch.embedded on Wed Oct 31 09:35:06 2018
    From Newsgroup: comp.arch.embedded

    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. 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. I find it hard
    to believe that an appropriately sized resistor is not on the top of the
    list of RS485 best practices. 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).

    JJS
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Grant Edwards@invalid@invalid.invalid to comp.arch.embedded on Wed Oct 31 16:48:17 2018
    From Newsgroup: comp.arch.embedded

    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. 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. I find it hard
    to believe that an appropriately sized resistor is not on the top of the list of RS485 best practices. 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.

    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've been dealing with customer RS485/RS422 issues for almost 30
    years, and they're almost due to missing bias/terminating resistors or
    missing signal ground.

    You can connect signal ground to Earth ground if you want, but _only_at_one_point_. Breaking that rule can start fires (yes, I've
    seen the melted, charred results of connecting signal ground or cable
    shield to Earth at to different points).
    --
    Grant Edwards grant.b.edwards Yow! Sometime in 1993
    at NANCY SINATRA will lead a
    gmail.com BLOODLESS COUP on GUAM!!
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From upsidedown@upsidedown@downunder.com to comp.arch.embedded on Wed Oct 31 22:41:43 2018
    From Newsgroup: comp.arch.embedded

    On Tue, 30 Oct 2018 07:26:31 -0700 (PDT), raimond.dragomir@gmail.com
    wrote:

    mar?i, 30 octombrie 2018, 16:00:06 UTC+2, pozz a scris:
    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.

    If the stations are in different buildings with different mains feeds
    and/or separate (lightning) grounding electrode, IMHO the only option
    is using fibers in order to survive lightning hits of one building
    (not hitting data cables, only mains overvoltages).

    Simple galvanic isolation (500-2500 V) is definitely not enough !


    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?

    9600bps, 500m, RS485.
    It's all you need.
    Probably you also need galvanic isolation. Use optocouplers.
    Use three wires, A,B,C. C is the common ground for ONLY RS485 communication, isolated on ALL ends.
    I also use small 5V:5V DC/DC converters on all nodes to isolate the RS485 part.

    Optoisolate 500 m within the same building is usually OK, with
    different buildings, only fibers should be used.

    "Fail safe" terminations (quotes are in the standard text :-) i.e.
    pull up/down resistors on each node and 100-120 ohm termination
    resistors at both end of the bus should be used. The resistors are
    very important, since a 2 wire system goes three-state between message exchanges.

    If two pairs are available, use properly terminated RS-422 for
    point-to-point or 4 wire RS-485 in which case the master Tx pair the
    Tx is always on (improving noise immunity) or in multidrop slaves the
    other pair is actively driven only when the addressed slave wants to
    transmit.

    For 500 m, forget about using Rx/Tx transceiver common mode (+12/-7 V)
    range only without isolation.

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From upsidedown@upsidedown@downunder.com to comp.arch.embedded on Fri Nov 2 06:52:31 2018
    From Newsgroup: comp.arch.embedded

    On Wed, 31 Oct 2018 12:16:50 +1100, Chris <c@b.a> wrote:

    On 31/10/2018 1:00 am, 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?

    Depending on your idea of 'low cost' we've used these with great
    success: <https://www.moxa.com/product/TCF-142.htm>

    Since standard Ethernet components are cheap these days, one option to
    consider is running the 500 m with suitable ethernet fiber components
    and at the remote end install Ethernet/RS-485 converter. If there is
    only one station at the remote site, an even cheaper Ethernet/RS-232
    converter could be used.


    But for 500m and cheap, I'd also go with a solution like Raimonds (other >reply).

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From pozz@pozzugno@gmail.com to comp.arch.embedded on Fri Nov 2 14:36:53 2018
    From Newsgroup: comp.arch.embedded

    Il 31/10/2018 17:35, John Speth ha scritto:
    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.  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.  I find it hard
    to believe that an appropriately sized resistor is not on the top of the list of RS485 best practices.  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).

    The model of the link can be a simple resistor or a transmission line.

    The termination resistor is needed if the link can't be modelized as a
    simple resistor, but as a transmission line.
    So the main question is: when the link can't be modeled as a simple
    resistor?

    For what I understood [1], it depends on two factors: the length of the
    link *and* the speed of signal (baudrate).
    Assuming 60% speed of light, 1km propagation delay is only 5us. At
    9600bps, one bit time is 104us, 20 times higher. I don't think
    termination resistor, even useful, can increase performance.

    In my experience with many "small" RS485 networks, I never used
    termination resistors. When I tried to solve some problems with
    termination resistor, I never had good results.

    [1] http://www.diit.unict.it/users/scava/dispense/II/RS485.pdf
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From pozz@pozzugno@gmail.com to comp.arch.embedded on Fri Nov 2 14:44:53 2018
    From Newsgroup: comp.arch.embedded

    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. 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. I find it hard
    to believe that an appropriately sized resistor is not on the top of the
    list of RS485 best practices. 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've been dealing with customer RS485/RS422 issues for almost 30
    years, and they're almost due to missing bias/terminating resistors or missing signal ground.

    You can connect signal ground to Earth ground if you want, but _only_at_one_point_. Breaking that rule can start fires (yes, I've
    seen the melted, charred results of connecting signal ground or cable
    shield to Earth at to different points).


    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Richard Damon@Richard@Damon-Family.org to comp.arch.embedded on Fri Nov 2 11:00:29 2018
    From Newsgroup: comp.arch.embedded

    On 11/2/18 9:44 AM, pozz 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?

    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.


    You should have the signal ground. Without it, you can not control the
    common mode voltage of the differential pairs. The receivers likely have
    a small common mode bias current, and without some form of ground
    return, the common mode bias currents will just charge up they parasitic capacitance until you get a bias voltage high enough to change that bias current, at which point the receiver is likely impaired in functionality
    if not make the system inoperable.

    There are some tricks you can do to fake the ground signal, (the
    fail-safe termination can help a lot here), but you need to be REAL
    careful about leakages to the outside world.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From raimond.dragomir@raimond.dragomir@gmail.com to comp.arch.embedded on Fri Nov 2 08:18:22 2018
    From Newsgroup: comp.arch.embedded

    vineri, 2 noiembrie 2018, 15:44:56 UTC+2, pozz a scris:
    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. 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. I find it hard
    to believe that an appropriately sized resistor is not on the top of the >> list of RS485 best practices. 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?

    Don't avoid the signal ground. As I said before, the connection is NOT two wire. The problems start when you connect non-isolated grounds. If your devices are battery powered, they are already isolated, you should be happy.
    Mains powered devices have this problem. Between sites/buildings the ground difference may be thousands of volts really at least in industrial fields. You risk to start fire as someone said it here previously.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mike Perkins@spam@spam.com to comp.arch.embedded on Fri Nov 2 15:22:42 2018
    From Newsgroup: comp.arch.embedded

    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.  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.  I find it hard
    to believe that an appropriately sized resistor is not on the top of the >>> list of RS485 best practices.  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.
    --
    Mike Perkins
    Video Solutions Ltd
    www.videosolutions.ltd.uk
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Grant Edwards@invalid@invalid.invalid to comp.arch.embedded on Fri Nov 2 18:21:55 2018
    From Newsgroup: comp.arch.embedded

    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.

    It's far easier to understand what happens when you _do_ have a signal
    ground connection.
    --
    Grant Edwards grant.b.edwards Yow! I'm using my X-RAY
    at VISION to obtain a rare
    gmail.com glimpse of the INNER
    WORKINGS of this POTATO!! --- Synchronet 3.20a-Linux NewsLink 1.114
  • From upsidedown@upsidedown@downunder.com to comp.arch.embedded on Fri Nov 2 20:42:23 2018
    From Newsgroup: comp.arch.embedded

    On Fri, 2 Nov 2018 11:00:29 -0400, Richard Damon
    <Richard@Damon-Family.org> wrote:

    On 11/2/18 9:44 AM, pozz 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?

    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.


    You should have the signal ground. Without it, you can not control the
    common mode voltage of the differential pairs. The receivers likely have
    a small common mode bias current, and without some form of ground
    return, the common mode bias currents will just charge up they parasitic >capacitance until you get a bias voltage high enough to change that bias >current, at which point the receiver is likely impaired in functionality
    if not make the system inoperable.

    As long as

    1,) There are floating power supplies (such as batteries) on each
    transceiver
    2.) There are "fail-safe" resistors from local Vcc and local Gnd
    3.) There are at least one termination resistance between A/B at the
    end of the bus.

    The link works fine without the signal ground. Each node is nicely
    biased with local Vcc 1-3 V above common bus voltage and local Gnd 1-3
    V below.

    This is OK as long as _all_ three_conditions are met.

    The other question is what this common average voltage is, especially
    if there is some external charge source. Grounding the termination
    resistance midpoint to a real physical ground through a big resistor _at_one_end_only_ will discharge any static buildup.

    Alternatively, if the cable has a common shield, connect it to real
    ground through a resistor at one end only to keep any static buildup
    from A/B.

    This works well in practice, some RS-422/485 converters (e.g. some
    Westermo) do not even provide a signal ground (C) connector :-)




    There are some tricks you can do to fake the ground signal, (the
    fail-safe termination can help a lot here), but you need to be REAL
    careful about leakages to the outside world.

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Tauno Voipio@tauno.voipio@notused.fi.invalid to comp.arch.embedded on Fri Nov 2 21:31:10 2018
    From Newsgroup: comp.arch.embedded

    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.  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.  I find it hard >>>> to believe that an appropriately sized resistor is not on the top of
    the
    list of RS485 best practices.  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 bias resistors are still necessary to handle an idle line.
    --

    -TV

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mike Perkins@spam@spam.com to comp.arch.embedded on Fri Nov 2 20:12:02 2018
    From Newsgroup: comp.arch.embedded

    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.  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.  I find it
    hard
    to believe that an appropriately sized resistor is not on the top
    of the
    list of RS485 best practices.  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
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From upsidedown@upsidedown@downunder.com to comp.arch.embedded on Sat Nov 3 00:02:41 2018
    From Newsgroup: comp.arch.embedded

    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.

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Stef@stef33d@yahooI-N-V-A-L-I-D.com.invalid to comp.arch.embedded on Fri Nov 2 23:57:19 2018
    From Newsgroup: comp.arch.embedded

    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!
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From upsidedown@upsidedown@downunder.com to comp.arch.embedded on Sat Nov 3 01:18:18 2018
    From Newsgroup: comp.arch.embedded

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

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Mike Perkins@spam@spam.com to comp.arch.embedded on Sat Nov 3 19:05:07 2018
    From Newsgroup: comp.arch.embedded

    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
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Richard Damon@Richard@Damon-Family.org to comp.arch.embedded on Sat Nov 3 17:36:26 2018
    From Newsgroup: comp.arch.embedded

    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.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From gnuarm.deletethisbit@gnuarm.deletethisbit@gmail.com to comp.arch.embedded on Sat Nov 3 19:49:15 2018
    From Newsgroup: comp.arch.embedded

    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.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From upsidedown@upsidedown@downunder.com to comp.arch.embedded on Sun Nov 4 07:50:38 2018
    From Newsgroup: comp.arch.embedded

    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.

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From pozz@pozzugno@gmail.com to comp.arch.embedded on Mon Nov 5 09:40:43 2018
    From Newsgroup: comp.arch.embedded

    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. :-(
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Richard Damon@Richard@Damon-Family.org to comp.arch.embedded on Mon Nov 5 06:45:16 2018
    From Newsgroup: comp.arch.embedded

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

    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From Rob Gaddi@rgaddi@highlandtechnology.invalid to comp.arch.embedded on Mon Nov 5 09:12:52 2018
    From Newsgroup: comp.arch.embedded

    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.
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From peter jakacki@peterjakacki@gmail.com to comp.arch.embedded on Mon Nov 12 19:57:18 2018
    From Newsgroup: comp.arch.embedded

    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
    --- Synchronet 3.20a-Linux NewsLink 1.114
  • From upsidedown@upsidedown@downunder.com to comp.arch.embedded on Tue Nov 13 08:09:45 2018
    From Newsgroup: comp.arch.embedded

    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.

    --- Synchronet 3.20a-Linux NewsLink 1.114