Blog ·
Routing 1,554 open boards in under a minute: what broke
Sergey Alekseev
PCBKit has a library of open boards by their authors: keyboards, synthesizers, radios, FPGA boards, robot controllers, all converted from KiCad. That library turned out to be the best test a PCB router can get. Every board in it was routed by a person who cared, under real design rules, and every one of them is different.
So we made it the router’s exam. For each of the 1,554 boards: keep the parts, the outline, the rules and the copper pours; strip every track and via; give the router 60 seconds and 8 threads; then check the result. A board counts as solved only if nothing is left unrouted and the routing added no error the design checker can see.
A two-layer radio board (HBR MK2 RX/TX by Aleksander Alekseev, MIT) routed again from bare pads, replayed from the router’s own recording.
The ceiling is not 100 %
Before blaming the router we ran the same checker on the authors’ own routing. 855 of the 1,554 boards pass it. The other 699 have problems of their own under the rules they ship with: courtyards that overlap, clearances that are too tight, thermal reliefs with too few spokes, outlines that don’t close, parts off the board. Real designs are messy, and a router that “solves” them would have to break their rules.
So there are two numbers to watch: solved out of all 1,554, and solved out of the boards whose own routing is clean.
From 52 % to 69 %
| Sweep | Solved | Of the clean ones | Over 60 s | What changed |
|---|---|---|---|---|
| base | 806 (51.9 %) | ~65 % | 334 | where we started |
| v4 | 849 (54.7 %) | 67.9 % | 34 | the refill 8× faster, a time plan that keeps the minute |
| v5 | 936 (60.3 %) | 71.3 % | 30 | KiCad rule fidelity, pour pads |
| v7 | 1,063 (68.4 %) | 79.0 % | 27 | fills thinned, faster access probes, stitching fixed |
| v10 | 1,102 (71.0 %) | 80.3 % | 30 | tracks counted as spokes the way KiCad counts them |
| v12 | 1,072 (69.0 %) | 78.6 % | 35 | an honest thermal-relief check (below) |
The last line went down on purpose. Sweeps v7 to v11 were optimistic about one kind of error, and we would rather publish 69 % that holds than 71 % that doesn’t.
On the boards it solves, the router uses 0.46 times the authors’ vias and 0.86 times their track length. (Authors stitch pours with many vias; the router doesn’t.) Size matters a lot: of boards under 50 connections it solved 403 of 432; from 400 connections up, 18 of 112.
What was actually wrong
Most of the gain did not come from smarter search. It came from finding out where the time and the copper went.
Quadratic code hiding in plain sight. Grouping a board’s pour fills compared them edge by edge. On a board with 1,221 connections that took 80 seconds before routing even began. A sweep over nearby edges: 0.14 s. The judge that picks the best of several routing attempts had the same habit: 94 s down to 0.17 s.
Refills. Filling copper pours ran 5 to 10 times per routing and took 8.4 s on one four-layer keyboard. Layers now fill side by side, repeated fills are cached by a hash of their inputs, and another net’s fill counts as one obstacle instead of thousands: 1.0 s. On another keyboard, every offset of an outline that bends by a hair doubled its vertices, until one fill had 800,000 of them, 600,000 closer than 10 µm. Thinned to 1 µm: 22 s became 4.3 s.
Comments that weren’t. KiCad’s custom rule files allow comments starting with #. We parsed
them as rules. 46 of 107 rule files in the library have commented-out rules, and on one board a
commented 0.16 mm minimum took back every track the router laid.
Conditions we didn’t know. Rules in KiCad can say isPlated(), memberOfFootprint(),
Pad_Type and more. We didn’t understand some of them, so rules meant for non-plated holes applied
to every via: 44 false errors on one board’s own routing.
Thermal reliefs. A pad in a copper pour connects through a few thin spokes, and a design rule asks for at least two. Our checker counted starved pads 1.6 times as often as KiCad does (194 to 123 on 30 boards). KiCad 10 counts where the fill’s outline crosses the pad’s, counts a track only where the fill has a spoke of its own, and checks each layer of a through-hole pad by itself. After matching that, it is 121 to KiCad’s 119 on the same fill. Then we found the other side: a margin we had raised to hide rounding made spokes stop short of their pads, so some starved pads passed. Putting the margin back is the v12 drop in the table.
An independent judge
Our own checker grading our own router is not enough. So we export routed boards back to KiCad and run KiCad 10’s design rule check, with KiCad refilling the pours itself. Of 150 boards the latest sweep solved, 87 come out as clean as the authors’ originals. Where they don’t: starved reliefs (37 boards), dangling track ends (16, warnings), isolated copper (9), and 17 boards where KiCad’s refill splits copper that ours joins.
What’s next
- Large boards. On a 300 × 120 mm keyboard one negotiation round takes 3.3 s on a grid of 5.9 million nodes, and most of it runs on one thread, because its long nets’ windows all overlap.
- Fine-pitch pads. Some pins of 0.5 mm QFNs and 0.4 mm BGAs are still unreachable on the router’s grid, though the authors’ tracks to them pass the checker.
- Clearances between classes. Mains boards need 4 mm between mains and low voltage but only 2 mm between mains nets; the router keeps one clearance per net and boxes some pads in.
The full experiment log, including what we tried and refuted, is in our research notes, and every number above comes from a sweep we can run again. If you design boards and want to see how the router does on yours, open it in PCBKit: it’s free, it runs in your browser, and your files stay on your computer.