Earthing of Arduino Board

Ground loops are superficially easy to understand, but defining exactly what happens can take experienced engineers entire articles to explain. I'm way out of my league there. The essential gist is that a ground loop is when there are multiple paths to ground, so instead of voltage flowing directly to the nearest ground, it may follow an alternate route that you haven't anticipated.

Here's an example. Let's say you have an amplifier in your garage, for playing tunes while you work on your car. You decide you want to listen to some music on your computer, so you run a long cable from your office or living room, through the house, and into the garage.

The amp is grounded through the power outlet in the garage. Your computer is grounded to the outlet in your house. The amp and computer are also grounded to each other through the audio cable. Now, because all cables have resistance, and many homes have old wiring with worn-out connections and outlets, the resistance between the breaker panel and the power outlet is probably substantial enough that the inside room's ground and garage's ground are not equal. So, the amp could very well find a lower resistance path through the audio cable and into the computer. The result being AC offset signals on the audio input, and therefore hummmmmmmmmmmmmmmmm...

Ground is ideally a 0v reference, any deviation from this is detected as a signal. You hear it in an audio signal, but in digital electronics, it manifests in other ways.

Let's look at your first diagram there, with the two high-value resistors to ground. Imagine that top line is like a strip of copper on a PCB. From that line, let's say you have the ground side of the coil from five relays in a row, which are clicking away independently. Every time one of those relays turns on, there is current flowing through the coil, to that trace on the PCB. If the center relay is on, what's the voltage on that trace? It should be zero, with reference to ground, because it's connected to ground. But it won't be, because there are fat resistors between the relays and the real ground point. This is an extreme example, because your ground reference will hopefully have less than M-ohms of resistance. But even if it's 1 ohm, will the voltage on that top line be exactly 0v? Nope.

So, if that center relay is on, dumping 5v into a high-resistance path to ground, what does that mean for the relays on either side of it? What is their reference? Current prefers to flow where there's lower impedance, so it'll flow more toward the side with the lower value resistor. Now there's a difference between the ground reference of the leftmost relay and the rightmost relay. If this offset is high enough, there may not be sufficient voltage difference between the + and - side of the coil for it to engage.

It can get worse if we used that line on the PCB to connect another circuit. Imagine we connect it to an LED with a 220 ohm resistor straight to ground. 220 is a lot less than 100M, so the relay current will flow through the LED to get to ground. (This is a heavily contrived example, but it illustrates that current may flow through a path we didn't intend if it's a lower resistance path.)

The point of all this is, you can't treat a ground as a black hole. Every connection has some amount of resistance. Ideally, every ground in your circuit has its own, unshared connection straight back to the reference point. That way, every component has the same base voltage to compare with. (This is known as star grounding.) That's rather impractical in most cases, so instead we commonly use large ground planes to minimize the resistance, which is the second best approach.

The absolute worst approach is to have a bus ground, like the imaginary trace on the PCB with relays attached to it. The potential will be slightly different at every point along that bus, which could mean instead of going straight to ground, there may be times where the easiest path to earth is through some other component with a lower resistance to ground. Or, some component may not be working the way it should because the voltage across it isn't what we inteded it to be.

Sorry this is a book. :slight_smile: