Going from Schematic to PCB Layout in KiCad (using Cvpcb)

NOTE: This tutorial was written in 1847, and kicad has changed a lot since then!

This section will explain the process of going from the schematic to pcb layout in KiCad. The process is a little bit more involved than in Eagle, and requires 4 steps:

  • First, make sure all components are annotated (numbered).
  • Generate a netlist that contains all the components and their connections.
  • Use cvpcb to assign pcb footprints to all the components (not necessary if new components have not been added.)
  • Load the netlist in pcbnew.

Netlist Generation:

generating a netlist in kicad

Assuming your schematic is already annotated (numbered), click the “Netlist Generation” button.

generating a netlist in kicad

Just click the “Netlist” button unless you want to generate one for a different layout program or circuit simulator.


Assigning PCB Footprints to Components using Cvpcb:

run cvpcb in kicad

Now run Cvpcb.

cvpcb in kicadfiltered component list in cvpcb

Click the filter button to only show capacitor footprints.

assigning a module or footprint to a component

Double click on the footprint (module) to assign it to the schematic component.

Inspecting Footprints:

 previewing modules in kicad's cvpcb

We’d like to use a cylindrical upright electrolytic cap for C2, but clicking the preview button reveals that none of the choices in the filtered list look right.

After clicking “display footprints list documentation”, we can look through all of the built-in footprints and pick a better choice. Turn off the filtered list and choose C1V8.

Continue mapping the components, and then click Save to store the mappings in the netlist.

But wait, if it’s saving with the same name (.net) that was used when eeschema made a netlist, won’t it overwrite the original file?

When either eeschema or cvpcb saves a netlist, it doesn’t overwrite a pre-existing netlist, but rather adds or changes info inside one.

before and after cvpcb saves a netlist

The above picture shows the netlist (.net) file before and after cvpcb maps the modules. There are “noname” placeholders that get filled in by footprints after cvpcb runs.


Loading components in Pcbnew:

run pcbnew to begin making the pcb layout

Now that modules have been assigned to the components, run Pcbnew to begin designing the circuit board.

read netlist in pcbnew

First, click the “read netlist” button.

click the read net list button to load components

Click the read netlist button to load components.

You’ll do this same procedure when you make changes to the schematic:

  • annotate
  • write netlist (from eeschema)
  • run cvpcb (if new components were added)
  • read netlist (from pcbnew)

It’s a little tedious, that’s how the system works (to the best of my knowledge–add a comment if wrong!)

 

Some of the options when reading in a netlist can be dangerous. I’d recommend backing up your .brd layout file before reading from any netlists, as there’s no undo in pcbnew yet.

Say, for instance, you’ve added screw holes that aren’t in your schematic or netlist. If you check “Remove Extra Footprints” it will delete those screw holes when you read in the new list.

 

components loaded into pcbnew from netlist all on top of each other

 

 

<-Back                                                                                       Next->

Designing PCBs in Kicad and PcbNew:

NOTE: This tutorial was written in 1847, and kicad has changed a lot since then!

Contents:

Arrange Components:

Grid First!

adjust the grid size in kicad adjust the grid size in kicad

You’ll probably want to adjust the grid size before moving anything. The pull down contains the user grid size as well as several sizes listed in mils (thousandths of an inch).

Group Move:

move a group of components by selecting

When you first read a net-list, all the components will come in on top of each other.

Start off by moving the whole pile of components by drawing a selection rectangle around them and then click in the middle of the sheet.

Auto Un-Piling

turn on auto-move moderight click and select move all to unpile the components

Pcbnew will automatically unpile the components. First, enable the automatic mover by clicking the “Mode Module” button in the top toolbar. Then right click and select “Move All Modules”. Pcbnew also has an “auto placer,” which is different in that it tries to minimize the length of the connections between the modules (the ratsnest). You can fix components to prevent them from being moved by either command.

General Moving and Rotating–use keyboard shortcuts:

move components by pressing m or r

Continue moving components around by hovering the mouse pointer over them, and then pressing “m” or “r” to move or rotate.

