Using freeRouting with Kicad 5

Ken YapKen Yap wrote 04/11/2019 at 03:45 • 4 min read • Like

I was not looking forward to the manual work of routing traces in pcbnew (Kicad 5) so I started looking for autorouters. In Kicad 5 this is currently done externally, whereas 4 had a builtin autorouter.

Now I know this is a controversial topic because the best human routers can do better than an autorouter but you can always use an autorouter in the beginning until you get better. Or you can tweak the results of the autorouting. Sort of like the arguments over C versus assembly decades ago I think. Well, we know which language is used more now.

I tried freeRouting last night on a small board with about 60 nets and it did everything automatically, using 5 vias by the end. Well I moved the ICs to where I judged would be the best locations before starting which helped.

The best advice I found on freeRouting was this page by Peter Dalmaris, a maker and educator, who teaches Kicad on Udemy. Instead of getting freeRouting sources from github (where there are many forks) and compiling, download the LayoutEditor package, available for various platforms, in native package format. So if you use Linux, it's as easy as just downloading and installing the right package for your distro. The files will be installed in /opt with one symlink in /usr/bin. The freeRouting JAR file is included (it's a Java app).

FreeRouting can be downloaded from @mihosoft's webisite. Miho has made a lot of improvements. This is the preferred method, older releases in the wild don't work well or at all with modern Java versions. The colour scheme is different from what you see in older tutorials but is entirely customisable.

I made this shell script wrapper so that I can call it with or without a DSN file as the argument. If no argument is provided, it opens up the file browser. The advantage of providing a DSN file as the argument is you don't have to traverse the directories to find your project.

if [ "$1" -a ! -r "$1" ]
        echo "$1" not found
        exit 1
exec java -jar /opt/layout/bin/freeRouting.jar ${1:+-de} $1

(Yes, I know, this script won't handle spaces in the filename gracefully.)

A heads up, don't use Unicode characters like Ω or μ  in symbol values. freeRouting can't handle it, presumably due to not being compiled for Unicode, perhaps for another charset like ISO8859.This seems to be fixed now.

Another gotcha is if you create mounting holes using the mounting hole symbol, you need to assign each hole a unique reference, otherwise pcbnew's Spectra DSN format exporter complains. You should make the references invisible so they won't appear on the silkscreen. This is strictly speaking not a freeRouting issue.

Here are a few things I learnt using freeRouting:

You will appreciate Kicad's ability to make incremental changes to the schematic and then propagate it to the layout.

Here's a recent board I did with freeRouting:

freeRouting has also been mentioned in a few places on Hackaday, just search for it.