EmbeddedRelated.com
Forums
Memfault State of IoT Report

Industrial RS485 converters

Started by pankajpatro703 5 years ago12 replieslatest reply 5 years ago216 views
I require to set up a RS485 connection for a long distance(about 700m) between an ARM cortex M controller and a sensor. I need a UART to RS485 converter but I'm not sure if the tranceiver ICs are capable of providing long distance communication. USB to RS485 and RS232 to RS485 converters seem more promising, in which case I will need another converter for UART.
What would be the most industry acceptable and efficient product/solution for my requirements?
[ - ]
Reply by KocsonyaOctober 9, 2019

Driving the wire on its own is not a major issue. Of course you need proper impedance matching termination at both ends. You will have a limited data rate; maybe 115.4kbaud, if you're doing it right and you the cable is not some very low-end junk. For a simple sensor the speed limit might not matter, though. You don't need to worry about the driver chips - if they are withing the specs dictated by the standard, they will be able to drive the wire.

The problem with the 700m is that over such long distance the ground potential might be significantly different and your transceivers might get out of their common mode range.

If your sensor is powered from the cable and is not electrically connected to its surrounding (that is, it is actually insulated from everything, including humans!!!) then that is not a problem, all you need is RS485 driver chips slapped to the UART of you micros and you're done.

If your sensor cannot be insulated and/or is not powered from the cable, then the usual solution is to make your transceivers isolated on at least one, often both ends. That is extra circuitry, as you need isolation for the signals (usually using optos) and an isolated power source (usually a small fly-back switch mode). That is a relatively low cost solution.

Ethernet is also limited in distance. Cat-5 twisted pair works for 100m. For longer distances, you need fibre, which might be a tad expensive for monitoring a sensor. You can have Ethernet to coax which might help, or some sort of modem a la ADSL. These solutions, though, might turn out to be extremely complex and expensive compared to RS485.

You can also go RF, but as with all RF comms, 100% availability is not guaranteed, packets can and do get lost all the time. 700m is long enough to warrant either high power (which might not be legal) or some sort of spread spectrum (e.g. LoRa). But again, that is much more complex HW and orders of magnitude more complex firmware than RS485.

Good old RS232 and RS485 might be slow and primitive fossils, but they are cheap and simple. Which is why they're still around in an era where seemingly every shirt button has a built-in sensor and Bluetooth so that it can send a warning to your mobile that the thread holding it is getting loose...


[ - ]
Reply by pankajpatro703October 9, 2019

@Kocsonya, thanks for replying. I need to connect sensors that communicate on RS485 to the microcontroller. The distance can go low upto 250m in most cases. 

[ - ]
Reply by beningjwOctober 9, 2019

I'm not sure why you would have the microcontroller separated by that large a distance from it's sensor. You would be better off converting the sensor data to ethernet and moving it to the microcontroller that way. For something that far away, I would probably put the microcontroller right on the sensor or use a Wi-Fi module like the ESP32 to get the sensor data and then place it on a network.

[ - ]
Reply by pankajpatro703October 9, 2019

I need to connect multiple sensors to the main controller, so if I were to go adding controllers to each sensor, the cost increases.

[ - ]
Reply by mr_banditOctober 9, 2019

You can get mini-pro's on amazon for a low price. 

I am kind of surprised nobody has specifically mentioned Zigbee or other mesh RF solutions. (Others mentioned RF, but no specific methods.)

You also have a cost in the cable itself over such a distance. Also the cost of running that much cable. 

What kind of thing are you sensing, and why do you need to run 700m to your system? Why cannot bring the ARM controller near the sensor?

And how many sensors?

[ - ]
Reply by matthewbarrOctober 9, 2019

That's a long distance, which will probably limit your data rate. The fact that you are point to point (vs. multi drop) should help.

I'm puzzled about your UART vs. USB or RS232 comment. The RS485 driver/receiver characteristics and related distance vs. data rate limitations shouldn't depend on the signal level or protocol on the non-RS485 side.

The USB converter you mention probably contains something like an FTDI chip that gives you a USB <-> UART function, with an RS485 transciever to go from the single-ended low voltage UART signal to differential RS485 levels. In terms of RS485 speed and distance limitations, this should be no different from connecting your own UART signals to an equivalent RS485 transceiver.

