Kicad Tutorial: Using the autorouter
This is part of a series of short tutorials on advanced topics of using Kicad, the favorite schematic/PCB design software here at Wayne and Layne.
Routing, the process of connecting all the pads of a printed circuit board (PCB) layout, can be a time-consuming and tedious process. To avoid the time and frustration of manually routing your PCB, there are various software tools called autorouters which can do this for you. This post will show you how to use the external autorouter from the FreeRouting website.
First, ensure that you have selected the proper trace thickness and clearance values in Kicad’s PCBNEW application, by going to “Design Rules”->”Design Rules”. Once you have confirmed the design rule settings, press the “traffic sign” icon in the top toolbar to bring up the FreeRoute interface.
The three buttons on the left will let us export the DSN file that is input to the autorouter, launch the autorouter application, and finally import the SES file that was exported from the autorouter. To start with, press the top button on the left, “Export a Specctra Design (*.dsn) File”. This will open up a file save dialog box, and you can just accept the filename as the default filename is correct.
Now, click the second button to launch the autorouter. This utilizes the Java Network Launching Protocol (JNLP), which downloads a small XML file that is used by your Java system to download the rest of the autorouter. You may see a browser window open up briefly when the JNLP file is downloaded. Chrome gives a warning about the file type, you can press “keep” to retain the file for use. Your browser might do the Right Thing with the .jnlp file, and open it with Java. If not, you can probably double-click the downloaded freeroute.jnlp file to launch it, or on Linux you can type “javaws freeroute.jnlp”. When the Freerouter window opens up, click “Open Your Own Design”.
Due to the Java security restrictions, unsigned applets downloaded from the web are not trusted very much, so you have to give it permission to read files on your machine. For whatever reason, on my computer it won’t let me check “Always allow this action”, so it asks me every time.
Click “Allow” and then navigate to select the .dsn file you exported from PCBNEW earlier. Click on “Open” and it will load your design.
When your design has finished loading (which may take a minute or two) all you need to do is to click the “Autorouter” button, then sit back and watch the magic happen. The autorouter will do an initial route, then go through a series of optimization steps to try and reduce the number of vias used, as well as trying to reduce the total trace length.
You can wait for the optimization steps to finish, or you can click once in the board area to interrupt the optimization if you are in a hurry, or the results are already good enough.
When you are satisfied with the routing, use the “File”->”Export Specctra Session File” menu option to save the routing results to the .ses file. You will likely get another security warning, click “Allow” to continue. Navigate the file system to where you found the .dsn file, and save as the same filename but with a .ses extension.
In PCBNEW, select the third and final button on the left. It will open a file select dialog box, and it should already have selected the .ses file you just exported from the autorouter. Accept the filename and Kicad will load the file into your design. It will ask if you want to reload the board connectivity. I’m not exactly sure what this means, but I always click “Yes”.
As a side note, some people dislike autorouters, considering their own manually-routed designs to be superior, and there’s some truth to that feeling. Sometimes the autorouter makes silly decisions, sometimes I can spot ways to route things different and save a via or two, but generally I prefer to let the autorouter have a go at it, then clean up the results.
Other tutorials in this series: