PCB trace impedance from your Gerber files: every trace width, microstrip and stripline

Updated

Open a board's Gerbers with its job file and run the checks: Gerber3D lists the characteristic impedance of every trace width on every copper layer, and the differential impedance of every pair, from the stack-up the job file states. No typing widths into a calculator — the widths are the ones you routed.

See the sample's impedance table

The trace impedance table: each copper layer's trace widths with their impedance by formula and by field solution
Each width per layer, its impedance two ways, and how much of the board's routing it is.

What it computes

  • Outer layers: each trace as a microstrip over the next copper layer.
  • Inner layers: each trace as a stripline between its two neighbouring copper layers, symmetric or offset.
  • Differential pairs: traces of the same width running side by side, with their gap, as coupled microstrip or stripline: the differential impedance.
  • For each line: the width, the gap for a pair, how many traces and how much length the board has of it, the dielectric height, copper thickness and permittivity, the impedance under the solder mask, and the impedance by formula and by field solution side by side.

Two independent methods

Closed form: Hammerstad and Jensen's microstrip with its thickness correction, Wheeler's thick stripline (an offset stripline as its two symmetric halves in parallel), Kirschning and Jansen's coupled microstrip and Cohn's coupled stripline for pairs. Field solution: the quasi-static potential of the trace's cross-section, solved on a graded grid; its capacitance with and without the dielectric gives Z0 and the effective permittivity. Where the formulas hold, the two agree within a few percent, and the table shows how far apart they are.

What it assumes, said

  • The stack-up's thicknesses and permittivity from the job file; a permittivity of 4.3 (FR-4 at about 1 GHz) where none is stated.
  • The neighbouring copper layers are the reference planes; a split or hatched plane is not modelled — but the checks separately flag traces that cross a split in their plane.
  • Without a job file, a standard stack for display only: the figures are labelled as assumed.

Checking against your targets

The controlled impedance rule compares each line with the profile's targets — single-ended (50 Ω by default) and differential (85, 90 and 100 Ω) — within a tolerance (10 % by default). A width close to a target is taken as meant for it and judged; one far from every target is left alone. Set your own targets and tolerance in a custom profile. The rule is judged only on a stack-up the job file states.

How to get the job file

KiCad writes it with the Gerbers when Generate Gerber job file is on (see exporting Gerbers from KiCad); other CAD tools offer a Gerber X2 job file or stack-up export. Open it with the board's other files.

Questions

How is this different from an impedance calculator?

A calculator takes one width and one stack-up you type in. Here the widths come from the board itself: every trace width on every copper layer, and every differential pair, is computed with the stack-up the job file states, so you see what you actually routed.

Which methods are used?

Each line is computed twice, independently: by closed-form formulas (Hammerstad–Jensen microstrip, Wheeler stripline, Kirschning–Jansen and Cohn for coupled pairs) and by a 2D field solution of the cross-section. Both are shown, with the difference between them.

What if my files have no stack-up?

Without a job file (.gbrjob) stating the stack-up, a standard stack for the board's copper layers is assumed and the table says so; the controlled-impedance rule is then not judged. Export the job file from your CAD tool for real figures.

Does it include the solder mask?

Yes. The figure the rule judges includes the solder mask over outer-layer traces, which lowers a microstrip's impedance by a few ohms; when no source states the mask's permittivity, a typical value is assumed and said.

Is this a substitute for my fabricator's impedance calculation?

No. Fabricators tune the dielectric and the width to hit a target with their own materials and process. This shows whether your design is near its targets before you ask, and flags widths that are not.