[ - ]
Reply by pankajpatro703October 9, 2019

Thanks @matthewbarr.

There will be more than one sensor, so there will be a multi drop. The low data rate is fine.

About the converters, I just wanted to know which one is a more failsafe option with the microcontroller, in case someone has tried it before.

I have heard of some heating issues in the transceivers. It would be helpful if you can be specific about the transceiver/converter.

[ - ]
Reply by matthewbarrOctober 9, 2019

With high speed differential line drivers, typically a vast majority of the current and power dissipation is associated with driver stage. At high data rates the drivers have to swing from rail to rail with sharp and symmetric rise/fall times, while driving the external load.

Your power dissipation will depend on data rate (frequency) and at this distance you won't be running very fast, so I'd expect you won't have power dissipation problems.

Have you considered CANbus? It is designed to solve your problem in automotive and industrial environments, it supports your distance requirement at respectable data rates, and is cabled with terminations. There is a lot of robustness designed into today's off-the-shelf CANbus compliant controllers, you won't get this with RS485 and a UART. There's also a wealth of example software drivers and demo projects from various SoC vendors. Hopefully your RS485 requirement is not a hard (and perhaps not so well chosen) mandate from above.

Kudos to Kocsonya for pointing out the ground offset isolation issue. This same issue exists in CANbus, and isolated CANbus transceivers and application examples are ready available from different vendors.

[ - ]
Reply by CustomSargeOctober 9, 2019

At 700m (~3000') you're quite limited in speed, regardless the cable used. Also cost of cable will be high or a deal breaker. I like the ethernet conversion way, but radio is another option. Being a sensor, it's simplex (1 way) a fair number of RF data radios will do. I found this on Amazon:

MakerFocus 2pcs NRF24L01+PA+LNA Wireless Transceiver RF Transceiver  It's $10 and 800+m LOS. It's 1 idea, there seem to be a Lot of them. Use an Arduino to read and send. Having an Arduino at both ends with a transceiver link Really opens up possibilities.

The 800+m also looks like using omnidirectional antennas, you could add a Lot of distance / signal strength with a yagi or parabolic. Yagis are plentiful and priced well.

[ - ]
Reply by pankajpatro703October 9, 2019

Thanks for replying @CustomSarge.

Alas, the sensors can only communicate using RS485, so using RF would again require me to use converters. Not to mention the interference problems.

[ - ]
Reply by DilbertoOctober 9, 2019

I'm used to doing UART x RS485 with Maxim chips ( MAX1487CSA+ ), they have high protection  against electrostatic discharge ( 15kV ), are short circuit protected and fail-safe ( a 'one' logic is guaranteed in the bus if transmitter input is open circuit ).

Texas ( TI ) also have very good RS485 transceivers, including isolated ones, see http://www.ti.com/isolation/isolated-rs-485/overvi....

TI also has an interesting App Note about RS485 I think it's worthwhile to read :

http://www.ti.com/general/docs/litabsmultiplefilel...

As others said, you must balance cost against technical factors like data rate, bus loading, cable quality, distance, power supply, etc.

Try to locate other app notes and get more insight about the matter before to decide what solution you'll be stuck on.

Cheers!

[ - ]
Reply by sreenivasa_charyOctober 9, 2019

If you are looking for robust  and fail-safe RS485 converters for long distance, then i would recommend the Advantech ADAM-485 industrial grade serial to RS485 converter. I have used this and can vouch for its stability. However, although the device accepts +/- 5V signal swing,  the micro controller side needs to have a proper serial RS232 interface (+/- 12V signal swing) which means you have to put a TTL to Rs232 level converter before the device. All that may cost you a little, and lastly, it is also a powered device, so you need to provide anything between 10V to 30V supply to the device. 

So if your micro controller box is in a location where power supply is not a challenge, you can go for this setup. Let me warn you in advance, the ADAM is NOT cheap, but is very robust in communication. And since it is only one set, you may want to look at this investment to avoid worries.

with ADAM on the micro controller side, on the sensor can you use any commercial RS485 transceiver and make sure the termination resistance is in place.  

Memfault State of IoT Report