Differential impedance calculator in Kicad?

I am trying to design a USB circuit, where the signaling is over a differential pair D+ and D- and these two lines are required by the spec to have 90 ohms of differential impedance. So, I am trying to figure out how to use Kicad’s PCB Calculator for “Coupled Microstrip Lines”:

I’m unsure about what a couple of the parameters mean and can’t find an explanation in the docs (it just refers you to the academic cite the calculator is based on).

  1. What is H_top? (“height of box top”) The default value is extremely large, 1x10^20 millimeters, which is about 10 light years, or about 7% of the distance from Earth to the nearest galaxy Andromedia. The number is way too large to have anything to do with my PCB…

  2. What is Roughness? Is the default of 0 reasonable for copper?

  3. Frequency. High speed USB is 480 Mbits, but is uses 10/8 encoding and some forward error correction, so it’s hard to say what the frequency is in megahertz.

What should I put for these? Are the defaults safe?

After some experimentation, I found that none of the parameters I mentioned affect the calculation of differential impedance (as long as they are non-zero values). So, I have answered my own question: it doesn’t matter what they mean for a USB circuit designer.

The only parameters that matter (that you cannot determine from just studying your PCB) are:

  • εr - the relative permittivity of the substrate. Kicad says it’s 4.5 for FR4, so I’m going to take the program’s word for now.

  • H - the height of the substrate. The board house is the only one who can provide this information.

Hope this helps someone.

High surface roughness will slightly reduce impedance. Rough copper has more surface area and will increase track capacitance, it will also increase conductive losses. Roughness helps copper adhere to the surface and it is a bit hard to get rid of. The surface roughness is typically 6um according to a quick google search.
Frequency is used to determine the losses of calculated transmission line and can be safely ignored if you only care about impedance. If you still want to enter a value you should use the highest frequency present in the signal (for digital signals it is derived from rise times).
There is another factor that can affect line impedance that is not taken into account in the calculator tool: Etch factor. Since most PCBs are etched the top side of the track is thinner than the bottom. As a result the effective track width is thinner than expected. Different PCB manufacturers might have different ways of representing etch factor or might not mention it at all.

As for your particular application (USB 2.0) you can ignore these parameters, focus on the εr and H and still fit the 10% impedance tolerance.

3 Likes

As for the value of εr, you should use the value specified by the PCB manufacturer you are planning to use for best results. Depending on the fiberglass to resin ratio, different types of FR4 will have slightly different values of εr.

1 Like

h_top means the distance to the top of a theoretical conducting cover over the whole circuit. The default value is essentially infinity, meaning there is no box around the circuit.

This parameter is referred to as h in this paper (one of the references from the docs): https://web.archive.org/web/20100614145428id_/http://www.ece.ucdavis.edu/courses/W09/EEC132B/pswd/mstrip1.pdf

2 Likes

The rule of thumb is fmax[GHz] = 0.35/tr[ns] (tr = rise time). For the worst case tr = 500ps (taken from USB 2.0 High Speed specification), it gives fmax = ~700 MHz. In vacuum, this has a wavelength of ~40cm. In FR4 - divide it by sqrt(Er), so it’s about 20cm. Another rule of thumb is a transmission line of length shorter than 1/10 of the wavelength is not really a transmission line, the signal ‘sees it’ as a lumped component. So:

  • if your USB PHY is 2 cm (or even 3 cm) away from the connector - don’t bother. Just put the traces in parallel.
  • otherwise, I think H_t is the distance of the second reference plane, so put an arbitrarily large value in there. I’m not even sure this is used for microstrip calculations. The result for 0.2mm FR4 (Er=4.6) is 10 mils width, 8.2mils spacing.

Tom

4 Likes

Highest fundamental frequency of 480 MBPS USB HS bitstream is 240 MHz.

As for the PCB calculator parameters, consider that it uses an approximated empirical formula. Most popular calculators don’t even have a box height parameter.

The KiCadPCB calculator is apparently assuming a rectangular trace profile which isn’t quite realistic, particularly with minimal trace clearance values. Expect a large variation of manufactured PCB impedance with 0.1 mm trace spacing chosen in your design.

On the other hand, cable/board impedance specs in USB standard is rather wide, Zdiff = 90 ohm +/- 15 % and Zcm = 30 ohm +/- 30 %. Latter value is slightly exceeded in your design, by the way, but no actual problem because SE signalling is slow and not affected by a few cm board trace.

1 Like

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