Care must be taken when using ungrounded devices, such as laptop, on measurement bench
- There may be tens of volts difference between mains earth and ground of the ungrounded device
- It is not dangerous to you but to sensitive electronics it can be
- Easy solutions exist but sometimes problems may be tricky to identify
I am currently working on my Wee DAC design and have just built the first prototypes. After confirming everything functional, I soldered a last few components and packed the boards to take to work for first audio performance measurements – only to realise both W-Input and W-DAC were practically dead at the measurement bench. No signal coming out and no easy fix. Back at home, I spent one evening debugging the boards thinking the only possible issues can be at the reset circuit or oscillator, causing the devices not powering up. But why it had suddenly happened to both boards? Blaming an IC faulty is a common thing but is VERY rare.
When debugging and changing some components, I thought I noticed a small spark a couple of times when touching the board with a soldering iron or oscilloscope ground clip. This raised questions on ground potential issues. I connected various instruments I had been using and measured the voltage between the mains earth and my board signal ground. I got tens of volts, the peaks being over 80 volts! Imagine touching a soldering iron charged at 80 V your sensitive circuit. I swapped the main ICs on both boards and they were working again. Possibly the first time the ICs had actually been fried?
Ok, time to understand what actually caused such a massive ground potential difference.
Basic measurement kit
Below is an illustration (drawn with Surface, the evil of this story) of a common electronics bench setup containing DUT (Device Under Test), oscilloscope, soldering iron, and bench power supply (PSU). Connections to the mains are not drawn except earth connections. There may be more kit but this gives an idea of the interconnections. Main points:
- Bench power supplies usually have floating outputs if not explicitly grounded on the front panel.
- Oscilloscope is grounded and probe ground clip is directly connected to mains earth.
- Soldering iron is usually grounded as well.
In this case the DUT is floating with the PSU.
Next if we place a scope ground clip (or soldering iron) on the DUT, the situation becomes as follows. Floating DUT and PSU will be effectively grounded via the scope ground clip and now lie in the mains earth potential.
Note: I did not (and neither should you) solder anything while the circuit was powered up but it was still connected to the PSU, outputs off, when swapping components.
Everything is still fine, this is the normal situation with floating circuits. There are safety aspects in this but one must always remember oscilloscope ground clip is directly connected to mains earth, especially if intending to place it somewhere else than the circuit ground!
Laptop in measurement kit
Let’s go back and remove the oscilloscope ground clip from DUT. Now let’s add the root of all evil, PC, in the measurement setup. In my case it was Microsoft Surface laptop/tablet with Analog Discovery 2 (AD2) and miniDSP miniStreamer USB to SPDIF/I2S module. The problem with laptop is that it is NOT grounded, it uses a 2-prong mains plug without earth connection.
I don’t know in detail how laptop chargers are made but anyway, it leaves the ground in an undefined dodgy potential. For example, desktop PC power supplies use Y-capacitors between earth and live/neutral, causing the case to be in half of mains voltage if earth is not connected. Nevertheless, laptop ground is kind of floating but these capacitors or stray capacitance cause all kind of crap to couple in the ground. I call this dirty ground in the illustration below.
Now let’s connect AD2 to DUT; DUT is now connected to the laptop ground via the USB. As the DUT is floating, it is in the same ground potential as the laptop. Everything is still fine. This ground is not clean but it is floating with the dirt.
What happens now when we connect the scope clip or soldering iron to the DUT? This potential difference between the green mains earth and orange dirty ground is the one I measured with the handheld multimeter showing 84 volts. And when these are connected together, we are shorting these two potentials and that caused small sparks and likely destroyed my ICs. In fact, connecting the grounds together may still be fine but if you happen to touch something else with earthed part, something likely breaks.
Is it dangerous?
No. Sometimes with ungrounded devices even half of the mains voltage can be measured on the chassis, meaning 110-120 volts (here in Europe). But this voltage is caused by charged stray capacitances (or power supply Y-capacitors). Therefore, when this potential is grounded (through oscilloscope, soldering iron, or you), it only discharges the capacitance. In case of capacitors you may feel something but it does not harm you. Mostly you will not feel anything; however, for sensitive semiconductors this may be fatal.
Solving the issue
There are couple of options:
- If laptop is the root cause, disconnect the charger. Then it is truly floating. However, I wouldn’t call this a sound solution as you need to remember to do this.
- Ground floating power supplies. We get rid of the high potential difference but there will still be dodgy ground current flowing from the laptop to the power supply, through the DUT.
- Ground the laptop. I think this is the best option (unless you remember to unplug the charger every time). There is not really a standard solution to this but one option is to connect the laptop to something that is grounded via USB, network cable, etc. In this case it is good to keep the PSU floating so that no ground current flows through DUT.
Surface ground potential
So what was the Surface ground actually like, referenced to mains earth? I did a scope capture by just touching the surface with a probe (as the ground clip is already connected to mains earth. This is the same I got with my handheld meter when waiting for the initial capacitance to discharge: -22 VDC with 46 V 50 Hz AC signal. Negative peaks are over 100 V. I conclude dirty ground is a good term for that!
Grounding can cause nasty issues which is why it is good to understand what is going on. It is one of the fundamentals of electronics but there is so much in it that do not expect things to be always simple. This was a good lesson to me as well to really think through how things on my bench are connected, it will be easier to avoid mistakes in the future. Similar thinking is useful for example when connecting audio kit together and trying to avoid ground loops.
There are often tradeoffs between ESD protection, EMI, ground loops, and safety. Do not compromise on safety – no removing mains earth connections! There are other ways to overcome the issues.
Nice post! Thanks for all the information. Do you know any book that goes deeper in this topic? I got the idea but want to understand this better, cause just ordered my first portable oscilloscope to use with my laptop and don’t want to fry anything :c. I really appreciate the effort you put into this page!