.st0{fill:#FFFFFF;}

KiCad

How to use FreeRouting to route a 4-layer board 

 September 1, 2018

By  Peter

Join Our Mailing List

We publish fresh content each week. Read how-to's on Arduino, ESP32, KiCad, Node-RED, drones and more. Listen to interviews. Learn about new tech with our comprehensive reviews. Get discount offers for our courses and books. Interact with our community.

One email per week, no spam, unsubscribe at any time.


How to use FreeRouting to route a 4-layer board_1.mp4

[00:00:00] Hi it’s Peter here from Tech Explorations. Now as you may know I’m working on a book for Kicad and in this book I cover a lot of nice features in Kicad 5. And of course a lot of general PCB computer aided design issues to help people who are interested in doing this sort of thing but have never done that in the past; to be able to create boards a little bit like the one that you looking at here.

[00:00:29] This board [00:00:30] here is a four layer PCB. It’s one of the projects in the book. And I’ve got two versions. I’ve got the two layer PCB and then the four layer PCB. I did the four layer PCB just to show you how you can do that sort of thing. I’ve had questions from students of the original Kicad course; how can I do multilayer PCBs, and I took the opportunity to give you an example here.

[00:00:57] Now in this project [00:01:00] I want to show you a couple of quick things. First of all it is not a complicated project but the way that I build it I did so in order to show you how you can use a few interesting features for projects that do become rather complicated. A complicated project which is probably not a good idea for an educational book because I don’t want to bog the student up one to inform the student.

[00:01:25] But this was a good example of what you can do with hierarchical sheets [00:01:30] and to be able to distribute elements of a schematic, of a circuit, among different sheets. So what I’ve got is an at Atmega microcontroller here and I’ve got a clock Integrated Circuit that DS1337S+. And I’ve got a couple of EEPROM chips here as well to give a little bit of memory capacity to this little gadget. And [00:02:00] also have a bunch of connectors. So because this schematic in this root sheet was getting a little bit crowded, and I wanted to keep things simple, so I’ve created the schematics or placed the schematic symbols in a separate hierarchical sheet.

[00:02:20] So you can see in the map that got the connectors sheet. That is a child of the root sheet. And I’m using hierarchical [00:02:30] pins and labels, you can see these D2, D3, D4, for example. These are hierarchical labels and they connect to the equivalent hierarchical pins on the root sheet. And that’s an easy way to create an easy to read schematic that spans over multiple sheets.

[00:02:55] Apart from that everything else is exactly the same. So when you want to start doing the layout [00:03:00] for the schematic you just export the nets and then import the net file over to Pcbnew.

[00:03:08] So the interesting thing here is not the finished version of this PCB, the routed version, but the unrouted version; because I quickly want to show you how you can use the autorouter to which Kicad can connect to. It’s an external autorouter. It’s called FreeRouting. So how can you use FreeRouting to quickly route a board like this.

[00:03:29] And for the sake [00:03:30] of this demonstration I’ll use the four layer PCB. So you can set your layers this way; by default you go for 2 layers. That’s how Pcbnew starts, but I’ve gone for 4 layers and then I’ve set the rows of the different layers here. So you can see I want to the front copper layer to convey signals, the same thing with the inner two copper layers, and then I want the back layer to [00:04:00] give me that mixed routes, so they will combine power and signal. Probably could have just gone with power, right? So I could have routed just the power traces in the back copper. Theres plenty of other space in the other 3 signal layers for that. But I’ve gone from mixed.

[00:04:19] Alright, so the other thing that I’m going to do next is to delete all the routes. So I’m going to go for global deletions. [00:04:30] I’m going to remove the zones as well and the tracks and, yeah, I don’t have anything locked there so this is going to clear up everything. I’ve got a totally unrouted board so I’m going to save that and I’m going to then export, the Spectra DSN file which is the file [00:05:00] that I’m going to import to FreeRouting. Export that, and override the existing file, and replace it.

[00:05:11] So next let’s go and start FreeRouting. You can either do this with the command line so you can just type Java jar switch and then the name of the jar container that you want to execute just like with any other jar containers or you can simply double click on the jar container itself. I’m going to browse [00:05:30] to my project. This is my practice project. It’s in here. And here is the DSN file. Open that. So here is the unrouted board with the footprints. I’m going to just a couple of things here. Not so much in terms of configuration but just to show you what you can do with the FreeRouting GUI interface. So you can display your board in different ways. So you can see [00:06:00] this one allows you to see or unsee the unrouted nets. I’m going to use this little window that allows me to highlight certain aspects of the board live as the autorouting process takes place.

[00:06:16] I’m going to play around with these levers later on and begin the auto routing. What else… I’ve got the object visibly turn that on already. This is interesting, because as [00:06:30] this board is being routed for less I’ll be able to use these levers to highlight one layer over the other and get a better idea of what’s happening. And there’s a few other bells and whistles like that.

[00:06:44] I’ll bring up the colors as well and put that down here. So you can see as each route is created in a different layer, it will use the color for that layer.

[00:06:58] All right, the [00:07:00] information in the parameters that the autorouter is going to use to do the routing come from Pcbnew. There’s not much else that I need to do here other than clicking on this button to start the autorouting.

[00:07:18] And as this is happening I can make things appear or disappear. Check out the vias, you can see so far used 20 vias down here and this is the first pass. [00:07:30] So this autorouters seems to be fairly clever. Even if it completes a trace in subsequent pass it may undo that trace and try to redo it in a better way. I’m not sure exactly which algorithm it’s using here. I guess it’s trying to optimize by shortening the traces and by reducing the number of vias and [00:08:00] things of that sort as it’s working towards optimization.

[00:08:05] Let’s see if I want to see what is happening in a copper layer. The first one can turn these off. And there you go you got the green tracks that are the first inner copper layer and can just turn everything else off and let’s see how we doing the back copper layer, great. There’s not much going on there. It’s quite [00:08:30] light in traces. That’s where I plan to also place the copper fill later. And it looks like it’s complete. Post route completed. And we don’t have anything unrouted.

[00:08:47] So I’m going to save the Spectra sessions file which is the file that I’m going to import to Pcbnew a minute. Let’s go back to Pcbnew. Here is [00:09:00] our unrouted board. I’m going to File, Import Spectra session, and the SES file is the one that the autorouter just exported.

[00:09:18] So done! Do a DRC, and that is fine, there’s nothing unconnected. We’ve got 3 messages about footprints [00:09:30] that have got no courtyard defined and that is fine. You can see the little arrows are pointing to graphics, right? So this arrow is pointing to the “made with Kicad” graphic. If I look at a 3D view for a better look. Turn it around. It’s this. So this is a graphic that is imported into the board as a footprint [00:10:00] and the designers of this logo didn’t create a courtyard outline for it like they have for the other footprints on the board so all of these other footprints you can see it with a green outline here.

[00:10:21] They do have courtyards so Pcbnew in the DRC if it doesn’t find a courtyard it will mention that. [00:10:30] So here’s another graphic down here. It’s a graphic imported as a footprint. But it doesn’t have a courtyard so you get a complaint. But you can ignore it safely and this board can now be manufactured. Not a problem at all.

[00:10:43] So that was a quick demonstration. I’m going to save this file. A quick demonstration of how easy it is to create four layer PCB boards that, without the autorouter, this would take quite a bit of time. Actually, I [00:11:00] did try to do this manually and a couple of hours later I’m still trying to figure out quite tough problems in getting the traces across. I decided to just go for the autorouter. This is a good example of when the autorouter is a good choice.

[00:11:16] I should also mention that I used the autorouter to route the exact same project but in the two layer PCB version and again it didn’t really have any problem. [00:11:30] It did use additional vias but the routing was successful and it was also done automatically and I didn’t really have to do any tweaking and improvements to the routing.

[00:11:45] From this point, you can decide to add a copper fill, which is not a problem. Actually it’s do that really quickly right now. I’m gonna go and get filled zone I’m going to start it up here. Perhaps you’re [00:12:00] going to put in the back copper layer and connect it to ground. Accept the rest of the defaults.

[00:12:07] So let’s draw it like this. I try to go as close as I can to the edges. Are right and it’s finished. And [00:12:30] need to click carefully on the border. All right. And I’m going to click on this button here so that I can actually see the filled zones. I’ve got it hidden so that I can see the traces but I can enable it and see it like that. So you see all the ground [00:13:00] pads have got reliefs that connect the filled zone with the ground pad. Same thing happens here and here. So all of the pads that have ground on them are connected via these reliefs to the filled zone. Great!

[00:13:24] And check out the 3-D viewer and look at the back. Yeah [00:13:30] and you can see the filled zone is drawn in the 3D rendering of the board. This is awesome so I hope that you found this useful.

[00:13:44] Looking forward to any comments you may have and hopefully we’ll have this book ready soon! Can’t say exactly when.


Tags

KiCad


You may also like

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

For innovators and hobbyists looking to unleash the full potential of their Arduino projects, delving into the realm of wireless technology is essential. Arduino, the compact microcontroller that has revolutionized DIY inventions, can truly flourish

Read More
Exploring Wireless Options for Arduino Projects

I’m excited to introduce you to the latest and greatest version of KiCad – version 8 (stable release). This article will overview the new features and capabilities added to this popular open-source electronic design automation

Read More
KiCad 8: The new and updated features, a full review