Kicad differential pair routing not producing same length traces

Hi,
I have a usb connector to add and when i use differential pair routing it creates a differential pair. But when i click on the individual traces on the bottom of the screen the length of the traces is shown and there they are not the same length. One is 18.5 mm and the other 15.3mm. Is there a bug in the way it calculates length of the traces or is the differential pair routing not working?

After routing it you will need to tune it with command 8, 9.

Have a look at the ‘Route’ menu in Pcbnew.

Hi thanks for the reply.
I can select tune track but then it will say something like : too short 18.5mm/100mm. I dont understand what it means. I would assume that a differential pair would be created in such a way that they are the same length. If i try to tune it now i have to move my mouse to the bottom of the screen, it will think for a while and come up with a little loop that still doesn’t make it the same length.

Maybe i am not understanding this well enough.

Is differential routing where 2 tracks are always the same distance apart and the length of the track is not regarded?

For usb data lines, should the tracks always be the same distance apart for impedance, or should they be the same length?

Hope you can help me out!

The 100 is a preset.

Select command 7 click on the longer track. Then Ctrl-L opens up a form to set the target length. Enter the longer track length as target length. Then do a 7 on the shorter track and tune by dragging the cursor.

You have to play with those settings to get the hang of it. It does work though.

Thanks for the good advice. That ctrl L feature is really important but if you dont know it you cant do anything with differential pair routing.

I think it’s somewhere in the documentation, and listed as a hotkey.
However an entry in the Route menu seems missing.

I’ll make a plug for my plugins.

You can use pad2pad action plugin to get the distance of the longer net, so you know what to set the target value.

Or you could use Length_stats action plugin, and just make two nets equal in length.

Wasn’t there some hotkey to just grab the length of a selected net and auto-populate that target length field?

to answer your other question though, USB2.0 spec is tolerant of several cm of length mismatch.

1 Like

It is there in the context menu (mouse menu button anywhere in the board) while in any one of the three track tuning modes. Here is the full menu while in any track tuning mode:
2019-07-31%2010_36_53-

While the three track tuning modes have the same looking context menu, each will pull up a different settings window with the bottom entry (the keyboard shortcut Ctrl-L) depending on which tuning mode is active.

More generally, please be careful when talking about keyboard shortcuts, and if possible also use the names from the menus. For example, I had no idea what you were talking about with “command 7” for two reasons.

  • First, I don’t have the keyboard commands memorized (I suppose that is my failing :man_shrugging:).
  • Second, I’m not on, nor do I commonly use, a Mac. I do remember that “command” is one of the Mac keyboard modifier keys, but I didn’t remember the translation to a windows keyboard modifier keys. I now know that “command” => “alt”, but because I don’t need to use that bit of information often I may forget again in a week. :wink:

So for those playing along who haven’t fired up KiCad to see what command/alt 7, 8, and 9 do, here is the Route menu:
2019-07-31%2010_39_05-
(I’m on windows so you will see “Alt” in the keyboard shortcuts. Sorry Mac users. :stuck_out_tongue_winking_eye:)

3 Likes
  1. In my opinion the feature should be called “multiple tracks”, “dual tracks” or “parallel tracks”, since differential pair is the name of the signaling method and does not inherently require any special kind of routing. The parallel tracks routing is often used for EMI purposes.

  2. Neither the signalling method nor the parallell routing is has really anything to do with the need for length matching. Length matching becomes important when signal speeds gets higher. Signal speed does not necessarily have anything to to with the need for parallell tracks or differential pair.

All though, very often high speed signals need length matching and also fast switching causes EMI issues and therefore parallel routing can be necessary. It is also easier to length match parallel traces, from a practical point of view.

For instance, you’ll might consider a gate drive signal high speed, but it is single ended and therefore parallel routing and length matching makes no sense.

Also, in the case of a long trace on a PCB which is connected to an analog sensor where the signal is not amplified yet, you might consider parallel routing of the signal and the return path for EMI purposes. But it is not differential signaling nor will length matching help improve the case for the signal.

Edit: I realize the correct term for parallel routing is “balanced lines”. This is snipped from wikipedia on differential signaling:

Resistance to electromagnetic interference

This advantage is not directly due to differential signaling itself, but to the common practice of transmitting differential signals on balanced lines.[2][3] Single-ended signals are still resistant to interference if the lines are balanced and terminated by a differential amplifier.

1 Like

As mentioned above, USB (FS or HS) does not need super-precise length matching.
So long as they are not wildly different, or running thru a SMPS block :wink: , you will be fine.
Your routed image looks quite ok as it is.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.