Rats Nest (show rubber bands where all connections should be):

show the rats nest

<-Back                                                                                       Next->

Designing PCBs in Kicad and PcbNew: Drawing the Board Outline

NOTE: This tutorial was written in 1847, and kicad has changed a lot since then!

Drawing the Board Outline:

edges.gif

drawing a board outline with the polyline tool

First select the edges layer, and then draw an outline using the line tool. Double click to finish the poly-line.

Tip: Drawing set lengths and measuring:

measure by hitting space bar to zero the relative position readout.

Hit space bar at the start of a line to zero out the relative coordinates at the bottom of the screen. The coordinates will then measure from that point.

 

<-Back                                                                                       Next->

designing PCBs in Kicad and PcbNew: Drawing Traces

NOTE: This tutorial was written in 1847, and kicad has changed a lot since then!

Drawing Traces:

Selecting and switching between layers:

picking the copper layer in kicad

Pick either the copper or component layer to draw traces on (unless you’re making a board with more than 2 layers). The copper layer is traditionally the “bottom,” whereas the component layer is the “top,” or the side with the components.

Pressing the “v” key switches between these two layers. So if you start out on the wrong layer, press Esc, and then “v” and start again. “v” also creates a via if you’re in the middle of drawing a traces.

Drawing Traces:

select the trace tool click to set bend points when drawing traces in kicad

Select the pads and trace tool to begin drawing traces. Click a pad to begin, and then click to make bend points and double click to end a trace.

Clicking at B fixes node A, and also sets the slope of segment AB. Hitting backspace undoes node points one at a time.

If you get an error along the lines of “near track end” or “too close to via,” some part of the trace you’re trying to draw is intersecting with another trace from a different net. Or the clearance is not being maintained.

Deleting tracks:

deleting tracks in kicad

To delete tracks, first make sure the trace and pad tool is selected select the trace tool , then hover over a trace and hit “backspace” to delete one segment or “delete” to remove a complete track between two pads.

Vias:

press v to make a via in kicad

Press the “v” key to make a via during a draw operation, and also to switch layers when not drawing.

Changing Track Widths:

changing track sizes in kicad changing track sizes in kicad

Most pcb manufactures won’t go smaller than .007 (7 mils) inches trace width and clearance without charging extra. It’s a good idea to make power and ground traces as think as possible.

7 mil trace in kicad track clearance markings while drawingchanging track width

To change an existing track’s width, first change the overall program’s track width using the dialog as before or the pull-down menu, and then right click on the trace. Via sizes are changed the same way.

Notice that I did not use the “Select Track Width” in the first level of the right-click menu. That applies to the global setting, and will not change a track that you just clicked on. If you right-click and lock some traces, you can use this global setting to change a large group of traces without affecting the power traces, for instance.

Don’t delete, just redraw:

redo traces by drawing somewhere else

If you re-draw a trace somewhere else, KiCad automatically deletes the connection that you replaced, so there’s no need to first delete it.

Changing Track /Trace Layers:

As far as I know, the only way to change a trace’s layer is to re-draw it.

Dragging Traces:

Just right click on a trace or node and select Drag Segment, Drag Node or Drag Segment keeping Slopes, which keeps the angle the same on the two adjoining trace.

Highlighting Nets:

highlighting nets

It can be helpful to highlight all the traces and pads that should be connected together (a net).

 

<-Back                                                                                      Next->

designing PCBs in Kicad and PcbNew: Undo and Adding Screw Holes

NOTE: This tutorial was written in 1847, and kicad has changed a lot since then!

UnDo… not yet, but there is an UnDelete:

undelete in kicad's pcbnew

It’s pretty easy to accidentally delete an entire track, so this is actually very helpful. Unfortunately, there is no general purpose undo that I know about.

Adding Screw Holes:

One of the quirks of KiCad is that you can’t just drill a hole, you need to make a one-pad component that has the right sized hole for your screw. The module called “1PIN” is the right size for a 4-40 screw.

adding new modules inside pcbnew

Click the “Add Modules” button.

type in the module name for 1PIN

