Advice routing a differential pair - Page 1
Forum section: electronics / beginners

author: uliano
author_rank: Regular Contributor
timestamp: April 21, 2024, 04:46:37 pm
content: I have this conundrum: USB to serial converter max 2 M baud, D+ and D- on the connector and on the chip have swapped position and so I have following options1) turn around, as I did here, is it better to match lengths as I did here (even at the cost of having some tracts going in opposite direction), or I couldn't care less?2) use a couple vias3) put the IC on the bottom side (I'll do it only if I must).

author: TrickyNekro
author_rank: Frequent Contributor
timestamp: April 21, 2024, 05:29:36 pm
content: If you can put your IC a bit higher to have straight lines going to it.At these speeds and and distances the difference between the length of the traces is negligible.The speed of the Serial port is not important, what is important is the speed of the USB connection, whichI would assume that it is full speed and not high speed.At the end, if you are so concerned with trace length matching, then put the IC pependicular to the connector andnot parallel, like it is now.I would be much more concerned to have ESD protection, if it is not provided by the converter IC,termination resistors if not provided by the IC and a common mode choke for the lines if you have to passemissions test ( not always needed but it helps with conducted ).

author: tooki
author_rank: Super Contributor
timestamp: April 21, 2024, 05:53:18 pm
content: You could do a simpler routing like in the sketch below in green. The yellow shows how you could route length matching if you really want to, but it won’t matter at this scale. TrickyNekro’s recommendation to add ESD protection is extremely good advice.

author: wraper
author_rank: Unknown
timestamp: April 21, 2024, 05:55:04 pm
content: Rotate IC by 90oand don't bother with routing traces between the pads. Or keep rotation as is and run D- with minimum length around D+ pin and wiggle D+ trace for length match. Not that it really matters for LS/FS USB modes to begin with, you could not bother with length match and it still would work fine.

author: ataradov
author_rank: Super Contributor
timestamp: April 21, 2024, 06:34:40 pm
content: Don't bother with length matching and differential stuff for USB 2.0. On a short distance like this it does not make any difference. For LS/FS is so does not matter that you can route one of the traces around the perimeter of the board and you will not see a difference.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: April 21, 2024, 06:46:31 pm
content: Don't worry about the length match. It's more important to keep the traces as close together as possible.

author: tooki
author_rank: Super Contributor
timestamp: April 21, 2024, 06:50:45 pm
content: Quote from: JustMeHere on April 21, 2024, 06:46:31 pmUm, no.Though it is completely irrelevant for such a short distance of USB 1.1/2.0 Full Speed (which is what a serial bridge chip will use), what you need for longer runs is proper impedance, which means calculating a specific trace width and spacing for a given thickness of dielectric (prepreg) to the ground layer below. Properly configured, the PCB layout software will then run the USB differential pair as an impedance-controlled pair, keeping their distance exactly right as you route it.

author: MathWizard
author_rank: Super Contributor
timestamp: April 21, 2024, 07:01:52 pm
content: I haven't tired USB from a microcontroller on a breadboard or protoboard yet, but I guess that won't be very fast speed, so it should be ok, well I'll know soon enough.

author: tooki
author_rank: Super Contributor
timestamp: April 21, 2024, 07:13:31 pm
content: Quote from: MathWizard on April 21, 2024, 07:01:52 pmIt’ll be 12Mbps regardless of what serial baud rate you use. So some care is needed.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: April 21, 2024, 07:19:01 pm
content: Quote from: tooki on April 21, 2024, 06:50:45 pmAre you saying that increasing loop area doesn't slow down propagation and doesn't increase EMI?

author: tooki
author_rank: Super Contributor
timestamp: April 21, 2024, 07:24:02 pm
content: Quote from: JustMeHere on April 21, 2024, 07:19:01 pmDid you see me say any of that? Nope.But “as close as possible” is incorrect. And so is running the two traces separately, which I never said. That would be very much not impedance-controlled, of course.

author: ataradov
author_rank: Super Contributor
timestamp: April 21, 2024, 07:26:18 pm
content: Quote from: JustMeHere on April 21, 2024, 07:19:01 pmIt does, but you won't see a practical difference at FS speeds. It is really hard to screw up USB FS. You really need to go out of your way.Every time a talk about impedance matching for USB 2.0 comes up, I remember that in old PC cases USB connectors were on the rear panels that went to the motherboard via ribbon cable and standard 0.1" connectors. In conditions like this bother with impedance matching 1/2" of PCB traces is just not necessary.This is like audiophiles with oxygen free copper power cables that they plug into their 1930s aluminum wiring.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: April 21, 2024, 07:43:52 pm
content: Quote from: ataradov on April 21, 2024, 07:26:18 pmI get it. This is too small to care. But the extra bump added to help match distances in the OP isn't doing as much good as it could be doing bad. It really just shouldn't be there.

author: JustMeHere
author_rank: Frequent Contributor
timestamp: April 22, 2024, 02:07:38 am
content: Quote from: tooki on April 21, 2024, 07:24:02 pmYes. Right after you had to show your usual useless negative attitude with that "um no" crap. Quit trolling it's never appreciated.That extra bump in the pair will create more noise than it matches impedance. Does it matter in this case? Probably not. Should it have been added: no..

author: uliano
author_rank: Regular Contributor
timestamp: April 22, 2024, 02:40:27 am
content: Lots of take home here, thanks.Even if in this particular case length doesn't matter, for the sake of exercise I took the advice of some and came up with this, which is at least much more aesthetically pleasing.About ESD, in this specific case I'm not worried at all: it's just a proto board for my own use and I, unfortunaltley for most reasons but luckily for my CMOS devices, I live in a region where 60% humidiy is an extremely dry day. However that could be the occasion to learn something.What should I have used here? TVS?

author: ataradov
author_rank: Super Contributor
timestamp: April 22, 2024, 03:05:16 am
content: And now that you've done the exercise, straighten the trace, so it does not look like it was routed by the same person routing Pi Pico.

author: uliano
author_rank: Regular Contributor
timestamp: April 22, 2024, 03:54:03 am
content: yessir!

author: tooki
author_rank: Super Contributor
timestamp: April 22, 2024, 05:47:37 pm
content: Quote from: JustMeHere on April 22, 2024, 02:07:38 amIt’s not “negative attitude” and it’s not trolling, it’s just correcting factually incorrect statements. If you don’t want to be contradicted, then don’t say things that are incorrect.