Close or Esc Key

Arduino Projects   |   Raspberry Pi   |   Electronic Circuits   |   AVR   |   PIC   |   8051   |   Electronic Projects

PCB designing using KiCAD - From Schematic to Gerber file

Written By: 

Ajish Alfred

For the people who are doing PCB designing, hobbyist or professionals, there are so many PCB designer softwares available. Most popular among them are diptrace, orcad, eagle, kicad etc. This tutorial is mainly for those people who haven’t tried out any professional pcb designer software yet.

Here is a quick guide, which will help you to get started off with kiCAD. In this tutorial we will be considering a simple astable multivibrator circuit using 555 timer IC. We will be designing a pcb for this well known simple circuit. Let me tell you upfront that I’m not an expert in pcb designing. My intension is only to explain you the necessary steps required in kicad to convert a simple circuit diagram to a gerber file, and also some tips and things to be taken care while doing the designing.
I’m here doing a complete design process and at the same time explaining the steps for you with the help of screenshots of the same. I request the reader to do the same steps in your PC from the beginning to the end for this single example, and next time you will be able to do it on your own.
The kiCAD software mainly has the following utilities:
Eeschema                    -           Schematic editor
Cvpcb                           -           Components to modules
Pcbnew                        -           Pcb editor
Gerbview                      -           Gerber viewer
The main window of the kicad looks like this:
Screenshot of KIcad IDE
Fig. 1: Screenshot of KIcad IDE
Your recent project might have been listed in the project tree. To start a new project select the “New Project Descr”

Screenshot of Project Menu in KIcad

Fig. 2: Screenshot of Project Menu in KIcad

The most important thing that you should take care of is that, all the files generated by while doing the project should be saved in a single folder, and the title of all the files should be the same.
So let us save this new project in our project folder. The extension should be .pro

Screenshot of naming new project in KIcad

Fig. 3: Screenshot of Naming New Project in KIcad

After you have saved the project, the main window will look like this:

Screenshot of main window in KIcad after creating new project

 Fig. 4: Screenshot of Main Window in KIcad after Creating New Project

Editing the Schematic

1)      Editing the schematic
Now you need to convert the circuit diagram into the schematic in kicad. For that you need to select the schematic editor.

Screenshot showing eeschema icon in KIcad

The schematic editor window is shown below:

Screenshot of schematic editor window in KIcad

Before start drawing the schematic, we have to do a few important things;
Page settings – To set the page size, title etc.

Screenshot showing page setting icon in schematic editor window in KIcad

Page settings window:
Screenshot of Page Settings window in KIcad
When you press OK, you can see the title of your work sheet has been changed like this: 

Screenshot of the PCB Title in KIcad

Now we need to set the preference

Screenshot of Preferences Menu in KIcad

General options window: 

Screenshot of General Options window in KIcad

Press OK and then save the preferences:

Screenshot of Save Preferences in Preferences Menu of KIcad

To make our design process faster we have to use a lot of shortcut keys. We can have a list of currently using shortcuts like the following:
Screenshot of Show Current HotKey List in Preferences Menu of KIcad
Current hotkey list:

Screenshot of Current Hotkey List in KIcad

Now we have set most of the necessary things, so we can start drawing the schematic.
It’s all about selecting the right component, placing the component, connecting them and do the annotation.
First we add all the components. To add a component to the worksheet, press A, and the component selection window will open up. If you know the key word for the component, just enter the key word and press OK.
The key word for resistor is R and the capacitor is C, like that
Component selection window: 

Screenshot of Component Selection Window in KIcad

Use insert key to add the same component again. Press M to move a component after placing the cursor on it. Use ctrl + scroll to move entire page left/right, shift + scroll to move the entire page up/down

Screenshot of components drawn in KIcad

So far we have added the resistors and capacitors to the schematic, now we have to add the 555 IC, LED and 3 pin connector. If you don’t know the key word of the component you can use “by library browser” button, which will list you all the library components. 

Screenshot of naming a component in KIcad

Once you have selected the required component you can use the export to schematic link to add the component to your schematic.
Selecting 555 IC from the component list:

Screenshot of browsing a component in KIcad

When you finish adding the components for the particular circuit, the schematic editor will look like this.

Screenshot of adding a component in the circuit diagram in KIcad

Now we need to do the connections. You can keep the cursor at any point and press W to add a wire.

Screenshot of connecting components in KIcad

