Author Topic: Ground issues when connecting different components  (Read 661 times)

0 Members and 1 Guest are viewing this topic.

Offline WatchfulEyeTopic starter

  • Regular Contributor
  • *
  • Posts: 123
  • Country: gb
Ground issues when connecting different components
« on: April 18, 2023, 07:55:29 pm »
I've been doing some experiments with some low cost dev boards (mainly arduino clones). I've run into occasional problems with some of the boards, when connecting them to a different piece of equipment.

I plan to connect them as follows:
1. Dev board powered from PC USB. Sig gen powered from power brick. No interconnections
2. Connect sig-gen ground to devboard ground.
3. Connect signal from sig gen to devboard.

The problem I have is that at step 2, the devboard has a tendency to crash as soon as the two grounds are connected. The state of the MCU is completely unpredictable. Sometimes the MCU becomes totally unresponsive, including to debug probes, sometimes it resets, and occasionally it'll jump to the hardfault handler.

The problem can be avoided if I make a high resistance ground bond first - e.g. put a finger on the sig gen ground and another one of the devboard ground before making the connection.

I'm wondering what is going on here. I suspect what is happening is that leakage through one or other of the mains PSUs, is resulting in a large ground potential difference. If a low impedance connection is made, this can cause a fast current spike. The resulting current and any capacitative coupling between ground and signals on the devboard, is then disturbing the MCU.

Is my thought as to the cause of this correct? Is so, what can be done to correct this? Is it a matter of using better power supplies? Or can things be done in the circuit design?

 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Ground issues when connecting different components
« Reply #1 on: April 18, 2023, 08:03:34 pm »
The behavior you describe suggests ESD. It could also be caused by RFI suppression capacitors leaking current into the output of the power supply, causing ground to float at a significant potential relative to earth. You could tie the DC ground to earth ground to prevent this, that will aready be the case on anything plugged into a desktop PC.
 

Offline WatchfulEyeTopic starter

  • Regular Contributor
  • *
  • Posts: 123
  • Country: gb
Re: Ground issues when connecting different components
« Reply #2 on: April 18, 2023, 08:35:46 pm »
I did wonder about ESD, but I don't think that was the issue here.

I don't know why I didn't do it earlier, but I just checked with a DMM, and measured about 100 V between sig-gen ground and devboard ground. There's about 800 mV between devboard ground and mains earth. I'm guessing it is the current flow as that potential equalises that disturbs the MCU.

I've also tested several different power bricks, and they all seem to have an output floating at about 100 V above ground, and just connecting ground on a power brick to devboard ground is enough to reboot it.  In all cases, any current to mains earth is tiny (<500 nA).

The question then is, is this a devboard problem? This doesn't seem to be such a problem with other stuff like PC peripherals, audio gear, etc. So, what might make a circuit more or less vulnerable to this type of disturbance? That isolated PSU outputs may float surely means that this type of interconnection must occur extremely frequently?
 

Offline wasedadoc

  • Super Contributor
  • ***
  • Posts: 1632
  • Country: gb
Re: Ground issues when connecting different components
« Reply #3 on: April 18, 2023, 09:20:39 pm »
Are you powering up before connecting the grounds? If yes, don't.
 

Online Kim Christensen

  • Super Contributor
  • ***
  • Posts: 1699
  • Country: ca
Re: Ground issues when connecting different components
« Reply #4 on: April 18, 2023, 11:16:39 pm »
The question then is, is this a devboard problem? This doesn't seem to be such a problem with other stuff like PC peripherals, audio gear, etc. So, what might make a circuit more or less vulnerable to this type of disturbance? That isolated PSU outputs may float surely means that this type of interconnection must occur extremely frequently?

It doesn't happen with PC peripherals & audio gear because those usually have their chassis, and thus the signal/DC-power ground connected to the safety ground. Therefore they will be at the same potential and won't have that problem.
Having the signal/DC-power ground connected to the safety ground has it's own problems though. Usually with ground loop hum and noise caused by small currents flowing via the safety ground. This won't be a problem for your dev boards and only really bothers sensitive audio gear or when trying to use a scope to find low level noise. So the solution would be to use PSUs that have a 3 prong power plug with the safety ground instead of those floating 2 prongers.
 

Offline dobsonr741

  • Frequent Contributor
  • **
  • Posts: 696
  • Country: us
Re: Ground issues when connecting different components
« Reply #5 on: April 19, 2023, 01:47:36 am »
Also, check your USB cable. The contact resistance can be high, on GND or Vcc or both. Specially on micro USB. The high GND resistance allows your board GND to move relative to the PCs GND potential, while Vcc stays the same. So in the connection transient you can have an unpredictable too low or too high Vcc for the MCU..

For this reason I’m using Type B usb whenever possible.

Another solution to add ~10-100nF || 1Mohm  from the generator GND to protective Earth.
 

Offline james_s

  • Super Contributor
  • ***
  • Posts: 21611
  • Country: us
Re: Ground issues when connecting different components
« Reply #6 on: April 19, 2023, 02:13:02 am »
That does sound like leakage from the suppression capacitor(s) in the power brick. It's fairly normal although it doesn't usually cause the problems you're experiencing.
 

Offline WatchfulEyeTopic starter

  • Regular Contributor
  • *
  • Posts: 123
  • Country: gb
Re: Ground issues when connecting different components
« Reply #7 on: April 19, 2023, 03:23:51 pm »
Thanks all. I did check the ground resistance on the USB supply - and it all checked out OK. About 0.5 Ohms, same as the VBus line.

However, this did get me thinking about the issue of ground impedance. I inspected the devboard PCB, and it's a two layer board, with the ground as copper fill areas. However, when I traced out the path from the ground breakout pin on the board, the route taken by the current to the MCU is very long, as it jumps from small copper island to copper island through a series of vias.   

The reset line is also very long as it connects to various switches, breakout pins, and debug port, making it probably the longest trace on the board.

So, I had the idea that maybe the current flow as the ground voltages equalised was coupling a glitch into the reset line, and this was what was upsetting the MCU. I modified the board by installing a 100 nF capacitor on the reset line, approximately 1 mm from the MCU pin, and also adding small ground wires to the MCU decoupling caps so that they connected directly to the MCU pins, instead taking the long route through a half-dozen copper islands and vias. This appears to have completely eliminated the crashing/rebooting issue.

I'm guessing now that if the devboard had been built with ground planes, that it might be rather more immune to this type of glitch.  Would this be a strategy if I wanted to build an MCU circuit, but wanted to keep it double insulated/not connected to mains earth?

If I want to use mains earth, then would it be right to just add a chassis ground connected to mains earth, and then high resistance couple it to signal ground (10-100nF || 1Mohm as suggested by @dobsonr741) ?
« Last Edit: April 19, 2023, 03:27:39 pm by WatchfulEye »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf