Connecting multiple circuits's common ground over long distances - Page 1
Forum section: electronics / projects

author: elepo
author_rank: Contributor
timestamp: November 15, 2021, 04:48:28 pm
content: Hello everyone.I am designing an RS-485 network where several (up to 20) controller boards connect together. The boards will be daisy-chained and each one will be connected to the next with a wire up to 10 meters long. There will be a master node that polls each slave and gathers needed data.Now for the RS-485 network to work properly I will need a common ground between all nodes. Meaning I will have a long ground wire (up to 200 meters) going through all the boards.Multiple application notes I have read state that this could cause ground loops but where I live we don't usually connect things toearthground. So I assume a ground loop cannot occur?But I'm afraid this long common ground wire could still pick up noise and inject it to all the boards since it is connected to all of them.On the other hand when we want to combat noise we usually "send" the noise to the circuit common ground using a capacitor or shields, etc. So I'm not sure if a long common ground wire is bad or not.Again, this is assuming none of the boards are connected to earth. Each board is powered by a separate power supply, and only the power supply "negatives" are connected together in order to form a common ground, so that the circuits can talk together.Edit: extra info:In order to avoid having to provide galvanic isolation for every MAX485 chip I came up withthis design. But after giving it some more thought I realized that the long wire will have to provide a relatively large amount of current and the voltage drop across it will be huge. So that solution is cancelled now and I'm left with only two options:1- Just connect the grounds together2- Use another power supply on each board to power the MAX485 chips, providing full galvanic isolation for them.

author: ajb
author_rank: Super Contributor
timestamp: November 16, 2021, 02:46:04 am
content: If your isolated power supply as shown in that other thread is only powering the isolated transceivers, then the power consumption will be pretty small. I don't really think you have to worry about voltage drop. You could run that isolated power supply at something like 12V and regulate it down to ~5V at each node to provide some additional headroom if you were really concerned about it. Even if you were powering the whole device via that power supply you could run the power supply at something like 24V and step down at each node to reduce any concerns about voltage drop.Ground loops aren't really the biggest reason to isolate an RS485 network--at least not in same way that ground loops are a problem for audio signals, for example. RS485 already provides good immunity to most sorts of noise, which is the whole reason it's used!The most important reason to isolate long communication cables is to break a potential path for fault current or hazardous voltages. It's very common to have RS485 devices that are wired to a bunch of external loads, and if the communication lines are referenced to the same power supply that powers those loads, it would be very easy for an external wiring fault between a load and the communication line to cause a lot of current to flow through that signal wire and cook it, or possibly other devices connected to it. Or if a wiring fault connects the DC side of the power supply to mains voltage, that mains voltage can be transmitted to all other devices in the communication network, making them all potentially deadly. Isolating the communication interface can prevent both of those things from happening.

author: elepo
author_rank: Contributor
timestamp: November 16, 2021, 07:51:33 am
content: Quote from: ajb on November 16, 2021, 02:46:04 amThat's a really nice idea.But one problem still remains.Regarding voltage drop not really being a concern, it actually is.I am going to use Ethernet cables to connect the nodes. As per the standard a CAT5e cable should have a resistance of 0.188Ohm/m. However I personally measured a so called CAT5e cable the night I made this thread to have a 0.75Ohm/m resistance. Over 100 meters of wire that will be 75Ohms. I measured the current consumption of MAX485 and its pullup resistors to be 2mA in total. So the voltage drop at the end of the line will be 3 volts. That's a ground potential difference of 3v.The RS485 standard specifies that the allowed common mode voltage is range is -7v to 12v. But with 3 volts ground potential difference that voltage could be as high as -8 volts. So I'm already operating out of specs and that's only for 100 meteres of wire.And I'm not even considering the optocoupler currents because I plan to use another wire for their ground since their voltage drop is going to be insane. (I got 8 wires thanks to Ether net cable).The terminating 100Ohm resistors will also consume significant current, but for them I plan to use isolated power supplies since there is only two of them and one of them is in the "master" which already has an isolated power supply.My source for ground potential difference:https://en-support.renesas.com/knowledgeBase/13917833

