KiCAD is an open-source software to design printed circuit boards (PCB). The documentation exists but is spread around forum posts and difficult to find. Even official contributors admit that the documentation is in a bad state. In this article I describe how to create a very simple PCB based on a BuildElectronicCircuits video.
Here is what we will create:
The installation process documentation is decent, just follow the instructions for you system on the download page. I'll be using the
5.1.5 stable release.
KiCAD can create schematics and PCB layouts. That means we will be manipulating symbols and footprints. KiCAD generally comes preinstalled with a library of symbols and footprints but there are other libraries around that we can import.
Let's create the directory where our library will be stored.
mkdir -p ~/KiCAD/Lib
We download the Digi-Key library :
cd ~/KiCAD/Lib git clone https://github.com/Digi-Key/digikey-kicad-library
CTRL+Ato select every file and click
dk_have been added to the table. Click
The libraries have been imported.
To verify that the library was properly imported, open KiCAD and select the
In the filter search for
dk_ if you see something then everything worked.
digikey-footprintshas been added. Click
Here is a list of other interesting libraries you might want to add:
The advantage of using Github is that we can update the library with a simple
We can do the same with the official libraries but this means removing the preinstalled library and modifying some path variables.
~/KiCAD/Lib/kicad-symbolsor wherever you downloaded this library.
Let's start by creating a new project with File > New > Project... or with the hotkey
CTRL + N. I named the project simple-led.
KiCAD automatically creates three files:
We edit the schematic by clicking on the KiCAD Schematic Editor Icon:
A new window appears where we can insert our symbols and create the wiring.
To insert new symbols press
A and use the search bar to locate the symbol you are looking for:
If you need to edit a symbol, just right-click on it to display a menu of available actions. Here are some hotkeys that will be very useful when editing a schematic:
Monce and moving it with your mouse.
Below I created a schematic with:
I also set some values (respectively 9V, 470, and "RED").
To automatically create some annotations select Tools > Annotate schematic and then click on Annotate.
This will automatically add annotations BT1 for the battery, R1 for the resistor and D1 for the LED.
To wire symbols together place your cursor where the wire should start and press
You can left click on the schematic to create "breaks" and turn. The wire stops when you click on the junction of another symbol.
To add footprints select Tools > Assign footprints.
A new window opens where you can select your footprints. The middle column lists the symbols we have added and the footprint assigned to each symbol. Here nothing is assigned yet so the descriptions are empty.
The column on the left titled Footprint Libraries lists the libraries we have imported. If we select one of the libraries the column on the right contains each footprint contained in this library.
For the battery symbol we will select a header pin.
You can preview the footprints with the View selected footprint button next to the gear icon. This opens a new window. On this new window you have the ability to show a 3D preview of the footprint with the 3D Display button (or by pressing
ALT + 3):
Here are my footprint associations:
To generate a netlist click on the corresponding button in the toolbar. Then in the Pcbnew tab click on Generate Netlist. We save the file as simple-led.net.
We are done with our schematic, we can now create our PCB. We click on the button Run pcbnew to layout printed circuit board in the toolbar to open the Pcbnew interface.
In the new window we click on the Load netlist button to load our previously saved netlist.
We can then select our netlist file and click Update PCB.
Our components are loaded, we just need to click somewhere to place all of them. The commands are identical to those in the schematic editor, except that you have to click on a component to select it before moving or rotating it.
Move and rotate your components to improve their placement and achieve something like this:
To draw the connections between each component we use the Route tracks tool on the right side toolbar.
Start by selecting the layer F.Cu which is the Front Copper layer. Then click on the Route tracks tool or press the hotkey
X. You can now draw the routes between each components:
You can select B.Cu to draw wires on the back of the board.
To draw the outline of the board select Edge.Cuts instead of F.Cu and click on the Add graphic lines button. You can now draw a rectangle around your components; use
double-click to finish.
The board is finished, you can display a 3D view with View > 3D Viewer or with the hotkey
ALT + 3.
KiCAD is a great open-source and free tool for your electronics projects. I am not an expert in electronics and I am just learning. Seeing that there was no good resource to show how to use KiCAD from start to finish I decided to write this blog article. But this doesn't serve as a documentation. If you want to learn more I highly recommend Digi-Key video tutorials.