USB traces for full speed - impedance? - Page 1
Forum section: electronics / beginners

author: Saimoun
author_rank: Frequent Contributor
timestamp: June 18, 2022, 02:22:59 pm
content: HiAs I understood USB signal traces DM/DP should be:* same length* not too long (8 inches max I heard?)* have a differential impedance of 90 OhmWhat about vias?And is impedance that important for full speed? because with a 2 layer 1.6mm thick PCB it seems I need about 1mm thick traces to get 90 ohm.Thank youSimon

author: voltsandjolts
author_rank: Unknown
timestamp: June 18, 2022, 02:54:29 pm
content: For 12MHz Full Speed, relax, it'll be fine with 'sensible' routing, nothing special.

author: gamalot
author_rank: Super Contributor
timestamp: June 18, 2022, 02:56:51 pm
content: Full speed works at 12Mbps and you don't have to worry about it too much.https://www.nxp.com/docs/en/application-note/AN11392.pdf

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 18, 2022, 03:19:13 pm
content: It's basically plain old 3.3V HCMOS logic levels. Very noncritical. Just don't violate CM noise limits -- keep a solid shield from cable to connector to ground plane.Tim

author: Saimoun
author_rank: Frequent Contributor
timestamp: June 18, 2022, 07:26:12 pm
content: Okay that's what expectedThank you all for the replies

author: voltsandjolts
author_rank: Unknown
timestamp: June 18, 2022, 08:09:00 pm
content: Quote from: T3sl4co1l on June 18, 2022, 03:19:13 pmOh. To avoid any dc return in the shield, on my usb device side I always place 100nF between the USB connector body (cable shield) and the pcb ground plane. So, not a solid connection. Is that a mistake?

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 19, 2022, 04:15:55 am
content: Yes, but not in spirit -- DC is irrelevant, and that can be useful for some purposes. (Though I don't think it ever matters for USB.) AC shielding is all that matters. So it comes down to the impedance of that single cap, plus connecting traces and pins. Which will be around 6nH for a chip cap directly beside the connector, and a via to GND as close as possible. Probably adequate for emissions purposes, and okay for commercial level RF immunity (3V or 3V/m, at least at low frequencies; maybe it fails in the 100s MHz still), but where it really comes up lacking is fast transients and ESD (significant spectral content >100MHz, huge voltages).Consider your typical USB-B connector (people still use USB-B, right?), it has two thick ground pins and four regular size signal pins. Use four chip caps, flanking the ground pins; the caps in turn, each flanked with pairs of vias to GND. Imagine a line between GND pins as the letter 'I', and the caps are the serif on top and bottom. Or a short, wide 'H'. Then imagine the GND vias are serifs on serifs. This keeps the inductance very low indeed, so there are two parallel paths to GND either side of each cap (saves a nH or so), and there are parallel paths through a pair of caps from each GND pin (saves ~2nH). (You can draw in the literal line between GND pins too, that's fine; won't do much, I think.)Or for mini/micro/C, most have four shield pins, or large pads; same idea, flank those. One cap per pin is fine in that case, or near the corners of the large pad(s).It's not about the pins, it's about getting a wide based connection, spreading out the shield current over the width and length of the connector body. It doesn't do very much to stack up the caps all in the same place -- or use a wide-body cap, which is also an option -- it does help, mind, as the wide body style will around halve the inductance of the connection. So it's like using two regular chips in parallel. Not worth going out of your way for, y'see. (But they are nice, if you need a lot of low impedances -- something with FPGAs, application CPUs, etc., can reduce parts count for same PDN performance using them. And then you're free to use them everywhere else. Two of those would probably be okay for shield GND.) Anyway, having them spread out, reduces coupling between traces (or indeed across a wider trace/body), keeping impedance lower for the same parts count.Also, having more than four, probably isn't useful as the connector and geometry will start to dominate; you can't avoid the fact that it's got two pins. Well, you can if you add shielding springs, say; if you needed to handle really high levels of EMI, maybe that would help! Or you might need a metal/shielded enclosure by then anyway, and EMI springs to that will do even better. But you'll still be limited by the performance of the connector mating itself, which is only so many points around the connector -- it's not a continuous metallic seal, there will be some voltage drop still. Clean connectors should get better than, oh Idunno, ballpark 80dB attenuation versus outside noise -- so it's enough to ride through typical levels of EFT and ESD without disrupting the comms, or with a few retransmissions of packets when it's infrequent (like ESD). (EFT does knock out comms -- have seen it before myself; at worst, one might need to reset the peripheral or its driver, or if that's not possible, reboot the whole system!)Note that shield is almost always circuit GND anyway (I don't know of any devices where it isn't?), so by discarding the shield you're only increasing voltage drop across the cable: instead of VCC alone + (GND || shield), you have VCC + GND alone. Worst case, I suppose there's some 100s mV DC between GND and shield, from some odd (poorly constructed?) host device? Even then, you're shorting out their GND loop, not really even reducing current capacity as a result because most of that voltage will drop across the GND wire while your load current flows mostly in the shield anyway.Mind, not saying it doesn't happen -- I just don't know that it does. I also don't recall if the USB standard stipulates anything about that; a refresher would be illuminating. The standard is free and open, give it a look.I think, probably the worst part of the standard, was allowing GND and shield to separate -- they give diagrams of how to do this, but critically, they don't make insistence aboutwhenyou should do this. It's a decision to leave to the EMC experts, and 99.9% of cases should use the non-separated case. I think most people who have seen this section / diagram, figured GREAT, let's just do it that way, nothing to worry about! So you see weird shit like a ferrite bead between shield and GND, or spare pads for RLCs as if some magic combination of those will pass -- but-10nHchips are in exceedingly short supply.FWIW, the case where it's acceptable to separate shield and GND (and by separate, I mean it doesn't matter having any connection onboard*), is when shielding is provided by other means -- typically EMI springs to a metal enclosure. You still have to worry about EMI inside the enclosure -- but self interference is generally easier to control, and lower level (unless you're doing power electronics). This is how you can have e.g. PC motherboard with USB onpuny stupid 0.1" pin headersup to a panel mount connector: the unshielded length of header pins and wiring -- a shielded cable is usually still used, but there's an inch or so where it's cut back at the end -- aren't so much of a problem, because there's probably well under a volt of noise inside the box. Or if it's like right-angle PC mount connectors, then the PCB can be grounded to the enclosure through nearby standoffs/screws (the connector shell again grounded to enclosure, so the loop between enclosure and PCB GND is short).*You might still want SOMETHING, for debugging purposes -- when you're testing the board outside the enclosure. You could add some caps or jumpers, and DNP them in production for example.But yeah, even so, I think most applications that could do it this way, choose not to, anyway; you see a lot of circuit grounded USBs on e.g. PC expansion cards I think?Tim

author: voltsandjolts
author_rank: Unknown
timestamp: June 19, 2022, 08:15:16 am
content: Thanks Tim. Given the choice I tend to avoid using shield as a dc path. Perhaps that is more defensible when devices at each end of a cable have their own independent earth/shielding. But for 'floating' USB devices I'll take your advice and use solid shield/connector/ground plane connection from now on.Quote from: T3sl4co1l on June 19, 2022, 04:15:55 amNo guidance there really, just a generic statement...Quote

author: planet12
author_rank: Regular Contributor
timestamp: June 20, 2022, 09:44:51 am
content: Although you say "full speed", hence 12Mpbs and therefore not terribly critical, you might learn something useful from this video:"High-Speed PCB Design Tips - Phil's Lab #25" -https://youtu.be/VRJI0X-6yTgFollowing the guidelines in the video, even for slower speed, will not do you any harm - and will possibly make your project more robust.

author: Saimoun
author_rank: Frequent Contributor
timestamp: June 21, 2022, 02:16:08 pm
content: Thanks Tim as always very usefulI personally connect my metal enclosure to GND directly using only one screw, and the USB chassis is also connected to GND directly (because it does not touch the enclosure), only on one side to avoid having currents going through it.Thank you for the video link planet12 - very informative indeed.I like Phil's videos, though I have to say sometimes, I look at his beautiful board and think:1) it is huge2) it has 3 components on it3) it's a 4 layer board.Well that makes it pretty easy to route things nicely! My board is tiny, has so much shit on it, and I'm trying to reduce cost so it has only 2 layers. But no very high speed signals (actually 12Mhz of USB is probably the fastest), so everything is alrightAnother point I keep thinking is why is there no ground on the top layer? I get that it is not needed, because the middle layer is just 0.2mm underneath, but why not? I mean can it ever be a bad thing to have too much ground?<-- I thought this deserved a new topic:https://www.eevblog.com/forum/beginners/can-you-have-too-much-gnd/