author: ajb
author_rank: Super Contributor
timestamp: November 16, 2021, 03:40:09 pm
content: Quote from: elepo on November 16, 2021, 07:51:33 amHow did you do that resistance measurement? When you get to <1Ohm the contact resistance between probes and the cable you're measuring can dominate the measurement. The best way to measure low resistances is with a 4-wire meter, which can eliminate the contact resistance from the measurement. If you don't have that option, you can sort of cancel out the contact resistance by taking resistance measurements of two different lengths of cable. Ideally you should use alligator clips or similar to connect the meter to the wire, as even variations in pressure by holding regular probes to the wire can interfere with getting an accurate measurement. Take a few measurements of each length, repositioning the test clips on the wire each time, and take the average, then the difference between the two averages should be fairly close to the difference in resistance between the two different lengths.I would also be cautious about the wire itself, not all wire that claims to be Cat5e (or whatever) will actually meet that spec, and copper clad aluminum networking cable is pretty common.

author: elepo
author_rank: Contributor
timestamp: November 17, 2021, 07:12:02 am
content: Quote from: ajb on November 16, 2021, 03:40:09 pmI used my cheap DMM but today I tried another approach. I passed different currents through the wires and measured the voltage drop.I applied 100mA, 300mA and 500mA current, calculated the resistance with Ohm's law and then averaged the resistance.The cable I mentioned before turned out to have 0.74 Ohm/m resistance. Pretty close to what I measured with the resistance meter of the DMM. This cable is so crap the wires inside it weren't even twisted!I deliberately chose this wire because I knew it was crap. The thing is a customer is going to be using this system and I can't be sure what kind of wire they are going to use. So I have to assume they're using a crap wire. Which is very common where I live.The next cable I measured was of better quality. But this one also turned out to have a resistance of 0.63 Ohm/m. At least this one was actually twisted pair. But it did mention on the wire that it was 26AWG. (As opposed to 24AWG).I'm pretty sure they are both aluminum.So if each chip draws 2mA of current for 20 nodes that'll be 40mA. For 100 meters of wire that'll be ~2.5 volts of voltage drop. So MAX485 grounds will have up to 2.5v of difference in potential.I'm thinking I should just use separate power supplies for each chip and follow this design:This is what I can afford to put on each board :https://www.aliexpress.com/item/32648367368.html

author: Doctorandus_P
author_rank: Super Contributor
timestamp: November 17, 2021, 07:03:19 pm
content: Start by using some decent cable.If your customer is not willing to pay for a bit of decent cable, then try to spend some effort in educating him on why it is important. If that does not work then wash your hands of it and choose some other project to work on.Some other things you can do:Use a power supply with the highest voltage you dare to use on your CAT5 cable.Higher voltage is less current, and therefore reduces voltage drop. I would at least use 24V, but you can go upto 48V without getting into trouble because of the high voltage itself.CAT5 has 4 wire pairs, and you only need 1 pair for RS485. So you can put 3 conductors in parallel to reduce the DC resistance.Put the power supply in the middle. This halves the distance (and thus resistance) from the power supply to the furthest end, and it also halves the current though the wire. So you reduce the voltage drop over the cable by a factor of 4.You can use a bipolar power supply with local SMPS circuits. For example +24V and -24V for the power delivery, and then add a GND wire that does not have any (or a very low) current through it.You can use two (or more) power supplies distributed over the cable. Make sure those power supplies act decent if connected in parallel (for example by adding diodes). With multiple distributed power supplies you can make use of the cable resistance as a mechanism to even out the loading of the power supplies.And because it's a RS485 system, making your power supplies "smart" is a relatively easy step. Add a microcontroller to each power supply that can can report voltage and current of the power supply.Also consider this:If you have 24V on the same cable as your RS485, it's easy to damage stuff with wiring faults.This can be prevented by adding TVS diodes to the RS485 transceivers (or use transceivers with dectent built-in TVS diodes) and combine that with PPTC's, that limit the current into these TVS diodes during a DC wiring fault.Also have a look at this old, but very good application note:https://html.duckduckgo.com/html?q=ten+ways+to+bulletproof+rs485