Grounding & Avoiding Ground Loops

by on November 3, 2014

Ground Loop

Ground loops are often discussed but less often understood (I am far from being an expert in this). I have seen several cases where a robot malfunctioned or a sensor did not work due to bad grounding. For example if you have a 0-5V signal and also have a “noisy” ground then the signal can be 0V± some-noise-value, and 5V± some-noise-value, and cause troubles with your circuit operating. A (bad) ground loop occurs when there are two ground paths and a difference in potential (ie voltage) between them. Ground loops can be formed by having impedance differences between ground points in the system be different from each other. These differences can be both from the design of the system as well as from small subtle real world differences. You can get a ground loop even if you are unaware of any mismatch between ground paths. Often when we say we have a “noisy” system it is because we did a bad job minimizing current loops. Remember every current loop is an antennae that both radiates and receives “noise”. In addition to having “bad” logic levels you can also have a persistent voltage across your various ground points, that will induce a current to flow continuously. This can also cause problems.

Ground loop are often very hard to diagnose. Often if you are having weird behaviors, computers glitching, erratic communications, random restarting hardware, smoking cables or even hardware failure you might have a ground loop.

Grounding in a mobile robot can be both easier and harder to deal with then in a fixed installation of a machine or house since it is generally a “floating ground” and not connected to the earth. You could drag a metal chain or have metal wheels that *might* connect the robot to earth, but that is probably not the most reliable grounding connection. By having a floating ground you have the complete control and responsibility to make sure your grounds are the same potential (ie voltage) and that there are no loops (two current paths for the same device).

Current does not follow the path of least resistance, current follows the path of least impedance. What this means is that we want to keep corresponding wires, cables, and PCB traces as close to each other as possible, as short as possible, and with as little “looping” as possible.

Sometimes you can not avoid having a ground loop in your system. So how do you prevent issues? You need to avoid having current loops of a different impedance going back to ground. Ground wires should usually be in a star topology with each leg being the same length. Putting ground wires as a bus (almost) guarantees that you will have varying impedance between each ground return wire (which is a bad thing). Keeping power and return wires close to each other helps to minimize the impedance of the loop. You should try to keep high current systems (battery, motor, etc…) grounds separate from low current grounds (logic, computers, etc..) to avoid placing “noise” on the low current systems. All of the low current grounds can/should be tied together. On the power side if you have multiple DC<>DC converters the output grounds should be tied together. One way to avoid ground loop problems is by keeping things isolated. For power this can mean isolation transformers and for signals this can mean using opto-isolators. When possible using differential communications can also help. For example rather than using RS-232 which is relative to a common ground wire, you can use RS-485 which uses differential pairs for transmitting the data.

Update:I recently was asked to consult on a robot where various devices (radios, motor controllers, etc..) were failing. The robot had all of the DC-DC converter outputs isolated from each other as well as the battery output. Inadvertently via the computer case the robot became grounded to the chassis (from one of the DC-DC converters). We determined that there was a voltage differential between various parts of the robot, and in certain situations it was shorting these different components together causing the components to die. After tying all of the grounds together the problems went away and components stopped failing.

I once had a computer in a robot that connected to a programmable power supply via RS-232. When we tried to boot the computer with the power supply serial cable connected the computer would just hang and not boot. If we removed that serial cable, the computer would boot just fine. The way we “fixed” this was by putting a USB<>RS-232 converter that isolated the signals. Once we had the converter in place all of our random boot failures went away.

To make sure that only one ground path is at each location you need to think how your signals are shielded. For a cable that means only grounding it at one end. Usually you want cables grounded on the power source side and leave it ungrounded on the device side. Having the cable shield connected to ground will prevent the electrical fields from penetrating the shield and affecting the wires inside. (One dirty way that can often fix a ground loop problem is to cut an existing shield that is causing the problem.)

To ground a robot chassis or not is an interesting question. If it is grounded you benefit from the added shielding and maybe help reduce static electric discharge to other components. If it is not grounded then you have less chance of shorting a wire when you are working on something. If you do ground the rover chassis then it should only be at one point.

