KiCad 42 – Automatisch Sporen tekenen met FreeRouting

Software: FreeRouting

Source: https://techexplorations.com/blog/kicad/blog-kicad-5-how-to-use-the-freerouting-autorouter/

In Kicad 5, the autorouter that was included in Kicad 4 has been removed. It is likely that a new autorouter will be added in the future. Until then, you can use an external autorouter. In this recipe you will learn how to use Freerouting, and open source autorouter.

The online project home for Freerouting is at freerouting.org. There, you will find information on how to install it on your computer, and usage documentation. Freerouting is a stand alone program with many capabilities. If you are planning to design large PCB, it may be worth your time to spent some time and study the Freerouting documentation. In this Recipe, you will learn how to use Freeroute to autoroute a simple PCB that you are working on in Pcbnew.

In my experience, the easiest way to install Freeroute is by installing yet another application, LayoutEditor. LayoutEditor is a general editor that is used in micro and nano electronics. It happens to package a binary version of Freerouting, and to have installers for a huge variety of operating systems. This means that you will not have to worry about downloading the source code of Freerouting, and compiling it for your operating system. For this reason along, it is worth downloading it and installing it.

Start by going to the LayoutEditor download page, and download the version for your operating system. Once you have it on your computer, install it. When the installation is complete, go to the location on your computer where the LayoutEditor files are placed. On my Ubuntu computer, this location is /opt/layout. When you find the installation location, go in the bin folder and find a file with the filename “freeRouting.jar”. This file contains the freeRouting application. You can copy the file to a location that is convenient for you to access, or create a shortcut.

This is a Java application, so if you don’t have a Java runtime environment, you should install one now. On Ubuntu, you can install the JRE through a terminal window by typing this instruction: “sudo apt install default-jre”.

Now that you have access to freeRouting, lets use it.

Open an unrouted project in Pcbnew. You can see my example:

You must export a Specctra DSN file that contains the information that freeRouting needs in order to do the routing. Create the DSN file by clicking on File, Export, “Specctra DSN…” (Figure 267). A dialog box will ask for a location and file name for this file.

Let’s continue with freeRouting. Start freeRouting by double-clicking on the .jar file. The Java Runtime Environment should execute the program assuming it is installed correctly. FreeRouting will ask you to load the DSN file, so locate it and load it. Eventually freeRouting will display your board with the various footprints and its layout exactly as you see it in Pcbnew. To run the autorouter, click on Routing, Autorouting

After a few seconds, freeRouting will create the routes and show them with red and blue color, depending on which layer the route exists in. You will need to import this version of the board back to Pcbnew to continue with the work there. To export from freeRouting, click on File, Export, Export Specctra Session File. You can close freeRouting and return to Pcbnew.

Figure 269: Exporting the routed PCB from freeRouting

In Pcbnew, go to File, Import, “Specctra Session…“ and select the file with the .ses extension that freeRouting created

Pcbnew will display the fully routed board:

While the autorouter did its job, there is still work that you will have to do. For example, you will need to pay attention to power traces and confirm or edit their widths. You must also run the Design Rules Check to ensure that none of the design rules are violated.

Whether you use the autorouter or not is a personal choice. There does not seem to be a consensus on this topic, with many people opting to use it, and many others preferring manual routing. The newer versions of Kicad, starting with Kicad 4, introduced powerful interactive routing tools which make manual routing fast. As you become more experienced and skilled in routing, you will be able to produce routing outcomes that are far superior than those produced by even the best autorouters.


Using Netclasses

If you use and define your netclasses in KiCad, the autorouter can use them: