How important are shield grounded usb cables?

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
g3martin
 
Posts: 1
Joined: Thu Mar 09, 2023 12:42 pm

How important are shield grounded usb cables?

Post by g3martin »

I have now fried three microcontrollers on my keyboard from ESD in a year and a half. Two were KB2040s. All three times I sat down at my desk, put my hand on the keyboard, and received a static discharge from the case to my hand. After which my keyboard ceased to function. I have had several other times where the same thing happened but after reflashing the micro the board worked again. The first fried board I thought it was my magnetic usb cables, the second time I thought maybe it was the metal screws in my case, the third time happened less than a week after I switched the metal screws out for nylon, my case is FR4 plates. So now I tested my USB cables for continuity between the shields on each end. Only a couple of my cables have this feature, and those cables came with big brand name products like my Pixel Phone or my Dell laptop. Oddly enough, almost all of my really old cables, like 15 years old, have the shield grounding.

How important is shield grounded usb cables for small microprocessors like the KB 2040? Am I right in thinking that if I use a shield grounded cable, and that ground has a path to earth ground, that I will have less ESD damaged boards? I live in Colorado and its extremely dry in my house. ESD is really hard to avoid.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: How important are shield grounded usb cables?

Post by adafruit_support_mike »

A shield doesn't do much of anything for electrostatic discharge (ESD). A shield's job is to limit electromagnetic interference (EMI).

The difference is that ESD follows the metal, while EMF moves through space.

A typical doorknob spark is about 5 nanocoulombs of charge (if you have 5mA flowing through an LED, 5nC is the number of electrons that flow through in 1 microsecond) driven by about 1.5kV of energy. There aren't many electrons, but they *really* want to be somewhere else. To those electrons, every voltage in a computer or microcontroller looks like 'GND, plus maybe a small error'. When the electrons find a conductor, they'll flow through it no matter what it is.

What they won't do is jump from, say, a USB cable's D+ wire to a grounded shield, for the same reasons the regular D+ signals don't jump to the shield: the USB chip provides other paths to GND with much less resistance.


EMI is a wave that travels through the air (or vaccum) and has enough energy to make electrons move as it goes past them. That's not as exotic as it sounds, because electromagnetic theory tells us the energy that makes an electron move lives in the magnetic field around the moving electron. But by the same token, any electron inside the magnetic field gets pushed by the the energy stored in the field. So any time you have a magnetic field moving through space, it jostles any electrons it passes along the way.

Metals like copper have lots of easy-to-move electrons in a small volume of space, so an electromagnetic wave passing through copper can 'induce' a lot of current if the magnetic field has enough energy.

The thing about electrons moving in a conductor like copper is, once they start moving they have very little reason to stop. If we stop thinking about the copper as a wire and just think of it as a block, an electron that starts moving anywhere inside the block will keep going until it reaches the surface of the block. Then it has to stop because it takes a whole lot of energy to make electrons leave a metal like copper and jump into the air (around 1.5kV for a doorknob spark, for instance).

Because of that, we generally assume that all the electrons in a conductor that get moved by an electromagnetic wave end up on the surface of the conductor. Nothing happens inside the block because if something could happen, it would keep going until it reached the surface.

So with an electromagnetic wave pushing electrons to one surface of a conductive block, it creates a relative scarcity of electrons on the opposite side of the block. That's called 'separation of charges', which creates a fixed electric field that wants to pull the electrons back where they started.

As long as the fixed electric field is weaker than the current induced by the magnetic field, electrons in the block will keep moving away from one surface and toward the opposite one. As more electrons do that, the fixed electric field between the surfaces keeps getting stronger. Things finally come to a halt when the fixed electric field pulling electrons back where they came from is exactly as strong as the energy from the magnetic field pushing them forward.

As a result, everywhere inside the conductive block sees zero induced voltage *or* fixed electric field.

If you cut a chamber out of the center of the conductive block, nothing you put in that chamber will feel any effect from electromagnetic waves passing through the block. And since all the electrons end up at the surface, we can make a 'block' by wrapping conductive foil around the thing we want to isolate from external electromagnetic waves.

So: putting a tube of conductive material around a bundle of wires isolates the bundle of wires inside the tube from electromagnetic waves outside the tube.

If you have a circuit inside the tube, and connect the negative end of the circuit's power supply to the tube, the whole tube now looks like 0V to the circuit. The conductive path between the circuit and the tube makes it impossible for the tube to have any other voltage relative to the circuit (for a theoretical perfect conductor, and not without a whole lot of current for real conductors like copper), so the circuit is also immune to capacitive effects that could happen if the tube's voltage was allowed to change freely relative to voltages within the circuit.

The tube, obviously, is a shield.

USB cables did/do have shields, not to keep EMI from getting into the USB wiring, but to keep EMI from getting out.

Low-speed USB signals change at 1MHz, full-speed USB signals change at 12MHz, and high-speed USB signals change at 480MHz. All of those are radio frequencies. To make matters worse, we want the signals to be square waves, and fast-changing rising and falling edges are extremely good at generating electromagnetic waves that propagate through space. Long wires are also extremely good at generating propagating electromagnetic waves, so the average USB cable is basically an EMI nightmare.

The FCC has identified and outlawed the kinds of problems unshielded USB cables can cause, and mathematically the only difference between 'inside a shield' and 'outside a shield' is where you're standing at the time. Shields do just as good a job protecting the world from EMI generated by the wiring inside a cable as they do protecting the wiring inside the cable from the world.


That doesn't mean grounding is useless to you, just that you need to apply it in a different way.

When you're dealing with kilovolts, even gigohms are 'small' enough to let a few microamps of current flow through. And when you're dealing with nanocoulombs of charge, even microamps can drain an accumulated charge quickly.

Extending that reasoning to physical terms produces what are known as 'static dissipative coatings' like the pink or silvered plastic bags we use to pack components. Their DC resistance is high enough that most standard-range multimeters can't even measure it, but is still low enough to prevent doorknob-spark levels of energy from accumulating over time.

The best tool you can get is a static dissipative mat like this one:

https://www.adafruit.com/product/4405

Connect it to GND and keep your dev boards on it, and touch the pad when you first sit down to get rid of any static charge you may have accumulated. Do the same with conductive parts of any cables you want to connect to the dev boards.

Another option that works and is fun is to get a metal doorknob, connect it to GND through a 100k resistor, and use that as your touch-point for grounding.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”