One other quick note is about the classic case of ground loops and oscilloscopes. Scope outputs are typically connected direct to earth ground. So if you try measuring something else that is earth grounded you can blow up your scope or probes. If you want to measure something that is also earth grounded you either use an isolation transformer to power your scope or device, or better yet (since it is safer) you can use isolated differential probes (they are expensive) for your scope!

Grounding can be tricky. If you have more advice or stories please leave them in the comments below!

Just a small reminder about impedance.Impedance is the effective resistance when you combine resistance and reactance. Essentially this means that you combine the resistance (typically not frequency dependent) and the “resistance” from capacitors and inductors that are frequency dependent.

Impedance of:
Inductor: XL=2πfL
Capacitor: XC= 1 / (2πfC)
Series Inductor and Resistor: Z=sqrt(R2 + XL2)
Series Capacitor and Resistor: Z=sqrt(R2 + XC2)
Series Inductor, Capacitor and Resistor: Z=sqrt(R2 + (XL – XC)2)

I would like to thank Edward for the idea to write this post.

Liked it? Take a second to support David Kohanbash on Patreon!


Considering an actual robot powered by batteries and moved through brushless motors.

I have a system with all positive and negative references connected, and it is working fine. My issue right now ir the static generated when it moves, but I intend to fix it by creating a metalic connection between the robot and the ground.

However, I’m worried if I should somehow connect batteries and other components to the frame in order to avoid possible noises. Is it necessary? What is the best way to do this?

I actually have read an article indicating five options about how to do this:

#1: Surge suppressor, battery rails to frame. The advantage of this method is an active limit on voltage to frame and floating architecture maintained. The disadvantage is that a stored charge can accumulate up to clamp level, where suppressors prone to failure;

#2: Resistive ground, battery center to frame. The advantage here is that a resistor will bleed off static charge while limiting ground fault current. The disadvantage is that the resistor handles full rail voltage during faults;

#3: Bond from battery to frame. Here the advantage is no charge buildup, minimum voltage between battery rails and frame and no special isolation required for most instruments. The disadvantage is that here a high fault currents can flow;

#4: Bond from battery high (or low) terminal to frame. The advantage is no charge buildup and no special isolation requirements for most instruments. The disadvantages are high fault currents able to flow, high voltage between battery bus and frame and unipolar chassis leakage currents;

#5: Leakage resistors from battery rails to frame. The advantage is that static charge bleeds off and a limited fault current. The disadvantage is a constant flow from batteries through frame wastes energy and discharges battery pack.

Any suggestion?

Just to verify when you say “metalic connection between the robot and the ground” you mean from robot electronics ground to robot chassis.

I would generally run a wire (no resistor, etc..) from the ground bus on the robot to the frame. If you really have a large static problem you can put a fuse on the line.

The question I have is why do you have such a large static buildup? What material is your wheels? and what material are you driving on?

Have you taken a multimeter and verified your voltages at different points (including chassis), just to make sure things seem correct?

The robot is currently working on a PVC area. It works properly but generates a lot of static.

I will have to move it to a metalic area very soon.

Should I only connect the negative reference of the batteries to the frame then? The batteries are connected in parallel but only have the positive and the negative terminals.

What is the material of your wheels? What is the material of the chassis?

Can you have a metal chain drag on the ground?

Yes the idea would be to have the negative terminal ties to a metal chassis. You might need to add some protection such as a TVS diode.

The wheels are made of polyurethane, the chassis is made of fiberglass.

It actually walks hanging on the roof.

So bonding the battery to the chassis will probably have no/little effect.

If you are hanging from a roof is there any way to use a metal chain to drag or as a safety harness?

I can have a metal chain, that would be easy.

Should I use a metalic chassis? What is the benefit of having a bonding between the battery anda metalic chassis?

Hi, So like a car is it better to have a negative bonded metal frame then ? The chasis on my robot is Aluminium, and the wheels are wrapped in rubber tracks (so no Earth). The thing is I have many diff voltages (11.4 to motors and shields), then 7 v to Arduino and Rasp Pi 3’s (DC-DC converter). Would I be better off bonding all my gnds and -ve to the chasis and onnecting the -ve of my batteries to the chasis ?

I generally do not bond to the chassis. I will often have 2 ground buses. One for the batteries and motors that is noisy. And the second one for all of the other grounds (DC-DC outputs for computers, sensors, etc..)

Leave a Reply