Type in 1PIN and click OK or click “List All” to browse by library.

place the screw hole and repeat for the other 3 corners

Place the screw hole and repeat for the other 3 corners.

 

<-Back                                                                                       Next->

Designing PCBs in Kicad and PcbNew: Changing Parts

NOTE: This tutorial was written in 1847, and kicad has changed a lot since then!

Changing Parts:

If you want to delete, add or functionally change a component, it’s best to change the schematic and repeat the entire process again:

  • Make changes in eeschema, re-annotating the components if necessary (putting numbers in for R?, C?, etc.)
  • Save netlist in eeschema (schematic editor)
  • Run Cvpcb and assign a footprints / modules to the new components
  • Read the netlist again in Pcbnew (backup the .brd first!)

If you’re just changing the footprint of a module, for instance, going from a 1/4W resistor to a larger 1/2W, you can make the changes just in Pcbnew (explained below).

Deleting, Adding or Making other Major Changes:

As just stated above, make the changes in the schematic using eeschema. We’ll add a 2-pin header for power, and replace the pot with a fixed resistor.

adding a 2 pin connector in kicad / eeschema2 new parts in kicad

Add the 2-pin connector, wire it up, delete the pot and re-wire a resistor in its place.

generating a netlist in kicad

Again, save the netlist, and then open Cvpcb.

cvpcb kicad

The new netlist should have two blanks in it now. Assign the module SIL-2 to the CONN_2 connector and another R4 to the resistor. Save the netlist again.

read netlist in pcbnew

Open Pcbnew and click the “Read netlist” button.

click the read net list button to load componentsclick the read net list button to load new components

If you just click “Read Current Netlist” in the dialog without changing any options, it adds the two new components, but doesn’t delete the old ones and their stale tracks.

click the read net list button to load new components 

Selecting “Change” and “Delete” under “Exchange Module” and “Bad Tracks Deletion” gets rid of some of the bad traces, but still doesn’t delete module RV1. Had RV1 been labeled R4 before, it would have indeed deleted the module and replaced it with the new R4.

But since RV1 has a different name, the only way to get rid of it is to manually delete it or select “Remove Extra Footprints” under “options.” We can’t select that option, however, because that would delete any modules that are not in the netlist (or the .cmp file), which includes our screw holes.

555 timer circuit

Changing Just a Module, and Not the Circuit:

This can be done solely in Pcbnew without going back into Cvpcb or Eeschema.

You can either swap out a module for a different one from the library, or actually edit the silk screen and pin layout.

First, right click on a component and edit the footprint.

Then click “Change Module”.

Type in “R5” or Browse to find a new module, then click “Change Module”.

A new, longer resistor footprint should be in place. Although the netlist didn’t change, another file also used to keep track of modules has: the .cmp file. Next time you run Cvpcb, it will already show a new R5 module mapped to R4. The naming convention is extremely confusing here–R4 is a component label, and R5 is actually a foot print name.

By clicking “Edit Module” in the above Module Properties dialog, you could open up the module editor and actually change the shape and pin arrangement of the footprint. The resulting module would be saved in the .brd file, and not a library (I think).

 

<-Back                                                                                       Next->

Designing PCBs in Kicad and PcbNew: Adding Copper Fills/Zones

NOTE: This tutorial was written in 1847, and kicad has changed a lot since then!

Adding Copper Fills / Zones:

In KiCad, filling an area with copper does not create any connections, so the first step is to finish drawing all the traces as normal.

Use the highlight tool to highlight the net for which you will be creating a zone(GND in our case).

 

Select the zone tool and click somewhere to start the outline (this will bring up the zone dialog).

Select the NET, layer and pad options, which is how the zone will connect to pads that are part of the net. If you choose “include pads,” the copper fill will completely connect to the pad, which will make it very hard to solder as a large amount of heat will be drawn away. The “thermal” connection option makes several fingers that connect the pad to the fill area, thus reducing the thermal connection so it’s easier to bring the pad up to temperature during soldering.

Also, the zones are filled with individual trace lines, so choosing a grid that’s big will create large gaps, and choosing a grid that’s too small will create extremely large files. The KiCad author recommends .01″

