# Computing stuff tied to the physical world

## How grounding works – part 2

In Hardware on Dec 7, 2011 at 00:01

After yesterday’s post, here are some more details about grounding do’s and dont’s

First, let me reiterate that there is no such thing as a fixed “0 volt” level. Voltages are measured as “potential differences“. You can only have a voltage between points A and B – even if there is virtually no current flow.

Warning: from here on, I’m just going to invent an explanation for how ground works and how to deal with it. If I’m wrong, please correct me. The point is to try and get my intuition across – because IMO it’s not complicated.

The solution presented yesterday was to use a “star grounding” approach: all the big power consumers get their own power and ground wires to the power supply. As was explained there this prevents big currents from “raising the ground floor”, i.e. reducing the way ground level changes end up messing with low-power signals.

Here’s a delightfully simple and practical rule: tie all the big power consumers directly to the power supply, and do whatever you like with the rest. There’s still a risk of “ground loops” (which is a nightmare in audio circuits, because it can leads to audible hum), but it’s not nearly as important as getting the big currents under control.

So if ground levels can vary, how come this doesn’t lead to trouble when connecting multiple devices?

Well, the simple answer is: they could, but the trick is to avoid currents going through ground connections. Now, before all this gets too confusing, let me make the distinction more explicit with an image from Wikipedia:

The differences are quite subtle:

• signal ground denotes the return path for low-power, eh… signals
• chassis ground is the mechanical frame, if it is made of a conducting material
• earth ground is that rod in the ground I mentioned before

During my recent scope experiments, I’ve been quite puzzled by all this. How do you prevent damage when you tie sensitive circuits together, all at different potentials, different power supplies, and different grounding points?

Observation #1: voltages don’t cause damage, it’s the resulting current that does.

So as long as a circuit is high-impedance, you don’t really have to worry about damage. Poking around with a scope probe (which is usually 1..10 MΩ) won’t be a problem (unless you exceed the maximum voltage rating).

Observation #2: electricity only flows when there is a return path.

This is a biggie. Imagine a heavy power supply with lots of voltage and current capability to cause lots of damage:

A power supply is normally galvanically isolated from AC mains. This means it has no connection to it and no current can flow. Tying the “–” side of the supply to the chassis and enclosure will not change this. Likewise, tying this “chassis ground” to “earth ground” will not cause any current to flow. So far, so good!

Let’s look at two such installations, and let’s assume the second one is actually quite sensitive – such as a scope:

Again, tying its “GND” probe line to both chassis and earth ground will – in itself – not cause current to flow.

So far so good. Now let’s look at the bigger picture – since both appliances are tied into the same AC mains:

As shown in part 1, if there are large currents flowing through AC mains wiring, then there will be a voltage drop in the wires (red box), which means the different power inputs will start to “float” relative to each other.

Observation #3: the ground wire normally carries NO current!

This is the crucial bit which makes grounding sane. When there’s no current, there’s no voltage drop. In a 3-wire system, now common in most parts of the world, that ground wire is nice as reference and as fail-safe.

First the fail-safe: as you saw, it is common to tie all chassis and signal grounds to the “G” wire, which in turn is normally tied to earth ground somewhere in the basement (in one spot only). If there is ever a short between the other current-carrying (and dangerous) wires of AC mains and this “G” wire, then two things happen: 1) currents in the “L” (live) and “N” (neutral) wires no longer cancel, and 2) a current will start to flow through the “G” wire.

This is where the RCD or “RRCB” enters the picture. In modern house wiring setups, it kicks in the moment a current difference larger than 30 mA is detected between L and N. So what this does is shut down power as soon as 30 mA or so starts flowing through the “G” wire. An excellent safety device – it must have saved countless lives.

Observation #4: electricity takes the path of least resistance (or inductance in the case of HF).

So if the “G” wire normally carries no current and up to 30 mA during a fault, why is it as thick as “L” and “N”?

One reason that it’s an extra safety – if the RCD doesn’t trip, then the fuse will blow. But another reason is to keep the resistance of the “G” wire much lower than the resistance of say a probe’s “GND” tied to the “–” of the power supply. If there’s a fault current and it decides that it’s easier to go through the probe’s “GND” wire, then it could send a damaging spike through it (again, the scope is a very sensitive low-current device).

So the effect of that green-and-yellow “G” wire running through the house, is to create a splendid 0 V reference (when everything is operating properly) and to act as fail-safe if L or N are brought in contact with it.

G is not there to carry current, but to tie all isolated, i.e. floating, power supplies in all devices together!

If you review observation #2 in this light, then each appliance has its own isolated power supply and the current it produces always goes back “into it”, so to speak. To put it differently: each power supply takes care of its own electrons. The common ground connection merely “secures” one side of each supply to a safe reference point – and ties it firmly to all the conducting surfaces around us. The more surfaces we tie to “G”, the more we can be assured that faults will trip an RCD or a fuse – and leave us happily intact to tell stories like this and write weblog posts.

1. I apologize for being so rudely off topic (or maybe not so, 900W ovens are not called weak current and they too need a good ground), but this may be an interesting solution for a similar problem you have solved Toaster reflow Technique

2. Following with interest!! Also, not only causing issues with audio, but long distance RS485 installations too. Not sure if the following is relevant to the grounding discussions, but thought to link it (a tad biased to Maxim-IC though..) http://www.maxim-ic.com/app-notes/index.mvp/id/2045 I wonder if this is the same with the equipment between telecom circuits going between buildings (for T1, PRI lines, POTs etc..)

