Grounding in Rs485 for long wire communication - Page 1
Forum section: electronics / beginners

author: Vindhyachal.takniki
author_rank: Frequent Contributor
timestamp: February 20, 2021, 03:47:55 pm
content: 1. I have two devices which are are very far order of 10's of meters. Final distance depends upon installation site.2. Now what I read is Rs485 is three wire(not 2 wire communication which is misconception), so common gnd should be there.3. Now both devices are powered by their own power supply(or battery in case power goes)4. How do I do common gnd for them. What I read running 3rd wire parallel to A&B of Rs485, large gnd loop will form? So what's the solution for it?

author: ogden
author_rank: Super Contributor
timestamp: February 20, 2021, 04:51:45 pm
content: Ground in case of rs485 is needed to 1) keep signalling lines withing common mode voltage range of drivers 2) to provide return current path for common mode noise. Thou if you think that your installation can have significant ground potential difference leading to significant current in common ground connection and you have no ways of fixing such kind of fault - use isolation for rs485.Furhter reading: "Ten Ways to Bulletproof RS-485 Interfaces", National Semiconductor Application Note 1057. Analog Devices AN-960 APPLICATION NOTE.

author: rstofer
author_rank: Super Contributor
timestamp: February 20, 2021, 04:59:07 pm
content: Keep reading! There should never be a shared ground and if there is a shield, it should be grounded on one end only.Over your short distances there may not be much shift in ground potential but when running between buildings, you can count on some. If there is a ground potential difference, there will be current flow in the shield which will ultimately destroy the cable.https://www.planetanalog.com/signal-chain-basics-84-why-rs485-does-not-need-ground-wiresIf there is a ground potential difference, use a galvanic isolator.It's all pretty simple.Right up to the point where the National Electric Code says you have to ground that shield at every building entrance.https://www.dps.ny.gov/gbcs_Comments_Questions_and_Answers.htmlhttps://www.mikeholt.com/mojonewsarchive/NEC-HTML/HTML/Article820CodeBasics~20030214.htmhttps://www.ecmweb.com/national-electrical-code/code-basics/article/20897736/the-nec-and-communications-circuitsAssuming this application is within a single building, use unshielded cable - page 2 last paragraphhttps://www.ti.com/lit/an/slla272c/slla272c.pdf?ts=1613810553643Between buildings the cable will likely be shielded. Pay attention to Section 11 starting on page 6Tens of meters isn't an issue, the standard will handle 1000 meters (4000 feet).

author: ogden
author_rank: Super Contributor
timestamp: February 20, 2021, 11:52:14 pm
content: Quote from: rstofer on February 20, 2021, 04:59:07 pmWrong in case of rs485. You may want to read yourself - both documents I mentioned.  Problem with such blanket statement is that OP did mention battery but did not mention grounding/earthing. If one device is floating then problems may arise.Citation:Quote

author: S. Petrukhin
author_rank: Super Contributor
timestamp: February 21, 2021, 12:58:07 am
content: Use an isolated power supply and signals for the RS-485 CHIP or a fully integrated ADM2682 CHIP with built-in isolation and you won't need a third wire to worry about the potential difference, although in this case you can safely use it for reliability.But be sure to use a protective shield connected to the PE only on one side of the line.I use this scheme:

author: WattsThat
author_rank: Frequent Contributor
timestamp: February 21, 2021, 02:22:39 am
content: There is a difference here between the terms ground and earth.Ground is usually meant to be and specifically in this case to be the zero volt potential of each transceiver marked as the GND pin(s). This connection point should not be connected to earth, doing so will create said ground loops and cause no end of problems. Intermittent communications and blown transceivers is the result of connecting GND to earth. As also mentioned, each transceiver and it’s associated system must have an isolated from earth power supply.The simplest method to wire this is to use a four conductor twisted pair cable, Belen 9842 is one of the go to cables in the US. One pair is A & B signals, the other pair shorted together and used for the GND zero volt potential connection between the transceivers. As also mentioned, the shield should be connected at one end only. The two ends of the network must be terminated with 120 ohm resistors to prevent reflections.

author: rstofer
author_rank: Super Contributor
timestamp: February 21, 2021, 04:11:13 am
content: Quote from: S. Petrukhin on February 21, 2021, 12:58:07 amI'm not sure I understand R53...The problem is that if the cable runs between buildings, both ends of the shield MUST be connected to earth ground to satisfy the National Electric Code.You would expect the earth potential of adjacent buildings to be similar but it wouldn't be true if there was a large ground fault in one building, elevating it's ground potential in the area where the service is grounded and likely where the communications cables come in.It gets complicated...I think I would look at fiber transceivers if I had to run between buildings. I might look for fiber without the copper cladding. Lacking any electrical conductivity, I wouldn't be required to ground any aspect of the cable.This subject gets VERY complicated when you are sending data from a 115kV substation across about 1/4 mile of underground duct banks and up to a PC for monitoring. Getting isolation for 115 kV is expensive. We even used an optical isolator for the telephone circuit. You can get some amazing ground faults on a substation like that.