Draw the Zone:

Adding Cutouts:

Right click with the zone tool on an existing zone outline.

Filling the Zone:

Just right click in the boundary and select fill.

 

<-Back                                                                                       Next->

Designing PCBs in Kicad and PcbNew: Making Gerbers (files needed by the manufacturer)

NOTE: This tutorial was written in 1847, and kicad has changed a lot since then!

Making Gerbers (files needed by the manufacturer):

making gerber with plot from the file menu

For a 2 layer board, you would commonly want files that represent the metal on the top and bottom (component and copper, respectively), top and bottom solder mask (the green stuff), the top silk screen, the board outline (edges), and a drill file (click “Create Drill File” in addition to “Plot”).

<-Back                                                                                       Next->

Making New Components and Modules (Footprints) in KiCad

NOTE: This tutorial was written in 1847, and kicad has changed a lot since then!

Intro:

This won’t go into every detail, but it will cover the unintuitive aspects of creating new components, including how the libraries work.

About the Libraries:

Unlike Eagle, where there is one type of library that contains both the schematic symbol and the footprint variations, in KiCad, .lib files contain schematic symbols and .mod files contain footprints, or “modules.” Cvpcb is used to map footprints to symbols.

Both of these libraries can contain from one to many parts.

LibEdit: Making New Schematic Components:

To create a new component, first launch LibEdit.

The most common approach is to modify a component from another library, and then save it in your own custom library.

 

First, open a source library. Here we choose the microchip library:

 


Then, load a component that you are going to modify, the 18F2550 PIC.

Let’s change the chip’s name by modifying its properties.

Select the “Fields” tab and click “Value/Chip Name”.

We’re going to call the new chip “magic_smoker”.

You now have a couple different choices for where to save this newly named part:

  • Save it in the current library: First save it in “ram,” and then to the hard disk. Saving in “ram” lets you update the symbol in the current schematic so you can see if the graphics fit within other components, for instance. If you don’t like the changes, just re-load the part from the source library as before since it hasn’t been changed on disk. Save to “disk” to permanently store the changes within the microchip library.
  • Save it to a New library: Clicking the new library button will open a dialog that lets you name a new library and save this part to it. Be aware that this new library and its part will not be loaded unless you update eeschema’s preferences to load that new library!!
  • Export the symbol: Export is the same as creating a new library, except that the default save location will be in your project directory, not the general KiCad library directory. Exporting simply creates a new library that happens to only have the one new part.

Creating a New Library in which to Save the New Chip:

Let’s take the 2nd option, and store the chip in a new custom library that will hold all of our custom schematic symbols.

We save the library as “curious_inventor_symbols.lib” inside the default KiCad library directory.

Two notes:
–The “current library” in LibEdit is still set to microchip.lib, not our new library. So if you were going to make more changes, be sure to switch to your new library before saving anything!
–We now need to update the preferences in Eeschema to load the new library, otherwise it won’t be able to load the chip. We do this next.

Close LibEdit, return to Eeschema and open the preferences.

Add the new library, and then be sure to save the configuration in the main .pro (project) file.

The manual does a good job of explaining how to make new parts. Our only advice is to avoid using the hidden power pins on new parts, and just keep everything visible and connected with wires. It can be especially confusing when you have multiple power levels.

Many of the same ideas apply to making new modules, but the library situation is slightly more confusing.

All about modules (footprints) and their libraries:

What files do I need to send someone else so they can load my schematic and board?

With schematics, they need to have the .lib files that contain the symbols, and those library files need to be loaded in the Eeschema preferences. On the other hand, with boards (.brd files), modules (footprints) can be stored inside the .brd file. You can send someone a .brd file and nothing else, and they would be able to look at and edit the board. However, when you want to load components from a netlist, the module libraries (.mod files) need to be present and loaded in the Pcbnew preferences just as with schematics. Also, it is necessary to load the .mod files in the preferences of Pcbnew in order for those modules to show up in Cvpcb.