• Absolutely relevant, thx for the link. Good point – common-mode signaling is a way of not using ground as reference. Great for weak signals such as RS-485, as you point out – since it allows them be used over a long distance, where “ground” is most likely to be at a different potential. I’m not very familiar with all this, btw – but it’s clear to me that as soon as you move away from a single 3-wire AC mains connection, across the house or between buildings, then “ground” becomes a lot harder to deal with.

3. More on the RCD: The point is that if an unbalanced current is flowing to ground – the real earth ground, not the G wire – through you, the RCD stops it by putting you in parallel with a short circuit. And it’s designed to trip at what is usually a less-than-lethal current. It’s not just power-to-frame faults it detects, but power-to-anywhere-but-the-neutral.

4. «So the effect of that blue-and-yellow “G” wire running through the house…»

Are you sure you mean “blue” here? AFAIK nobody has ever used anything other than green or green/yellow to indicate ground in normal national colour standards.

• Just testing ;) – fixed, thx.

5. Yes, grounds are best treated as potentially not equal (sorry about the pun). The reason that “earth” wires are usually the same (sometimes half) cross section as their companion power wires is to keep fault potentials down.

Imagine your toaster develops a hard Live to Chassis fault (quite easy if heating element fails internally). Ok, no problem, the metalwork is grounded. Hmm, the resistance to the ground spike is about the same as the resistance of the live wire from the distribution board – so the metalwork will rise to about half the mains potential – 110Vac at low impedance.

Ok, no problem, the RCB will trip and isolate this supply. Hmm – when was the last time you pressed the TEST button on the RCB? The fault current is high, limited only by the cable resistance, so sooner or later an overcurrent trip will pop. The problem is that old style fuse boards can take several seconds to clear a fault with the correct fuse wire fitted (and never with oversize wire). Now that is a hazard.

Modern distribution boards with ECB’s and MCB’s are very reliable – but once in a while, do push the test button. It is well worth fitting an extra 10mA local ECB on your workshop power strip – improved protection and no need to stumble in the dark to reset it.

Grounding is mostly your friend. Oddly enough, a good safety tip is to buy a rubber mat to stand on at your workbench and keep one hand in your pocket if you intend to work on higher than logic voltages.

• I still have that 10 mA RCB unit I didn’t use in my big isolation transformer setup. Good idea, I’ll tie it into the single heavy gauge cable supplying all power to my workbench. Not only more convenient, also more modern and more sensitive than what’s downstairs.

What’s an ECB? Not European Central Bank, I suspect ;)

• Martyni, as you said, using a rubber mat is ONLY THEN safer IF you keep one hand in your pocket! If you plan to use both hands, then better be ‘earthed’, otherwise the RCD will have no chance to trip.

6. Oops – scrambled ELCB (Earth Leakage Circuit Breaker) and RCB (Residual Current Breaker). The real ECB is too busy printing money to be worried about your wellbeing (financial or otherwise) ;-)

Yes, a local RCB is worth it. At 10mA, you might get the occasional nuisance trip e.g poorly designed power brick line filters.

Since it is close to Christmas and traditional dishes, a related anecdote. Preparing for the oven for the turkey roast, the chef was too liberal with the oven cleaner spray and some fluid soaked into the element under the bottom tray. The next power on pops the RCB – much wailing from the kitchen.

The oven metered <10KΩ to ground, the wet part seemed impossible to get to and it is Christmas morning with guests expected for the meal. Hmm, well the trip is doing its job, detecting a leak to ground. Take the ground wire off? Dangerous. Ok, fool it instead. Dragged in an industrial strength 220:110 isolating transformer, double checked there was a solid ground on the metalwork and powered the oven through the transformer.

Several mA of “fault” current flowed for a while, electrolysed and evaporated the damp causing the problem – restored the normal wiring and cooking commenced.

Delicious !

7. JBecker, the hand in the pocket is a good habit to develop. Actually the mat principle is different. If you have no path to earth, only a charging current can flow to bring you to the potential you are touching. The zap is enough to extract the erring finger, but insufficient to cause muscle spasm.

That is one of the most dangerous shock modes – if you are gripping the source, the muscles can tighten involuntarily with a strong and possibly lethal force. I learnt this lesson the hard way when using a borrowed metal-cased drill with an intermittent winding fault and a disconnected earth pin. Squeezed the trigger and then could not let go. Time slows down and the brain mercifully speeds up. My reaction was to kick myself backwards, which luckily ripped the plug from the outlet.

After nursing my bruises and investigating what had happened, I asked the lender why the green wire was not connected. “Oh, that’s to stop it tripping once in a while”. His house had an RCB, where I was working did not.

“If you make it idiot proof, it will just find a better idiot”

8. Quote: ‘JBecker, the hand in the pocket is a good habit to develop. Actually the mat principle is different. If you have no path to earth, only a charging current can flow…..’

Yes, I know. I just wanted to say that ‘hand in pocket’ and ‘using isolating mat’ have to be logically ANDed to work. If you have an isolating mat and touch Live with one hand and neutral with the other, a lethal current will flow which is not detected by the RCD (because not current is able to flow towards earth) nor the MCB or fuse will trip, because the current flowing through the body is much too low. So, if you ‘plan’ to use both hands, be sure to be earthed and not isolated!!!

9. JBecker – agreed. Interestingly, wiring regulations had a period of insisting that everything conductive in an electrically hazardous area (e.g. bathroom) was hardwired to earth with safety tags everywhere. Even the metal legs on a fibreglass bath and the metal frame around the mirror.

Sense has crept back in and isolated conductive items can remain “floating”. Attention has moved back to reducing/eliminating the chance of contacting a live feed.

People will be people though. A famous French singer tried to change a lightbulb by standing up in a wet enamelled bath – sadly, his last act.