After you have finished the connections, it would be better if you add some text labels at the necessary areas. You can do that by using the T button as shown in the above figure. 

Screenshot of labeling components in KIcad

Now our schematic diagram is almost finished. Next step is to annotate the components. We can automatically annotate the components using schematic annotation button. It will open up the following window.

Screenshot of Schematic Annotation Button in KIcad

Press annotate key to automatically annotate the components. 

Screenshot of EESchema Annotation window in KIcad


Our finished schematic will look like this:

Screenshot of final circuit designed on KIcad

For this particular tutorial it is not important whether the circuit is correct or not, all I’m trying to explain you nothing but, how to convert your circuit to a pcb.
Now if you wish you can do the ERC (Electric Rules Check) using the “schematic electric rules check” button.

Screenshot of ERC (Electric Rules Check) button on KIcad

Press “Test Erc” button for the following window: 

Screenshot of EESchema Erc window in KIcad


If there are errors, which mean you have violated some rules. The errors will be shown in the schematic using markers and you can easily identify and correct those errors. If you have no idea about the ERC, don’t worry, it is not going to affect most of the simple circuits in anyway.
Now you must save the schematic like the following: 

Screenshot of File Menu in KIcad


Components to Modules

2)      Components to modules


Next step is to generate a netlist of the components using “Netlist generation” button: 

Screenshot of Netlist generation button in KIcad

Click the button “Netlist” for the following window:

Screenshot of Read Netlist button in KIcad

Save the netlist file using the extension .net:

Screenshot of naming Netlist file in KIcad

Now run cvpcb by to convert the components to modules which we can use, while we actually design the circuit board:

Screenshot of Run Cvpcb button in KIcad

The cvpcb window will look like this: 

Screenshot of Cvpcb window in KIcad

For each component listed we must select the required footprint. It would be better if you list the entire footprint without filtering:

Screenshot of Display the full footprint list button in KIcad

How could I identify which footprint will be appropriate for a particular component??
Which all footprint you will select, it should match up with the physical dimensions of the components in your collection. You can view the entire available footprint in a pdf format using the button as shown below:

Screenshot of display component documentation button in KIcad

In your pdf viewer, set the zoom to 100% or actual size. Now simply place the component gently over the screen just above the footprints of the particular component and see whether it is matching or not. Note the label of that footprint and simply select the footprint with the same label from the list for that particular component.

Screenshot of Zoom button in KIcad

I’ve a couple of small electrolytic capacitor for the circuit which matches the following footprint like:

Screenshot of capacitor footprint in KIcad

If you want to see the selected footprint in detail, keep the footprint selected in the list and press view selected part:

Screenshot of View selected part button in KIcad


Here is the footprint in detail: 

Screenshot of a footprint in KIcad

If you want to see the component in 3D, you can press the 3D button.
3D view of the component:

Screenshot of 3D View in KIcad

Close both the windows and double click the required footprint to get it selected. If you finish selecting the footprints, the page will look like the following:

Screenshot of saving netlist button in Kicad

Save the netlist using the save button:

Screenshot of saving netlist in KIcad

Now run the pcb editor using the button “Run Pcbnew” either from schematic editor or from the main window.

Screenshot of Run Pcbnew button in KIcad


PCB Editing

3)      PCB Editing
Here is the PCBNEW window:

Screenshot of PCBnew window in KIcad

Before we proceed further I recommend you to do the required page settings like we have done for the schematic editor. After that it would be better if we draw an initial outline for the board, which we may change later if required.
Select the current working layer as “Edges Pcb”.

Screenshot of Layer Menu in PCBnew in KIcad

Use the graphic line button to draw the edges. You can set the coordinates at any corner as both zero by keeping the mouse pointer over it and pressing the space bar. Double click to finish the outline as you complete drawing it.
Here I’ve drawn a square outline for the pcb.
Screenshot of PCB outline in KIcad
 Now we are going to link the schematic and the pcb editor by reading the netlist.

Screenshot of Read Netlist button in KIcad

Press “read” button for the following window.

Screenshot of Netlist window in KIcad

In the following figure you can see that the modules corresponding to the components in the schematics have been added to the pcb editor. Now press the cancel button.

Screenshot of Netlist window in KIcad


Now arrange the components by moving them into appropriate positions and orientations. Use M to select a component to move with the cursor.

Screenshot of arranging components on layout in KIcad

After rearranging the components:

Screenshot of rearranged components in KIcad

Now it seems that the outline of the pcb is too large for the circuit. Now I will show you how to delete items, in this case we are deleting the outline only.
Drag the cursor across the block holding the left button down and then release so that the entire block will get selected. Now right click and select the option delete block.

Screenshot of option delete block in KIcad

For this particular case, select the “include edge layer” and press OK.

Screenshot of Delete Block window in KIcad


You can use the same technique to delete the tracks, modules, zones, texts, drawings etc.
After deleting the current outline, we will draw a much smaller one. After rearranging the components and redesigning the outline, the pcb editor will look like this.

Screenshot of PCB layout after deleting block

At this point you should make sure that your arrangement of components in the board is physically realizable. If it is not, you will run into a lot of troubles while assembling the components. In order to avoid such issues, there is an option for the 3D view of your board. Click the 3D display button.

Screenshot of 3D Display Menu in KIcad

If you are happy with the arrangement of the components in your board, you can start routing.
Before that you have to set a few things. Go to general options, where you can set the number of layers required, maximum links shown etc.

Screenshot of General Options in Preferences Menu in KIcad

I’m going to make a 2 layered board, which is actually not required for this simple circuit, but I can show you how to add vias and adding tracks in both the layers.
Press OK button to save the settings:

Screenshot of General Options window in KIcad

Now we will be working mainly on the two important layers of our board
1)      Copper layer – normal bottom layer if we consider a single layer board, where we do the soldering.
2)      Component layer – The opposite side of the board, where we place the components.
Now your pcb editor window will look like this.

Screenshot of PCB Layout in KIcad

You can click on any pins to highlight the corresponding connected pins after you have clicked the “Net highlight” button as shown above.
In the following pins a set of highlighted pins are shown. Now you can add tracks connecting those pins using the “Add tracks and vias” tool. Make sure that you have selected the “Copper (page up)” from the drop down list as marked in the figure.

Screenshot of copper layer in KIcad

Now you can place track connecting the pins. Use END key to release the track once you have reached the end point.

Screenshot of making tracks on PCB Layout in KIcad

In the following figure it is shown that I’m having trouble connecting the pin7 and the pins of two resistors R2 and R1.

Screenshot showing trouble in connecting two components on PCB Layout


So I’m going to place a part of the track in the component layer and connect the rest in the copper layer through vias.
First connect the two ends of the resistors normally. Now start adding track from pin 7, and once you have reached the point where you wish to add the via, right click and select “place Via” or just press V.

Screenshot of placing Via in PCB Layout in KIcad

Now you can just route through the component layer and connect both the parts through another via as shown in the following figure.
Screenshot of tracks drawn on PCB layout in KIcad
Keep in mind that your component’s pin can also act as a via, as it is Printed Through Hole (PTH), connecting both the layers.
I’ve finished routing and my design is shown below.
Screenshot of PCB layout in KIcad after routing
Now let us have a 3D view of our board.
Screenshot of 3D view of circuit in KIcad

Generating Gerber File


4)  Generating Gerber file

Select plot after clicking the file, to open the plot window.

Screenshot of plot buutton in File Menu in KIcad

Do the things in the plot window as shown in the following figure:

Screenshot of plot window in KIcad

Now go to the main window and click the “gerbview” button to open up the Gerber viewer.
Screenshot of gerbview button in KIcad
The following figure shows the Gerview window. Select “Load Gerber file”

Screenshot of Load Gerber file button in File Menu of KIcad

Let us view the copper layer first.

Screenshot of copper layer file

Gerber view for the copper layer:

Screenshot of copper layer file

In order to view another file without mixing the view with the previous one, use the option “Clear and Load gerber file”.


This time we select the component layer:

Screenshot of component layer file

The Gerber view of component layer will look like this:
Screenshot of component layer file
In order to view all the layers at once use the option “Inc Layer and Load gerber file”.

Screenshot of Inc Layer and Load gerber file button in File menu of KIcad

Gerber view of the selected layers will look like the following:

Screenshot of Gerber view of the selected layers in KIcad

Now you select the option “Save set up”.

Screenshot of Save set up button in File menu in KIcad

Save the gerview file as the extension .cnf

Screenshot of saving the gerview file as the extension .cnf

Now click the save button and we finished. Next step is to send the Gerber files to your PCB manufacturer. Which all files you have to send depends on the pcb manufacturing process they have.




Hi, Nice Tutorial.. from where can I get free KiCAD software, please send it to me..

you can download from it's website.