If someone sends you a .brd file with modules you’d like to use in another board, you can open the module editor, load a module from the current board, and save or export it into another module library. You can also export all the modules in a .brd file at once via: Pcbnew–>File–>Archive Footprints–>Create footprint archive, which will create a new .mod file with all the board’s modules.

The Module (Footprint) Editor:

 

 

When you make a new component, it asks you for the reference. The reference is the name of the footprint.

 

<-Back  

Decimal Sizes for Numbered and Lettered Drills

Drill Number / Decimal Cross Reference

drill number decimal (inch) decimal (mm)
97 .0059 .150
96 .0063 .160
95 .0067 .170
94 .0071 .180
93 .0075 .190
92 .0079 .200
91 .0083 .211
90 .0087 .221
89 .0091 .231
88 .0095 .241
87 .0100 .254
86 .0105 .267
85 .0110 .280
84 .0115 .292
83 .0120 .305
82 .0125 .318
81 .0130 .330
80 .0135 .343
79 .0145 .368
78 .0160 .406
77 .0180 .457
76 .0200 .508
75 .0210 .533
74 .0225 .572
73 .0240 .610
72 .0250 .635
71 .0260 .660
70 .0280 .711
69 .0292 .742
68 .0310 .787
67 .0320 .813
66 .0330 .838
65 .0350 .889
64 .0360 .914
63 .0370 .940
62 .0380 .965
61 .0390 .991
60 .0400 1.016
59 .0410 1.041
58 .0420 1.067
57 .0430 1.092
56 .0465 1.181
55 .0520 1.321
54 .0550 1.397
53 .0595 1.511
52 .0635 1.613
51 .0670 1.702
50 .0700 1.778
49 .0730 1.854
48 .0760 1.930
47 .0785 1.994
46 .0810 2.057
45 .0820 2.083
44 .0860 2.184
43 .0890 2.261
42 .0935 2.375
41 .0960 2.438
40 .0980 2.489
39 .0995 2.527
38 .1015 2.578
37 .1040 2.642
36 .1065 2.705
35 .1100 2.794
34 .1110 2.819
33 .1130 2.870
32 .1160 2.946
31 .1200 3.048
30 .1285 3.264
29 .1360 3.454
28 .1405 3.569
27 .1440 3.658
26 .1470 3.734
25 .1495 3.797
24 .1520 3.861
23 .1540 3.912
22 .1570 3.988
21 .1590 4.039
20 .1610 4.089
19 .1660 4.216
18 .1695 4.305
17 .1730 4.394
16 .1770 4.496
15 .1800 4.572
14 .1820 4.623
13 .1850 4.700
12 .1890 4.800
11 .1910 4.851
10 .1935 4.915
9 .1960 4.978
8 .1990 5.054
7 .2010 5.105
6 .2040 5.182
5 .2055 5.220
4 .2090 5.309
3 .2130 5.410
2 .2210 5.613
1 .2280 5.791

Drill Letter / Decimal Cross Reference

drill letter decimal (inch) decimal (mm)
A .2340 5.944
B .2380 6.045
C .242 6.147
D .2460 6.248
E .2500 6.350
F .2570 6.528
G .2610 6.629
H .2660 6.756
I .2720 6.909
J .2770 7.036
K .2810 7.137
L .2900 7.366
M .2950 7.493
N .3020 7.671
O .3160 8.026
P .3230 8.204
Q .3320 8.433
R .3390 8.611
S .3480 8.839
T .3580 9.093
U .3680 9.347
V .3770 9.576
W .3860 9.804
X .3970 10.084
Y .4040 10.262
Z .4130 10.490
About

CuriousInventor launched in late 2006 (pre-arduino era!) as a place to enable hobbyists, students, and musicians to create their own technology. We sold open-source kits and tools, and offered numerous guides & videos on things like soldering, metal working, screws, electronics, and more. 

The store is now mostly empty, but we’ve kept the product pages and guides up since they have useful information. Many of our guides and videos still rank on the first page of google searches and have been seen millions of times. Content on this site and the CuriousInventor YouTube channel produced by Scott Driscoll.

Top Videos