This tutorial is going to be a part of all other tutorials where I have talked about custom PCBs: from designing to manufacturing either professionally or at home. This post will cover all the steps needed to design a board using free KiCAD software.
Table Of Contents
- What is KiCAD and why you should use it?
- KiCAD workflow
- Installing KiCAD
- Creating project, main interface explanations
- Drawing a new schematic
- Creating additional schematic symbols
- Connecting schematic symbols with wires
- Assigning component footprints to the schematic symbols
- Creating footprints
- Creating PCB layout
- Drawing tracks and placing Vias
- Summary
What is KiCAD and why you should use it?
KiCAD is a CAD software which allows you to design custom PCB layouts. Most important thing is that this program is free, available on many platforms, so anyone can download and use it. Also, this software is quite mature, has lots of features and can be used to design from simple to very complex boards.
KiCAD workflow
It is a bit different than other software. It has three main steps:
- Draw a schematic.
- Assign footprints to the schematic symbols
- Draw PCB layout
Most software does not have a distinct second step. Usually, when creating a schematic you choose what footprint will be assigned to that particular part. In KiCAD a schematic symbol is just a plain drawing with a defined number of connections (pins). I find KiCAD’s workflow quite good, because if you want just to draw a schematic without choosing footprints – you can easily do that.
Installing KiCAD
Firstly you will have to download the KiCAD from the official website and install it to your PC. The process is quite straight-forward an there shouldn’t be any problems doing that. KiCAD is available for many Linux distributions, Windows and Mac.
Creating project, main interface explanations
So, when you have KiCAD on your PC, you will need to create a new project. By opening KiCAD application you will see such window:
And here are some explanations of some mostly used buttons:
Schematic layout editor is used to create a schematic for your PCB and you will use symbol editor when there will be no needed symbols in the default schematic symbol library. Then, using PCB layout editor, you can create the PCB copper tracing and place all electronics components on the board. If you won’t find a needed component footprint in the default library, you can create your own, using footprint editor function. Finally, Gerber viewer is used for manufacturing files inspection before sending them to the PCB manufacturer (it is not used if you are going to make PCBs by yourself).
You can create a new project by selecting File -> New -> Project.
Then a window opens, where you will have to select a folder where your project needs to be saved and the projects name.
Drawing new schematic
For every PCB you must have a corresponding schematic. So, now we need to do exactly that.
Press Schematic Editor button:
A new window opens. Here are mostly used buttons:
First of all, you will want to place as many components as possible. To do that, click “Add Component” (6) button. Mouse cursor will change to cross which allows placing components when you click on schematic view/canvas.
When left-click, a new window opens with all possible component symbols. You will have to use either search bar or find needed component in the whole list. For example, by typing r you will get resistor symbol. When you have selected the symbol, press OK or enter and now you will be allowed to place component into the schematic. Do the same for other components – default library has many symbols, you will probably find most needed components there except for some ICs.
Also, don’t forget to place power symbols (like ground, power, etc.) via power symbols button (7).
Some useful keyboard shortcuts: when hovering over the schematic symbol press m for move, press r while moving to rotate the symbol. Also, when hovering over the component, press v to edit its value.
When you have all components placed, you can skip to the symbol connections. If you haven’t found some schematic symbols – in the next step you will create your custom ones.
You can see in the picture above, that I have already changed default component values to the needed resistor and capacitor values. This can be done either double clicking on the schematic symbol, or with v keyboard shortcut while hovering.
Creating additional schematic symbols
When you don’t find a schematic symbol in the default library, you will have to create one. To to that press symbol editor button:
Creating a new or adding an existing library
When Symbol Editor opens, select File -> New Library:
After that, a new window opens where you will have to name your new library and select a folder where to save it. Then, yet another window will open where you will have to select if the library will be global or project-specific. If global – it will be available to all your projects, if not – it will be available to the particular project only, although it can be added manually to other projects as well.
Alternatively, if you already have a custom library you can select it in the list on the left of the screen. If you can not find it there, you can add a library to the list by selecting Preferences -> Manage Symbol Libraries. In the newly opened window press + button to add a new row to the list and fill in the needed data. Finally, press OK.
Creating a symbol
Now on the left side, in the library list, you should be able to locate your newly created library. Right click on it select New Symbol. A new window will open, where you will have to write at least a symbol name:
After pressing OK, you should be able to see, that in the Library List under your custom Library name there is a newly created symbol name. The library is selected and the symbol has an asterix near its name – you are now editing that symbol.
Now, press Add Pins button . Then, click somewhere in the drawing canvas and a new table will pop-up:
In this table type in the name of the pin and its number. In my case it is VIN and 1. Also, you could change Electrical type to something else than input (if you exactly know what function the pin has), I prefer to leave it as it is. Electrical type is important if you are going to run schematic check and see if it is electrically correct. If you are not going to to that, you can also leave the pin type as input.
Place the pin somewhere where it seems a good place. You are going to move the pins when you will have all of them placed on the canvas. Here works the keyboard shortcuts: m – moves the pin, r – rotates, e – opens pin properties.
So, let’s assume, that you have all your pins on the canvas:
To add symbol outline press the rectangle button and draw it to get a nice schematic view:
In the image above you can also see that I have already moved the name of the IC and its designator symbol closer to the outline.
Lastly, you can move the symbol anchor to the center of the drawing by pressing anchor button and clicking in the center of your symbol outline:
In such way you will have to create all the missing symbols.
Connecting schematic symbols with wires
So, now when you have all schematic symbols placed into the schematic, either from default libraries or from your own created library, it is time to connect all those symbols together.
The initial view might be as this, without any connections:
To connect two symbols together you need to press a wire placement button . Then, left click on one symbol’s pin drag a line to another pin, and again left click on the end. In this way you should get a two point connections:
You can also connect one pin directly to the already drawn wire, so a connection point will be created. In the end you will need to connect all available symbol ends (or at least most of them as some might be left unconnected if the schematic requires to do so):
Of course, in reality your workflow might be a bit different. You don’t have to firstly put all components to the schematic and only then connect them together. You can put only part of the symbols to the schematic, connect them, then put more symbols and again connect those.
Assigning component footprints to the schematic symbols
When you have final schematic, next step is to assign real world footprints to the used schematic symbols. Before doing that you will need to annotate your schematic, so every symbol would have unique number like R1, R2, R3… , C1, C2 and so on. So, click on the annotation button .
A new table will be shown. There you can leave everything with default selections. Click Annotate:
When you have annotated schematic, click on footprint assignment button . A new window opens:
In the center you will have a list with all your schematic components. On the left will be a list with all available footprint libraries and on the right – footprint which are located in those libraries.
To assign a footprint, you need to select a library (2) and double click a footprint (5). Before that you can just select a footprint (3) and click the viewer button (4) to see how that footprint will look like. You need to assign footprint to all symbols. Finally click apply and ok buttons (7).
There might be a situation when you won’t find a footprint in default libraries. In this case you will need to create your own footprint as it is written below.
Creating footprints
So, if you need to create your own custom footprint, because you can’t find it in the default footprint libraries, you need to open the footprint editor:
A new window will open:
Creating or selecting a custom library
As with the schematic symbol creation, first of all, you need to have a custom library where you could save your footprint. To create a new library, you will need to click on File -> New Library. The, a new library will open which will ask you to choose the name and the place where it needs to be saved. After that, yet another window pops up asking you to choose if this library will be available to the particular project only or it will be available globally. Finally, click OK and your new library will be placed inside a library list (see picture above).
If you already have a custom library, but it is not shown in the library list, you will need to add it manually. To do that, click Preferences -> Manage Footprint Libraries. Now you need to add library’s path in the newly opened table.
Creating your custom footprint
To create a new footprint, right click on the custom library in the library list and select New Footprint. Enter footprint name and press OK. Now, you will see that footprint name is added to the canvas:
Next, press Add Pad button . Cursor will change to a pad symbol. Place a pad anywhere on the canvas. At this point that pad will have default size parameters. To change them, right click on the pad and select Properties or just press E key. A window will open:
Change the settings to those that your part needs. Usually, datasheets have all needed information and drawings.
When you have changed pad parameters, you can add all other pads. After that, press graphic line tool button . Now you can draw part outline like this:
Be careful on which layer you draw lines, texts and other symbols. In this case a layer named F.SilkS was selected. This layer means that that outline is drawn into front silk screen layer. Silk screen layers are used to draw images on the PCBs (usually they are part numbers and outlines).
Finally you can move around everything to look nicer:
Creating PCB layout
Before creating a PCB view, you need to generate netlist file. For that, in schematic editor, you will need to press Generate Netlist button . In newly opened window press Generate Netlist and when you are asked to choose save place, leave default and press Save. Now, you are ready to create your board layout.
To create a layout, open PCB layout Editor:
Now you will have an empty black window. First thing to do is to load your generated Netlist by clicking Load Netlist button. Then, if not selected, choose your netlist file location and press Update PCB:
Click close, and now you should have all components placed into the canvas:
In the picture above you can also see some mostly used buttons and their functions.
Setting up PCB properties
Before drawing any traces, it is a good idea to set up some PCB properties. To open the settings click File -> Board Setup. Here you can select how many layers you are going to use (default 2 copper layers), set thickness of the board, change some text sizes, etc. There is also an interesting part called Design Rules. Here you can setup minimum track, via sizes, solder mask settings, but I personally leave them with default values. Where you should make changes is in either Net Classes or Tracks & Vias.
If you already know, what size different tracks (like GND, power rails, signaling tracks) need to be, you can set them via Net Classes settings:
If you like me, initially do not know the requirement for the track widths, then you can choose the sizes during the drawing process. But to be able to that, you will have to define available sizes, so you can use some values in Tracks & Vias like in the example below:
Moving, rotating and placing components
Now, when you have all components imported and board settings tweaked to your preferences, it is time to move around components in such way that it would make sense when connecting them together with tracks.
It should be obvious that components which needs to be connected together needs to be close to each other and not on the different sides of the board.
To move a component you can hover over it and press M key on the keyboard. Drag and click where you would like to place a component. While dragging you can also rotate the component by pressing R button on the keyboard.
So mine more or less final component placement looks like that:
You will notice that text might get in the way when moving components around the board. You can disable it by unclicking Values and References in the Items list on the right side. In this example I have left References as they are, because this board is going to be made at home. If you are going to order them made in a fab, the you need to place all text in such way that does not cover other texts or parts.
Drawing tracks and placing Vias
Now, it is time to connect everything with tracks. Select Route Tracks tool . Select a working layer in the right sidebar – it should be either F.Cu or B.Cu. Click on one part pad move cursor to the second pad and click again. You will have a connection. If track needs to be long with several corners you will have to additionally click in places were corners need to be. Mine tracks look like this:
As you can see, I have tracks with different widths. To choose the width, when Route Tracks tool is selected right click on the canvas ->Select Track/Via Width. There you can select all predefined track and via sizes in Board Settings -> Tracks & Vias.
You can also, if needed, place vias when routing tracks. To do that you can either press V key on the keyboards while drawing a track, or you can use Add Via button to place a via and then route tracks from it.
Board outline
To add a board outline choose Add Graphic Lines tool and select Edge.Cuts layer on the right sidebar. Now simply draw from corner to corner, where you board ends needs to be. It should look like this:
Of course, the board outline can be any shape, not only a rectangle.
Placing copper area
You might need to draw a big copper area connected to a net. Usually GND layer is made as big as possible. So, lets make a copper area connected to GND. Select Add Filled Zones button . Now, click on the first corner, where a whole area should start. A table will show up:
Select which layer to use, in this case it is B.Cu. Also, select to which net connect the area – in this example it is GND. You can also modify some other settings (if needed) and finally click OK. Now continue drawing the area until you have the needed shape – on the last point just double click to finish drawing. You will have unfilled zone, which can be filled by right clicking on it and choosing Zones -> Fill.
Other things
You can also add some additional thinks, which won’t be used as manufacturing layers. For example you can draw dimensions with the Add Dimension tool into for example, Dwgs.User layer:
Also, for the las thing – a suggestion. Before sending the board to manufacturing (or doing it yourself) check the 3D View of the board by selecting View -> 3D Viewer. Sometimes this view helps to see the board from other perspective, so it will allow identify any mistakes easier.
Summary
So, this tutorial should allow you from an idea to make a real board which can them be either professionally manufactured or made at home.