EmbeddedRelated.com
Forums
Memfault Beyond the Launch

RS485 over optical fiber cable

Started by pozz October 30, 2018
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?
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.
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.
Il 30/10/2018 15:26, raimond.dragomir@gmail.com ha scritto:
> mar&#539;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.
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&#539;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.
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
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.
On Tue, 30 Oct 2018 07:26:31 -0700 (PDT), raimond.dragomir@gmail.com
wrote:

>mar&#4294967295; 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
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
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!!

Memfault Beyond the Launch