author: ogden
author_rank: Super Contributor
timestamp: February 21, 2021, 08:13:51 am
content: Quote from: rstofer on February 21, 2021, 04:11:13 amRight. Other way to get huge step voltages between two interconnected buildings is lightning strike. Not necessarily direct hit. Nearby pole, building or even tree is enough. Thats why idea of using optics is extremely good, especially when you/employer do not own two assets you connect.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: February 21, 2021, 11:03:22 am
content: Quote from: rstofer on February 21, 2021, 04:11:13 amThis is a terminating resistor. We use a twisted pair with a wave resistance of 100 ohms.And I use a switch in the design to choose where to turn on the pull-up resistors and the terminator.I can't talk about American standards for building-to-building connections. I work in the field of industrial automation in Russia. All equipment has a connection to the PE loop in its place, you can safely connect the protective shell on both sides, but my theoretical knowledge suggests that the connection on one side is more reliable.Of course, optical lines of dielectric materials are much more reliable and eliminate all problems, except for one: the price.

author: mon2
author_rank: Frequent Contributor
timestamp: February 21, 2021, 11:11:23 am
content: R53 should be across D+ and D- lines but it is not drawn this way in the shared schematic. I think that is the reason for the alert.

author: S. Petrukhin
author_rank: Super Contributor
timestamp: February 21, 2021, 04:01:00 pm
content: Quote from: mon2 on February 21, 2021, 11:11:23 amOh, yes! I copied an uncorrected circuit, forgot to switch to the latest version with a fix. Thanks! I replaced the picture.

author: Terry Bites
author_rank: Super Contributor
timestamp: February 22, 2021, 03:43:59 pm
content: You have to run a common return that links all devcies on the chain. Only connect common to Ground ar the master (sending end) terminate the last unit in the chain with 120R.You can get away this using the shield as common if its only grounded at the master end and no where else. But you run a dual screened twisted pair so you'll have some redundancy. Surely.Cat5 STP is dirt cheap.

author: David Hess
author_rank: Super Contributor
timestamp: February 23, 2021, 06:25:49 pm
content: For long runs where separate power circuits are used, the RS-485 transceivers should be galvanicly isolated at one or both ends, which is easy enough to do on the logic side of each level shifter but of course an isolated supply must also be made available. Now the shield can be connected at both isolated ends to signal ground without causing problems but I have no idea what the NEC says about this.

author: rstofer
author_rank: Super Contributor
timestamp: February 23, 2021, 07:00:19 pm
content: RS485 is a differential signal defined on a single twisted pair. Unless the environment is especially harsh, shielding is optional and often not needed. No common ground is required. Since the cable may run between buildings, no common ground voltage can be assumed.Look above the ceiling of your office. How much ethernet cable do you see running through the space? I have been responsible for the installation of at least 3 million feet of ethernet cable and every bit of it has been UTP. True, ethernet cards have transformers and such but noise is noise and nothing in the environments where I worked (factory + office) caused any problems with ethernet, RS322 or RS485. There's a reason the cable is twisted so tight!The OP is talking about very short distances compared to the theoretical limit of 4000 feet.If grounding is going to become an issue, try unshielded cable. It works by the billions of feet for ethernet.

author: David Hess
author_rank: Super Contributor
timestamp: February 23, 2021, 07:23:49 pm
content: Quote from: rstofer on February 23, 2021, 07:00:19 pmSince RS-485 is not inherently galvanicly isolated, like for instance Ethernet, there is a common connection whether it is explicitly shown or not. The common mode range of common RS-485 receivers is about +/-5 volts and ground voltages between buildings, or even in the same building with multiple power panels, can exceed this.QuoteEthernet, including coaxial Ethernet, has galvanic isolation as a requirement for that very reason.I have seen RS-485 transceivers destroyed by common mode excursions in industrial installations within in the same building, and even in close proximity.Now whether Vindhyachal.takniki needs an isolated RS-485 solution is not clear. It is unlikely, but he might, and it depends on more than how each device is powered when each device connects to other devices.

author: rstofer
author_rank: Super Contributor
timestamp: February 23, 2021, 07:54:53 pm
content: There is no reason to assume that the equipment on either end has any earth reference whatsoever. They could be uC's powered by ungrounded wall warts. They could even be battery powered with no mains powered charger or the charger output floats. Their circuit ground voltage relative to local earth ground could be all over the place but it has to comply with the RS485 spec for common mode noise.The OP is talking about 10's of meters, not hundreds and certainly not 1000 (the max). I'd throw UTP on the floor and cover it with Duct Tape. Or TyWrap it to the T-bar ceiling. Now try it and see how it works with real data.As long as I was within one building, I MIGHT used shielded twisted pair and ground one end. But it probably isn't necessary.Clearly, galvanic isolation is the way to go but for 10's of meters, all in the same building, that is probably overkill.Every driver manufacturer has an app note or white paper, most of which are linked above.

author: AndersJ
author_rank: Frequent Contributor
timestamp: February 23, 2021, 08:32:02 pm
content: Quote from: rstofer on February 23, 2021, 07:54:53 pmAll equipment at the cable ends have earth/gnd reference connections of some sort.You may not see it, or make the physical connection yourself, but it is there.The connection is galvanic or capacitive or inductive or magnetic or combinations.When there are potential differences between cable ends then current flows.When currents are larger than the devices or the cable can handle, that is when problems surface.

author: Terry Bites
author_rank: Super Contributor
timestamp: February 23, 2021, 10:43:17 pm
content: I once worked at a power station (no names) with a phone system that kept going into meltdown. Cause: Gatehouse ground nearly a kV above control room ground, the bonding was being made via a phone line!