makeIRLEngineering notes

KiCad

Freerouting with KiCad: How to Autoroute a PCB (DSN/SES)

KiCad has no built-in autorouter. Export a Specctra DSN, route it in Freerouting, import the SES session, then clean up and re-run DRC. Step by step.

Published Updated

KiCad has no autorouter of its own

KiCad’s PCB editor has an interactive router with push-and-shove, but it does not include a built-in autorouter. The common route is Freerouting, an open-source autorouter that exchanges files with KiCad in the Specctra formats: you export a DSN file (the design), Freerouting routes it, and you import the resulting SES file (the session) back into the board.

Some plugins wrap this exchange so it runs from a button inside KiCad. The manual flow below works regardless of plugin and shows you what is being exchanged.

Step by step

  1. Finish placement first. An autorouter only connects pads; it cannot fix a bad layout. Place decoupling capacitors beside their power pins, put connectors at the board edge, and orient parts to keep nets short. Poor placement is the main reason autorouted boards look bad.
  2. Set rules before export. In Board Setup, define net classes and the minimum track width and clearance your fab accepts (see minimum trace width and clearance). These values are written into the DSN. Give power nets a wider class so they are not routed at signal width.
  3. Export the DSN. In the PCB editor choose File, then Export, then Specctra DSN. Save it next to the project.
  4. Route in Freerouting. Open the DSN in Freerouting and run autorouting. Let it finish its optimization passes; the first result is rarely the best. Watch for unrouted connections reported at the end.
  5. Save the session. Export from Freerouting in the Specctra session (SES) format.
  6. Import the SES. In the PCB editor choose File, then Import, then Specctra Session, and select the file. Tracks and vias appear on the board.
  7. Refill zones and run DRC. Imported tracks change what a ground pour can reach, so refill all zones, then run DRC. Fix anything it reports before plotting.

What to clean up afterwards

Autorouted output is legal but not always sensible. Review it before you trust it:

  • Power and ground. Re-route supply traces by hand if the router used thin tracks, and make sure the return path under fast signals is not broken by a stack of detours. A ground pour on the back layer usually solves most ground connections for a two-layer board.
  • Sensitive nets. Crystals, analog inputs, USB data pairs, and RF paths should be routed by hand, not left to the router. The router does not know a net is sensitive unless you tell it, and even then it does not understand impedance or coupling.
  • Odd detours and acute angles. Remove loops that add length for no reason and tidy sharp corners that look like manufacturing risks.
  • Via count. Fewer vias is usually better. If the autorouter dropped vias everywhere, revisit placement or allow it more room.

Common problems

Connections left unrouted. The board is too dense for the layer count, or placement is blocking channels. Spread parts out, add a layer, or route the difficult nets by hand first and lock them.

Clearance errors after import. The rules in the DSN did not match the rules in the board, usually because Board Setup was changed after export. Re-export and re-route, or fix the offenders manually.

Zones stop short of pads. Refill zones. KiCad does not refill them automatically after an import.

Differences between runs. Autorouting is not deterministic in the way a design-rule check is. Do not treat a routed result as reproducible; keep the SES you accepted.

When not to autoroute

Boards with controlled impedance, high-speed buses, RF sections, or tight power delivery need manual control and calculated geometry. For simple low-speed boards, such as a microcontroller carrier with a few dozen nets, autorouting plus a careful review can save time. Either way, the output is only as good as the check that follows it. Run ERC and DRC every time, and confirm that the layout still matches the schematic (schematic parity).