Wiring in Pcbnew

Now that our footprints are placed on the PCB, let’s go ahead with the wiring! First, let’s edit our design rules so that KiCad can automatically select the appropriate width for each track. Bring up the Design Rules window:


Bring up the Design Rules window

Click on the Add button to create a new Net Class:


Create a new Net Class.

Configure the new Power class with the values from this example:


The values for the new Power net class.

Finally, move the VCC and GND nets into the power net class:


Move the GND and VCC nets into the Power net class.

In the screenshot above, notice that the filter of the right membership list is set to Power. After you set the filter, find the GND net in the right membership list, select it, and click on the “>>>” button to move it to the right list. Do the same for the VCC net.

Let’s start laying out some tracks now. We can start with the VCC net. I would like the VCC signals to go on the top copper layer and ground as much as possible on the ground copper layer. Just like in the previous project, we will have to switch signals from top layer to bottom layer through vias. Select the F.Cu layer:


Select the F.Cu layer.

Then, click on the green Wire button or type “W” to select the wiring tool, and create a wire between the Vcc pin of the connecter and the Vcc pin of U2.


Just wired the first VCC net.

Notice that the name of the wire is written on it: “VCC”, the name of the net.

Let’s work on one of the ground wires next. Switch to the B.Cu layer:


Select the B.Cu layer for the ground signals.

Now try to create a wire between the GND pin of the connector (the second pin from the right) and the GND pin of U1:


You will be unable to complete the green wire!

No matter how hard you try, you will not be able to complete the green GND wire. This is because footprint U1 is surface mounted, and its pads are only accessible on the top layer. Therefore, we must use a via to switch the wire from the bottom layer to the top layer, and then complete it on the GND pad of footprint U1. Use the “V” key to create a via close to U1’s GND pin, and then double click to complete the wire on the pad:


Use a via to switch a wire between layers.

Connect the GND pad of U2 to the same GND wire, again using a via to switch between layers:


Connect the GND pad of U2 by joining a new wire to the wire of the U1 GND.

We can continue by wiring the rest of the connector pins. Switch to the top layer, and follow the ratsnests to help you wire the connector pins to the U1 and U2 pads. You can use vias if needed to keep the tracks from being too long or having too many twists and turns. My wiring ended up like this:


Wiring the connector pins to U1 and U2.

Now let’s have a closer look to the wiring between the VCC pin in the connector and the resistors on the right side of the PCB. At the moment, the layout is this:


The orientation of the resistors can be improved in order to minimise the length of the VCC wire.

Notice how the VCC pad of the resistor is oriented away from the VCC pad of the connector. At this orientation, the wire that connects the two would have to be routed around the back of the resistor. If we simple flip the resistor over so that its VCC pad is right opposite the VCC pad of the connector, the length of the wire would be minimal, without any angles. It would also make it easy to connect the VCC pads of all other resistor in the bank to the same wire. So, that’s what you should do next: place your mouse pointed over an resistor, hit the “R” key to flip it. Repeat for all resistors. Then, connect the VCC pad of the connector to the VCC pad of the first resistor, and extend the wire downwards to connect the VCC pads of all resistors. Then, also connect the LEDs to their current limiting resistors. The PCB will look like this:


The Connector and Resistor VCC pads are connected. The LEDs are also connected to their resistors.

It’s a fairly clean and straight forward route for the VCC wire. The unconnected pad of the LEDs must be connected to the data pins on U2. To do the wiring we will need to use vias so that part of the wire is routed in the back copper layer so that it does not cross the long VCC wire that connects the resistors. Here is how you can route this wire:


Routing the LED to the data pins of U2.

In this example, starting from the first LED pad on the front layer, use a via to switch to the back layer, continue the wire until it gets close to pin #7 of U2, then use another via to continue on the front copper layer, and end the wire on pin #7. Repeat the same process for the rest of the resistors, until you complete the wirings on the right side of the board. The PCB will look like this:


The wiring on the right side of the PCB is complete.

Repeat the process to connect the LEDs and resistors on the left side of the board. Don’t forget to do a Design Rules Check occasionally. This will tell you if you have left unconnected pads. When you complete the left side of the board, the PCB will look like this:


The left side of the PCB is complete.

The last footprint to connect is the capacitor. We can connect pin 1 to any existing VCC net, and pin 2 to any existing GND net. Here is the way I wired mine:


The capacitor is wired.

At this point I can see a couple of ratsnest threads, which means that I have unconnected pins. The canvas is crowded, so I find it hard to see exactly which pads are left unconnected. A good solution is to do an DRC, and get a list of unconnected pads.


The DRC gives a handy list of unconnected pads.

The DRC tells me that pad #9 of U1 should be connected to pad #14 of U2, pad #10 of U2 should be connected to pad #16 of U2, pad #16 of U1 should be connected to pad #16 of U2, and pad #2 of R4 should be connected to pad #2 of R3. Let’s do these connections.

Here is the final wiring:


The final wiring

Wiring takes some time to do properly, and several iterations. You should not be afraid of deleting traces and redoing them better!

In the next chapter, will will work on the copper fills.

Back to top
« « Create the PCB in Pcbnew | Adding copper fills » »