Author Topic: USB device circuit design  (Read 14815 times)

0 Members and 1 Guest are viewing this topic.

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1195
  • Country: si
  • I like to measure things.
USB device circuit design
« on: May 22, 2013, 06:15:09 pm »
Hello!

I'm working on a project that uses an FTDI USB-UART converter to communicate with my computer. I am trying to make my circuit as robust as possible from the ESD and EMI point of view. I have read several articles on the internet and most of them recommend terminating the USB shield to circuit ground with a parallel combination of a 4.7nF capacitor and a 1M? resistor.
You can see, I also put a ESD suppression device on the USB data and power lines. The thing that bothers me, however, is that some application notes recommend connecting that ESD suppressor GND to USB shield, others to main circuit ground. Which of the two is better and why?
Please see the attached schematic below.

Cheers,
Dave
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline Paul Price

  • Super Contributor
  • ***
  • Posts: 1419
Re: USB device circuit design
« Reply #1 on: May 22, 2013, 06:29:21 pm »
Connect it to the USB shield as you want to shunt noise attempting to upset the USB data wires to its ground reference. If you can, avoid connecting the USB ground to the chassis ground as there often exists high current, low voltage AC powerline ground currents caused by the PC mains AC input power supply EMI filtering capacitors that create dangerous ground loops currents  than can likely zap your USB at the computer or at the peripheral you are connecting to at the instant of connection.
 

Offline daedalus

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
Re: USB device circuit design
« Reply #2 on: May 22, 2013, 07:16:39 pm »
The normal rule of thumb is that you ground shielding in cables at one end only. The shield and ground will be connected at the A end of the cable by the motherboard you are connecting to, so should have the RC circuit you mention on the device at the B end.

The other recommendations may be for ESD protection at the A side of the cable, where such connections should be made.

The following link covers the protections I tend to throw on as standard.
http://www.digikey.co.uk/Web%20Export/Supplier%20Content/Wurth_732/PDF/Wurth_The_Protection_of_USB_20_Applications.pdf?redirected=1

 

Offline asgard

  • Regular Contributor
  • *
  • Posts: 119
  • Country: us
Re: USB device circuit design
« Reply #3 on: May 22, 2013, 08:15:17 pm »
This is the approach I use when connecting to USB.  L1 is the ferrite bead.  The capacitor is a 1uF device across V+ and V-.
Klaatu Barada Nikto!

J.R. Stoner Bifrost Development Group asgard@jeffnet.org
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 7211
  • Country: us
    • SiliconValleyGarage
Re: USB device circuit design
« Reply #4 on: May 22, 2013, 08:36:16 pm »
what's your box look like ? plastic ? metal sputtered ? metal ?

if metal sputtered or metal you want to tie that metal to the usb shield ( Not the system ground ! . you want any energy picked up by the case to blasted into the shield of the usb cable.


the drawing below gives the principle.

The red outline is the metal box containing circuitry. The red box is connected ONLY to the metal shield of the USB connector ( or RS232 or other connector ). inside the USB cable ( if it is a properly onstructed one and not a one-hung lo) there should be NO electrical connection between the cable GND abd the cable shield. the cable shield is a foil warapped around the 4 conductors (vbus,gnd,d+ and d-) and connected only to the plug shield.

if an ESD strike occurs on your device ( the metal box around it ) the current (thick dashet pink line) will flow only through this shield , through the connector sield, through the host casing and into the ground ( provided your computer is grounded. ) none of this current flows in your system signals or system ground. so no harm. if it were to flow through system ground it could create a vlotage delat ( any stub of wire has inductance and resistance. a fast transient will create a large standing voltage across the cable. and all of a sudden the voltage between vbus and cable ground would be superimposed on the voltage across cable gnd created by the zap. so you do not want to send the energy in your ground return. you need that shield return

There is a bit of parasitic capacitive coupling (thin dotted lines) in the cable. part of the zap energy may (will...) be coupled into the signal lines and create a voltage delta there. that delta can be large enough to still kill sensitive circuitry. Enter the esd protection diode. any coupled energy ( blue thick dotted line ) will be shunted by the protection circuitry. so it cannot enter the real circuitry.  i fogot to draw the protection diode in the host. but there it will be shunted as well.

so, no matter how you zap this thing the bulk energy is deviated to earth , the capacitively couple smaller energy is absorbed by the protection.

to make the the loop between cable gnd and system ground equipotential you use the 4k7 parallel with the cap. since the transient is a very fast signal it will be shorted by the small capacitor. ( for a fast transient that cap is a virtual short. ) residual standing voltage across the cap is then discharged through the 4k7.  so the cap is the real energy deflector. the resistor is simply there to discharge the cap after the event. ( you don't want the energy shot into the cap bouncing back from the cap back into your system. )

that is the ESD protection principle.

if you do the PCB layout you should ideally have a ring around the entire pcb ( a trace about 20 mils wide that goes around the entire circumference of the board and is connected to the all connector shields and to the screw holes that will mount the board to the chassis. this trace should be free of soldermask. for doublesided boards : run trace on top and bottom and stitch via's every cm or so.

if you use a plastic case with vent holes or slits : the esd strike may go through the holes and be attracted by the low impedance path. that nice low impedant shield ring you put down , that has no soldermask, is a damn good attractor. you bet it will strike there .. doing no harm.  you may need to study where the vent holes are and provide extra strips of copper attached to that shield ring. or you can mount a piece of copper tape or bent metal electrically connected to that ground ring.

i posted a picture on this forum long ago ( several months ) that showed a pcb layout with exactly such a construction. can't remember  what topic.

What asgard above suggested ( the ferrite bead in VBUS ) only protects your system power rail against a coupled in discarge into vbus. but you typically have so much capacitance between vbus and cable gnd tha that energy is absorbed. the ferrite bead is an EMC solver , not an ESD solver .

any noise generated by your system will either radiate ( and be captured by the metal box and grounded ) or be distributed conductive.
that's where ferrite beads and common mode chokes com into play.

a ferrite bead in vbus stops any crap you generate from sneaking out via the connector onto the cable... and stops any crap picked up along the way from sneaking into your system. just make sure to shunt the emc energy to cable ground ( NOT the shield ! )  by placing a small cap ( 47pf) between vbus and cable gnd , before the ferrite bead.
for the data lines you place a common mode choke. this leaves the differential nature of the signal intact but kills off any crap pikced up bye the data lines stone cold. the data lines are a twisted pair so whatever they pick up is an in-phase signal. so common mode choke is the answer. TDK has really nice ones for that purpose. common mode chokes also stop small esd pulses.
« Last Edit: May 22, 2013, 08:43:26 pm by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline Neilm

  • Super Contributor
  • ***
  • Posts: 1423
  • Country: gb
Re: USB device circuit design
« Reply #5 on: May 22, 2013, 08:47:15 pm »
I had to look this up a while ago when designing an instrument that had a USB port - there seemed to be a different recommendation for every site. I have seen several different connections made and they all worked and passed the relevant tests.

The actual answer to your question will very much depend on the design of your device and the EMI policies you are using. If you are designing something connected to mains in a metal box you will almost certainly have a connection to Earth. In which case you might want to connect the shield of the USB connector and the ESD protection device to Earth as the voltages you will encounter will be referenced to that.

However, if you are designing a battery powered gizmo that has no connection to Earth then you more or less have to connect the ESD suppressor to 0V.

When reading these datasheets, always be aware that sometimes the writer will use the words "Earth" and "Ground" to refer to 0V. This is incorrect. Earth and Ground refer to the safety Earth most commonly found on mains supplies. I try to refer to 0V as 0V and the safety / shield as ground.

Where ever you connect the ESD suppressor to, I would suggest you pay close attention to the layout. Get the suppressor as close to the connector as possible and pay attention to where the transient currents will flow.

Neil
Two things are infinite: the universe and human stupidity; and I'm not sure about the the universe. - Albert Einstein
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 1294
  • Country: ca
Re: USB device circuit design
« Reply #6 on: May 23, 2013, 12:24:32 am »
what's your box look like ? plastic ? metal sputtered ? metal ?

if metal sputtered or metal you want to tie that metal to the usb shield ( Not the system ground ! . you want any energy picked up by the case to blasted into the shield of the usb cable.

the drawing below gives the principle.
...

Excellent summary, I've always been a bit unsure due to mixed recommendations and copy/paste screw ups on schematics.
 

Offline Dave

  • Super Contributor
  • ***
  • Posts: 1195
  • Country: si
  • I like to measure things.
Re: USB device circuit design
« Reply #7 on: May 23, 2013, 08:21:47 pm »
First of all, thank you all for contributing, especially free_electron. You have provided plenty of invaluable knowledge. :-+

My circuit will be enclosed inside an ABS plastic box. The device will be USB-powered. Only two cables will run out of the enclosure and those will be connected to two pulse transformers with TVS diodes one the other side for protection. See the attached piece of my schematic below (both cables will be connected the same way).

I haven't got much knowledge about common mode chokes. Which specifications should I be looking for when selecting one? This one should be ok?

If I understood correctly, I should connect the USB ESD suppressor's GND pin to my circuit ground and connect that ground to the shield with a cap & resistor, as close to ESD suppressor as possible?
free_electron, you mention putting a small capacitor between Vbus line and GND line in front of the ferrite bead. Will the capacitor that's connected in parallel with that ESD suppressor be sufficient?

I will provide some images of the laid out board for review, when I get that far.
<fellbuendel> it's arduino, you're not supposed to know anything about what you're doing
<fellbuendel> if you knew, you wouldn't be using it
 

Offline asgard

  • Regular Contributor
  • *
  • Posts: 119
  • Country: us
Re: USB device circuit design
« Reply #8 on: May 23, 2013, 11:58:33 pm »
To my thinking the circuit I sent in earlier is really an L-C low-pass filter that strips out everything above the 6MHz (or 12MHz) band pass limit for USB signals.  At least it should :)
Klaatu Barada Nikto!

J.R. Stoner Bifrost Development Group asgard@jeffnet.org
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf