What limits RS485 to y devices? - Page 1
Forum section: electronics / projects

author: Krumm
author_rank: Contributor
timestamp: April 11, 2016, 11:40:40 am
content: I'm doing a little project that involves wiring up a small farm with various sensors, so because of the distance involved (one building is over 700 meters away) and obviously the amount of heavy machinery and motors it's very noisy (in all senses of the word). Because of this I'm needing something that can handle long distances in a potentially very EMI heavy environment - i.e. some differential signalling. RS485 seems to be quite good, but I'm struggling to see why exactly RS485 is limited to 32 devices, or up to 256 devices with various other chips. Going out on a limb I'd say it's something to do with current, but I'm at a bit of a loss. I've got a few ideas that if this initial setup would work I would end up with more than 256 devices.Could I not just get a chip such as the DS26LS31 (http://www.farnell.com/datasheets/2005092.pdf) and the matching receiver (or a transceiver such as the DS8921) or would I still be limited in some fashion to the number of devices?I'd really appreciate a nice explaination about this or somebody to point me to a few thicko-level resources about these.Thank you.

author: glenenglish
author_rank: Frequent Contributor
timestamp: April 11, 2016, 11:55:25 am
content: Krumm, the biggest issue I think you might have is the common mode voltage differences with those sort of distances.That is, the difference between either A or B leg, and earth/return/ground whatever you want to call it.even though the system is balanced, there is still a ground referenced TX/RX in there.Most chips can take a few volts, but to be sure, you really need an isolated solution.

author: uncle_bob
author_rank: Unknown
timestamp: April 11, 2016, 12:13:36 pm
content: HiTrying to put 256 devices all on a common bus in a heavy EMI / geographically separated net .... not a good idea. Each "tap" on the net is another point for EMI to enter. Each point is another node for voltages to go out of whack (and be limited by diodes). It's painful to do, but some form of point to point generally works better than a multi drop single cable.Bob

author: Krumm
author_rank: Contributor
timestamp: April 11, 2016, 12:16:22 pm
content: Hi Glen, thanks for the reply. I'm just trying to get my head around what you've put... So, just to paraphrase, what you're saying is that the sender may start off by send +-5V through the twisted cable, but after travelling such a distance through such a heavy EMI environment, by the time it reaches the receiver, the cable may have picked up enough noise that the voltages far exceed maybe the 12V the chip can handle. Is this correct?The isolated solution sounds great, although what could I use? If I used an optoisolator, I would be losing the benefit of common mode rejection and might as well just put a 24VDC signal down the line?

author: nctnico
author_rank: Super Contributor
timestamp: April 11, 2016, 12:19:19 pm
content: The limit for the number of devices is determined by the amount of load each chip puts on the bus. If you use chips with a 1/8 load then you can put 32*8=256 devices on one bus. The length of the bus determines the maximum speed due to capacitive loading. All in all RS485 is pretty robust especially when using shielded wiring. For very long distances I recommend to make the RS485 interfaces isolated and tie the 0V of the bus (RS485 is a 3 wire bus!) to ground at 1 point. That way you don't have problems with large ground loops.Look at how profibus works on an electrical level. This is an RS485 bus used in heavy industrial environments to connect PLCs and all kinds of gear together.

author: uncle_bob
author_rank: Unknown
timestamp: April 11, 2016, 12:21:18 pm
content: Quote from: Krumm on April 11, 2016, 12:16:22 pmHiThe sending end is referenced to the ground in building A. With big piece of gear running in building A there is a lot of current into the common ground. You get 20V of "EMI" on that ground reference.Run the cable over to building B and there is nothing running there. It's ground is fine. It sees 20V of AC on the line.Run the cabe over to building C and it also has a big piece of gear pumping current into it's ground. In this case you have 20V, out of phase with the first building.Welcome to electricity on the farm.Bob

author: Krumm
author_rank: Contributor
timestamp: April 11, 2016, 12:31:29 pm
content: Thank you all for the information, it's coming in very handy... This isn't as straightforward as I imagined!... But there again what ever is.Quote from: uncle_bob on April 11, 2016, 12:13:36 pmI have uploaded an idea of point to point, I hope it makes sense! So essentially a sender and reciever inside a 'device' would only be connected on the logic side, meaning that one cable only goes from one device to the next, am I on the right lines here?

author: uncle_bob
author_rank: Unknown
timestamp: April 11, 2016, 12:35:23 pm
content: Quote from: Krumm on April 11, 2016, 12:31:29 pmHiYes, that's how a point to point system works. It's the standard solution to this problem. You see it in industrial control systems. My experience with farm systems says they are even more brutal than the normal industrial shop floor environment.Bob

author: dom0
author_rank: Super Contributor
timestamp: April 11, 2016, 12:45:45 pm
content: For these distances in such an environment (... were grounding work is probably very poor)... consider optical. If it's a one-off DIY thing you can get cheap optical transceivers from 100 MBit/s NICs.

author: Krumm
author_rank: Contributor
timestamp: April 11, 2016, 01:01:27 pm
content: Yes I did consider optical, but the transcievers are far too expensive. Unfortunately getting them all from NICs is going to be a bit too much if there is a potential for over 256 devices. Although I did consider just a powerful led and a fast switching optoisolator, but I'm not sure what the reliability of that would be like.

author: SL4P
author_rank: Super Contributor
timestamp: April 11, 2016, 01:45:06 pm
content: I may be missing something, but in my experiences - RS422/485 and other 'balanced' topologies depend inherently on NOT being ground referenced. The signalling is dependent on the differential voltage between AB. Where the data slicing us performed at any given moment half-way between A and B voltages wrt each other.More particularly, there are also transceivers that specifically provide I/O isolation - on top of the +/- pair isolation from ground.I'm happy to be corrected.

author: nctnico
author_rank: Super Contributor
timestamp: April 11, 2016, 01:54:32 pm
content: Quote from: SL4P on April 11, 2016, 01:45:06 pmFor RS485 that is not true! The receiver has a ground and the input signals must be within a reasonable range (see datasheet but usually several volts) from that ground.

author: janoc
author_rank: Super Contributor
timestamp: April 11, 2016, 02:51:59 pm
content: If you need to cover that sort of distances, I would also consider going wireless, with decent directional antennas, at least for the longest hops. Or optical link - e.g. a laser or even a LED with a bit of optics. Then you can have a local hub and use RS485 for the nearby nodes. That will save you a lot of trouble.The long wiring is definitely going to be an issue, both for ground loops, EMI and even for lightning protection (unless you put the wires in the ground).

author: glenenglish
author_rank: Frequent Contributor
timestamp: April 11, 2016, 10:31:32 pm
content: Q&A is being answered well here I think.I'd stayed wired over wireless almost anyday- unless there is lightning around, then you'll need CM protection to MV and that wont happen.optical fibre is cheap and easy. - I'd probably go that way for what you are describing.. or wireless mesh like zigbee.however, on 485 wired.....No matter how non ideal your RS485 topology is, if you slow it down ,it will work.adopt something standard like MODBUS, I suggest. Yes not rocket science but that's the point.I'd use an isolated transceiver- alot of extra cost but that's what you are in for.Bur you wont get phone calls..search at analog devices "isolated RS485" . that will give you a few ideas, look at their selector guides.download and review / read their whitepapers and numerous articles on it.ADM2487E is a good starting point... download datasheet. read. then read again. Figure 34... etc etc

author: uncle_bob
author_rank: Unknown
timestamp: April 12, 2016, 12:58:03 am
content: Quote from: SL4P on April 11, 2016, 01:45:06 pmHiThat's both true and not true at the same time.The signaling is done by a relative voltage between the two wires. However, both the receiver and the transmitter are referenced to a local ground. The devices only have just so much range before they start to clip (or fail). You can get some with 50V type immunity. They cost a bit more.The problem is that, at least on the farms I have experience with the power distribution setup is a bit haphazard. One building is single phase and run to a single ground spike. In dry weather ... boy, that's lot of voltage on the ground. The next building is three phase *except* when the (fill in the blank) is turned on. Then it's right back to single phase to that dry ground spike. The house is all single phase, it has a good solid ground. Net result .... all sorts of voltages all over the place. Don't talk on the (wired) phone while hooking up a cow to the milking machine ...Bob