EEVblog Electronics Community Forum

Electronics => Beginners => Topic started by: ankeakala on September 28, 2020, 08:05:39 am

Title: USB ground, USB shield ground, analog ground, power ground; grounding
Post by: ankeakala on September 28, 2020, 08:05:39 am
There is a topic or two about USB shield grounding, and what can be taken from there and, say, Arduino Leonardo schematic; USB shield should be tied to digital GND with a ferrite bead.

If that is so, should or could same be used to tie analog ground? If the ferrite bead is there to suppress noise coming from the USB cable shield, then it would probably not hurt to use ferrite bead in analog ground either? Less noise, more better?

How about power ground? Switching high currents on the opposite side of the board. Should there be split between that ground, the digital ground, the USB ground and the analog ground? All four. And at what point should those be tied together? Somewhere roughly where the signals conveniently meet?

EDIT: And the board is ATMega32U4 at 16MHz using external reference for ADC. So that is one concern but mostly corned about USB as the first version really does not seem to work when it comes to USB. In that version, every ground is just tied together through close-by via.
Title: Re: USB ground, USB shield ground, analog ground, power ground; grounding
Post by: ankeakala on September 28, 2020, 03:11:32 pm
Here's how it's now. Might roll with this, unless will come across something ground (ahem) breaking.
Title: Re: USB ground, USB shield ground, analog ground, power ground; grounding
Post by: T3sl4co1l on September 29, 2020, 03:09:01 am
It's embarrassing how often USB grounding is done wrong.  I don't know if it's the standards not being specific enough (or too specific for that matter), or a meme repeated through appnotes and so on, or what.

It's almost never a good idea to split grounds.  Any impedance to a shield (like USB housing) directly and negatively impacts performance.

And no, a mere alternate placement is not enough.  The shield impedance must be very low.  A trace to a chip component will incur a good 10 or 15nH of stray inductance.  At 100MHz, that's about 10 ohms reactance, which acts as an impedance divider against the cable's common mode impedance (which carries ambient noise).  That impedance might be 100-200 ohms, so the shield is only providing 20-26dB of actual shielding at this frequency.  And proportionally worse at higher frequencies.  ESD for example has energy up to 300MHz, and cellphones and other licensed RF users go well beyond that.  At those frequencies, the shielding may in fact go towards zero, or even negative (i.e., it acts as a matching network, bringing in even more energy to the device).

Whereas if the ground pins are tied to ground plane, the grounding impedance can be under an ohm, and shielding effectiveness of >>40dB can be had at all frequencies of interest.


Split grounds can be used in PCBs, but must be used very carefully, lest the ground loop voltages thus created cause problems even worse than otherwise.  (The point of cutting ground, is to increase ground impedance in some area; necessarily, the voltage drops between grounds will be higher.)

Tim
Title: Re: USB ground, USB shield ground, analog ground, power ground; grounding
Post by: Nominal Animal on September 29, 2020, 08:59:18 am
FWIW, in Teensy 2.0 (https://www.pjrc.com/teensy/schematic.html) and SparkFun Pro Micro (http://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/Pro_Micro_v13b.pdf) boards (both ATmega32u4), there is a single ground plane.  The USB ground and shield are connected to the ground plane at the connector.  Both of these boards have pretty good ADC performance, in my opinion.  Especially Teensy 2.0 is known to be a very robust design, still used in e.g. custom keyboards.  The SparkFun Pro Micro is also a very robust design (you can find full Eagle files as a zip here (http://cdn.sparkfun.com/datasheets/Dev/Arduino/Boards/SparkFun_Pro_Micro_v13a.zip)); so much so, that even the Chinese clones sold on eBay are suitable for hobbyists (I've used several, no problems yet) although they need to be treated as Arduino Leonardos due to the different (non-Sparkfun) bootloader, which makes the procedure to switch to programming mode a bit tricky.  (I use a helper script for that in Linux, for the Arduino environment; it not only reboots the Pro Micro clone, but also detects the new port (character device) it appears as for programming.)

Also, if you use EasyEda, you can find ports of the v13a (as in the Zip linked above) SparkFun design there, for easy examination (both schematic and board files).
Title: Re: USB ground, USB shield ground, analog ground, power ground; grounding
Post by: tszaboo on September 29, 2020, 11:55:40 am
Please dont take Arduino schematic and layout as an example for your designs. There are a lot of mistakes and bad practices on them.