Author Topic: Device power cycles when USB shield is connected?  (Read 2251 times)

0 Members and 1 Guest are viewing this topic.

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 279
Device power cycles when USB shield is connected?
« on: August 08, 2017, 02:01:10 pm »
Hi all,

I'm currently working on an MCU based battery powered device which is charged by USB. When the device is battery powered and you plug the USB connector into the device, or just brush the USB shields, the device will power cycle do to large transients on the power supply lines in the device. This problem is particularly prominent when the device is grounded through the debug interface. I have even tried connecting the USB shield on the device to GND through a 1M resistor but the project persists.

Has anyone else experienced this or understand what is happening?

Thanks!
 

Offline anishkgt

  • Frequent Contributor
  • **
  • Posts: 769
  • Country: qa
    • George Hobby
Re: Device power cycles when USB shield is connected?
« Reply #1 on: August 08, 2017, 04:47:20 pm »
I think your solution maybe in post#2 on this similar thread https://www.eevblog.com/forum/projects/help-interfacing-ftdi-with-existing-project/
 

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 279
Re: Device power cycles when USB shield is connected?
« Reply #2 on: August 09, 2017, 08:13:56 am »
Unfortunately my case isn't similar to theirs. The 5VUSB rail in my application is only connected to the battery charger IC on the board which determines the power path, cell or USB power. I see this issue just when the two shields are connected - nothing else.
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Device power cycles when USB shield is connected?
« Reply #3 on: August 09, 2017, 09:13:15 am »
I've seen quite often circuitry behave strange or going borked - common to all was USB shield not connected to circuit GND, or even worse - some kind of impedance (ferrite bead or inductor) in the shield to GND path.
I don't know what make people believe that _not_ solidly connecting the USB shield to circuit GND is a good idea. Must be some kind of misunderstanding of law of physics.

Connect the USB shield solid to your circuit ground, same point as the GND wire from inside the USB cable. Don't try anything else (except for proper isolation using a DC/DC and a USB isolator chip) - it just won't work.
By solid I mean ground plane, not PCB traces, pigtails or whatever. If you have a ground loop to break, you cannot do this at the USB port (except with a proper USB isolator)

BTW - You mentioned USB charging - do you have current sense resistors in the GND path? This changes things, you'll have to avoid DC ground loops, but doesn't free you from high frequency grounding your shields, try connecting the shield to GND using ceramic capacitors.
« Last Edit: August 09, 2017, 09:22:58 am by capt bullshot »
Safety devices hinder evolution
 

Offline BoscoeTopic starter

  • Frequent Contributor
  • **
  • Posts: 279
Re: Device power cycles when USB shield is connected?
« Reply #4 on: August 09, 2017, 01:14:15 pm »
I've seen quite often circuitry behave strange or going borked - common to all was USB shield not connected to circuit GND, or even worse - some kind of impedance (ferrite bead or inductor) in the shield to GND path.
I don't know what make people believe that _not_ solidly connecting the USB shield to circuit GND is a good idea. Must be some kind of misunderstanding of law of physics.

Connect the USB shield solid to your circuit ground, same point as the GND wire from inside the USB cable. Don't try anything else (except for proper isolation using a DC/DC and a USB isolator chip) - it just won't work.
By solid I mean ground plane, not PCB traces, pigtails or whatever. If you have a ground loop to break, you cannot do this at the USB port (except with a proper USB isolator)

BTW - You mentioned USB charging - do you have current sense resistors in the GND path? This changes things, you'll have to avoid DC ground loops, but doesn't free you from high frequency grounding your shields, try connecting the shield to GND using ceramic capacitors.

Hi Capt.,

So the circuit originally featured a direct connection from the shield to GND. In this case, naturally, these was a potential between the two grounds (caused by the loop). When connecting the shield a large current would flow to balance the two potentials causing a large spike in the power supply rails thus causing power cycling. Having review the circuit a component that would be particularly vunerable to this and always ending up in an undefined state did not have a decoupling capacitor on it's power input, adding one improved the circuit.

As for grounding the USB shield, many very large companies advise different things often contradicting themselves too. I have been through all of this before. I have an easier case where I do not have ANY USB comms - the USB is only used for power delivery.
 

Offline capt bullshot

  • Super Contributor
  • ***
  • Posts: 3033
  • Country: de
    • Mostly useless stuff, but nice to have: wunderkis.de
Re: Device power cycles when USB shield is connected?
« Reply #5 on: August 09, 2017, 02:09:18 pm »
I've seen quite often circuitry behave strange or going borked - common to all was USB shield not connected to circuit GND, or even worse - some kind of impedance (ferrite bead or inductor) in the shield to GND path.
I don't know what make people believe that _not_ solidly connecting the USB shield to circuit GND is a good idea. Must be some kind of misunderstanding of law of physics.

Connect the USB shield solid to your circuit ground, same point as the GND wire from inside the USB cable. Don't try anything else (except for proper isolation using a DC/DC and a USB isolator chip) - it just won't work.
By solid I mean ground plane, not PCB traces, pigtails or whatever. If you have a ground loop to break, you cannot do this at the USB port (except with a proper USB isolator)

BTW - You mentioned USB charging - do you have current sense resistors in the GND path? This changes things, you'll have to avoid DC ground loops, but doesn't free you from high frequency grounding your shields, try connecting the shield to GND using ceramic capacitors.

Hi Capt.,

So the circuit originally featured a direct connection from the shield to GND. In this case, naturally, these was a potential between the two grounds (caused by the loop). When connecting the shield a large current would flow to balance the two potentials causing a large spike in the power supply rails thus causing power cycling. Having review the circuit a component that would be particularly vunerable to this and always ending up in an undefined state did not have a decoupling capacitor on it's power input, adding one improved the circuit.

As for grounding the USB shield, many very large companies advise different things often contradicting themselves too. I have been through all of this before. I have an easier case where I do not have ANY USB comms - the USB is only used for power delivery.

OK, that's fine, you found the issue with the missing decoupling capacitor, good work.

Regarding the grounding: In my experience, if you have a computer as the host (even if for charging only), then you'd expect the GND wire and the cable shield tied together at the computer side.  Depends on the computer if the computers GND is tied to safety earth or not, but cable shield is tied to GND anyway. Best handled with GND wire and shield tied together at your side also (as this improves CMRR on the signals - doesn't matter in your case).

For an USB charger, I'd expect the cable shield tied to anywhere in the world - simply expect the worst you can think of. Most USB chargers I can imagine don't have safety earth, so the output is floating. In case the charger has safety earth, everything can happen: any combination of tied to safety earth and floating for shield and GND.

That's all OK as long as your device is floating. I think you know when the ground loops come into the game - if your device has more than one connector. In my experience, it's been still the best way to handle this to tie all the shields / GND together as solid as possible, to avoid the ground loop current flow through your circuit but bypass it the shortest way - if you cannot apply proper isolation. So the influence of the inevitable transient currents (while plugging in) and static (typically line frequency) currents on your circuit is minimized (by bypassing these currents).

Decoupling keeps the difference between the potentials of your circuit constant while the transient event - that's what you just found out and what keeps your circuit working as these transients happen.

As an opposite example - I had two USB hubs dying from transient GND currents flowing through them. The USB connector shells were connected to circuit GND via some inductive component, leading to enough voltage drop across to kill the USB hub chip. Shorting these ferrite beads saved the life of the third hub (of the same kind).

Another one: For some mystery reason (I had connected the USB connecter shell to GND which was formerly left unconnected), one of the devices we build was way less suspectible to EMC.
Safety devices hinder evolution
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf