KiCad Design Guide - February 2022
KiCad Design Guide - February 2022
KiCad
Design Guide
Table of Contents
Section 1. Creating a component symbol library in KiCad.............. 4
2 www.protoexpress.com
4.2.2.1 USB connector.......................................................................................... 44
4.2.3 Placement of the surge suppressor ................................... 45
4.2.4 Placing the auxiliary components as per signal flow........... 46
4.2.4.1 Capacitor placement......................................................................... 46
4.2.4.2 Crystal placement............................................................................. 48
But before that let’s have a brief look at the KiCad component library.
1.1 Component library
All the components used in a schematic are described in the component libraries.
Several libraries are used to provide reasonably simple component management,
through the grouping of components by its subject (by functions, manufacturers).
4
Component library
www.protoexpress.com
The component library contains a large variety of pre-installed libraries. Also, the Li-
brary Manager menu helps you to modify libraries like: build new libraries, add and
delete components from libraries, and pass a component from one library to another.
Check out the KiCad library for symbols before creating your own:
https://kicad.github.io/symbols/
If you just downloaded KiCad, you might have to install some libraries, like
schematic and symbol libraries. Today, we are going to show you how to proceed.
First, let’s open KiCad on your computer.
To create a new project, follow these simple steps:
Go to File on the left-hand side
Click New
Select Project
You can select the respective location where you want to save this new file and name
it. For this demonstration, we will call it New Design. You can now click Save.
Once your new project is created, it opens automatically and you can see two files. One
is the board file and the other one is the schematic file, which we created already.
Copyright Sierra Circuits, Inc., 2022
5
1.3 Creating a schematic
To create a new KiCad schematic, double-click on Schematic. We need a schematic
design which we will draw over the appearing frame. If the schematic design is
avail-able, you will ind certain components, such as capacitors, inductors, or maybe
simple ICs, like regulators on the right-hand side. Click a symbol and drag it to the
center of the frame.
Double click on Schematic > select a pre-installed library/click create to add a new
KiCad symbol
All the libraries will load and a window will pop up. These are pre-installed libraries and
symbols which already exist in KiCad. For instance, we can click this schematic symbol
and place it in the frame.
If a symbol is not available, you can create a new KiCad symbol by clicking Create, De-
lete, or Edit the symbol at the top.
6 www.protoexpress.com
Go to File
Click New Symbol
Select the library in which you want to save the symbol
You can now see IC, which is the name of your symbol, and U, which is the reference.
Select the reference and move it from the center. Repeat the same action with IC.
To set the grid, right-click on the screen and you will see an option called Grid. It’s best
to keep it to 50mils.
Let’s say you want to create a symbol for IC. On the right-hand side, click the rectangle
called Add graphic rectangle to symbol body. Select it and draw a box.
Before connecting the pins, which are nothing but the terminals of your IC, you need
to fill the background of this box. There are two different ways to do this:
Place your cursor on this line > right-click on it > select Edit Rectangle Options >
select Fill with body background color. It will color the entire shape.
Another way to complete this action is to keep the cursor on your line and click E on
your keyboard. The Rectangle Drawing Properties window will appear and you can
directly select Fill with body background.
8 www.protoexpress.com
1.5.1 Pin placement and numbering
You now need to place the pins. On the right-hand side, click the A1 symbol. Then,
you can drag it and click the screen.
Click on the A1 symbol from the right toolbar > Configure your pin properties
The Pin Properties window will pop up. You can now configure your pin properties.
Let’s assume this as a regulator. A regulator has three pins which are input, output, and
ground. Therefore, we will require three different pins.
Fill out the pin name and the pin number fields. Here, we will write IN and 1. You can
personalize the other properties.
Let’s say you want to rotate and place this pin on the left-hand side. Right-click on your
screen and select Rotate Clockwise.
The second pin name will be GND and the pin number 2. As for the electrical type, you
have the option to choose Unspecified. Click on the screen, select Rotate Clockwise,
and place this pin over here.
The last one is output. The pin name will be OUT and the pin number 3.
Once the pins are placed, right-click on the screen > select End Tool.
You can see the pins are placed and the names are given. The symbol is completed.
You can save it. Remember this library name, which is New Library 0 here, and the
symbol name, which is IC here, as you can see at the left-hand bottom corner.
Once you save the symbol, you can minimize your window. To use the symbol in your
schematic:
Open your schematic page > select Place symbol on the right side from the toolbar
> Drag it to the center of the screen > Choose Symbol window will pop up
10 www.protoexpress.com
Choose a symbol from the library
From Choose Symbol window search for your library. Here, it’s the New Library 01. You
can see the preview of the symbol IC we just created. Place it on the schematic, right-
click, select End Tool and Save.
KiCAD is a widely used free Electronic Design Automation (EDA) software. The
software is mainly used as a PCB layout tool and to create schematics. It also
facilitates the creation of a Bill of Material (BOM). We will discuss such features
below.
First, you need to create a new project. Go to File on the left-hand side, click New
project. Choose the location where you want to save this new project and name it.
In this demo, we will name it as an LED project. Click Save.
Go to file > Click new project > Choose a location to save your project and name it
12
> Click save (In this demo, we will name it LED project.)
www.protoexpress.com
KiCad main menu
Two files are created in the name LED project at the top left side. From the top, the
first one is a layout file and the second one is the schematic file. Let’s open the
schematic file first.
Here we are considering a simple schematic design for a battery, a regulator, and an
LED. This schematic will be used to light up a simple LED. To place components
in your schematic you need to choose components from the library. To do that
follow these steps:
Select Place symbol icon from the toolbar on the right side > a window will
pop up > choose your component
Search for a battery among the components. We will select a single-cell battery for
this instance. Simply click the screen to place the battery on the schematic.
Let’s repeat the same action to find a resistor. Select the one you want and place it on
your schematic. Then choose an LED and two capacitors and regulators.
While choosing a capacitor, you will have two choices: an unpolarized and a polarized
capacitor. The unpolarized capacitor is basically a ceramic capacitor, and a polarized
capacitor is electrolytic. We will take the unpolarized one for now.
We have selected components that are already available in the library. All the
components we require may not be in the built-in library, for example, a regulator.
Click Create, delete and edit symbols from the toolbar on the top > select file from
the new window > select new library > name your library > click save
14 www.protoexpress.com
Here we will name the library as an LED project.
Now go to File again, select New Symbol and search for the library that you
just created.
Name the new symbol, such as, in this case, LM7805, which is a five-volt regulator. You
need to create a symbol for every component. Every component has its own datasheet
and its serial port number.
You need to find the datasheet for the part number. Here we need the datasheet of the
regulator LM7805. You need to see the pin configurations of your device from the reg-
istered datasheet by the manufacturer.
In this case, there are four different packages. These packages depend on the Manu-
facturer Part Number (MPN). So, you will have to decode the MPN which will give you
the correct package. Here, we will require these three pins: input, ground, and output.
You can see that there are more connectors, such as Tab. They all are ground.
We have created a schematic block, now we will have to create pins to have an
additional pair on the board. Here in the case of a regulator, we need four pins. The
ground will have two pins, which are Pin 2 and Pin 4. Pin 1 will be input and Pin 3 will
be output.
Let’s start and move the components aside. We will use the Add graphic rectangle to
symbol body option on the right side. But before that, right-click and select End Tool.
You have to select the grid first, so right-click again on the screen and make sure your
grid is set to 50mils. Now, you can click this box and draw. Right-click and select End
Tool.
To fill color in the box, right-click the border of the rectangle > select Edit Rectan-
gle Options > Fill with body background color > click Ok. Now your regulator box is
ready, now we have to add pins to it.
On the right-hand side, click the A1 symbol, and then drag it to the screen and click on
the screen. A pop-up window will appear.
Select A1 symbol > drag it to the center of the screen > click ok > configure your
pin in the appearing pop up window.
16 www.protoexpress.com
Pin Properties Window
Here the pin name will be input and the pin number one. In this way, you can create
the required numbers of pins. If you have to rotate your pin, right-click on the pin >
select Rotate clockwise.
Here, we have created four pins for the regulator. Once the pins are created, save
them by clicking save all changes on the left-hand side.
Once the device is saved, you can import this in your schematic design file. To do this,
go to the main schematic file > select Place symbol. A window will pop-up where you
can find the LED project.
17
Choosing symbols
Go to the toolbar on the right hand side > select place the wire icon > draw a line
between component leads where you need the connection.
Connection of symbols
When you are done, right-click and choose the End Tool. You can see a small square
on the connection line. If the wiring is not made properly, select that line and delete
it. Again, select Place Wire and make the connection. Repeat everywhere it needs to
be done.
Click the Ground option on the right-hand side toolbar > click on the screen.
A window will pop up.
18
Choose Power Symbol Window
www.protoexpress.com
From the pop-up window search for GND, select the symbol, and place it on the
schematic. Select Place Wire again and connect the negative to ground. Right-
click and select End Tool.
The connections are done for the components of this schematic design in KiCad.
Don’t forget to save the file.
After the connections are done, if you see a question mark next to the U symbol, it
means you have to annotate this symbol. On the top, there is an option called
Annotate Schematic Symbols.
Select Annotate schematic symbol > choose the options – Use the entire sche-
matic and Keep existing annotations > select Annotate
Now you can see that the question mark has turned into a number. The tool automat-
ically gives numbers to all the components. Again, don’t forget to save.
The schematic design is complete but you need to assign footprints. The footprint
information will be given in your datasheet. This is how you can create a simple
schematic.
Now we will explain how to create a high-speed schematic design. Here, we are
using a circuit we previously created.
Micro-controller schematic
You need to design the specs to meet this requirement of 1.5 amps. You can see
that there is a firewall over the top of the design as a red dotted line. This portion is
our power line, designed to meet the spec 1.5 amps output.
There is a connector in the IC that is marked as a power pin because 5 volts are
directly going to it and we don’t know where this will be connected. It will depend on
the person who will be using this. By marking the pin as a power pin, we indicate
that the trace needs to be sufficient to carry 1.5 amps of current.
This sheet has the FTDI chip which converts the input serial signal into a USB differ-
ential signal. The other yellow rectangle is the USB connector. Here, we are using a
USB 2.0 which can operate from 12 MHz to around 240 MHz. You could also use a
USB 3.0 which can operate up to 5 GHz.
20 www.protoexpress.com
Schematic of FTDI chip
Normally, we use differential pairs. Differential pairs are nothing but two lines carrying
the same data in an inverted form with respect to each other at a particular point in time.
You can see that we have DIFF_DN_90R and DIFF_DP_90R. These are the two pins that
bring data into your IC from this connector. DIFF_DN_90R is a negative line and DIFF_
DP_90R is a positive line.
Factors like the length of the trace, the width of the trace, the thickness of the trace, and
the height of the trace from the ground plane influence the controlled impedance.
For instance, the main IC on this schematic has input impedance at pin8 of 90Ω as de-
fined by the USB standard. The differential tracks should match this impedance. In order
to do so, there are certain rules you need to follow, such as adjusting the width and thick-
ness of the track.
There is also crosstalk, which is nothing but interference on one line due to another trace
that is close by. You need to maintain a specific distance between these two tracks. The
width of each track should be as per the requirements. The trace width and spacing for
a certain impedance may be obtained using an impedance calculator.
The length matching of these differential pairs is important because these two lines are
time-dependent or delay-dependent. A signal comes from a connector at a particular
time and reaches its destination at a particular time. The signals from both these tracks
should reach at the same time. If the lengths are different, and since both signals on
both differential pairs operate at the same speed, this can generate a false signal at the
output.
This is how we create a schematic design in KiCAD. We have covered every step in
schematic designing including creating library and symbols, connecting and annota-
tion components, and creating BOM for a design. Finally, we have gone through two
high-speed schematic design examples.
You might also have to generate a Bill of Materials (BOM)., BOM is the complete list of
all needed material in manufacturing the board, which includes the list of raw materi-
al, components, assemblies and subassemblies, and other items needed for product
manufacturing.
On the top toolbar> Select BOM > Select bom_html_grouped_by_value > make
sure file name ends with .XLS extension > Generate
In the command line section, you can see .xls. Make sure that you have the .xls
extension before you select Generate. This will generate a file in the folder of your
project. The file contains the quantity, the value, and the part. This is your complete
list, the complete data of your schematic design that indicates the components you
will request for.
22 www.protoexpress.com
Section 3. Setting up the board
parameters and rules in KiCad
DEMO VIDEO - (Design rules) Setting up the board parameters and rules
• Go to Preferences
• Click Preferences
• Fill Autosave information – Autosave and File history size
In Hotkeys, you can choose shortcuts. This is an efficient way to do your layout. You
have pre-saved commands but you can also add new ones.
Feel free to browse the display options as well. You can choose among many op-
tions, such as the grid style, thickness, spacing, etc.
24 www.protoexpress.com
To modify display options:
• Change Grid style and Cursor Options by selecting the required radio button.
• Enter values for Grid thickness, Min grid spacing, and Dimensions as required.
To set up the board layers, click Board Setup at the top. In Board Editor
Layers, you can customize your layer set.
By default, you will have two copper layers. You can see the top copper layer and the
bottom copper layer. These are signal layers.
26 www.protoexpress.com
• Select the Physical Stackup option
• Choose the number of copper layers using the dropdown
• If your board has any controlled impedance trace, then check the
Impedance Controlled box.
• Number of layers
• Type of dielectric layers
• Material of each layer
• Color of top and bottom silkscreen and solder mask
• Thickness of the copper layers
• Epsilon R and loss tan of the material
Now suppose you are using a differential track on the first layer, the reference layer
to layer 1 should be a ground layer. This is because, on the differential pair, the
ground layer should always be below the differential pairs without breaks. This is to
ensure the impedance matching of the differential pair is constant over the entire
length.
The surface finish options can be viewed under the Board Finish section. The required
copper finish can be chosen using the dropdown.
Let’s move on to the Solder Mask/Paste section. Here, you can define solder
mask clearance and minimum web width.
28 www.protoexpress.com
The solder mask is used to cover the entire board except the pads defined in your
footprint. If your pad size has a 10 mil diameter, your solder mask opening could be
14 mils (2 mils opening on each side). The solder mask clearance is the extra space
that will not be covered by the solder mask.
The next section is Text & Graphics. This is where you can edit the text that will
appear on your board. You can choose the required height, width, line thickness, etc.
The first choice under the design rules section is Constraints. By selecting this
option, you can view the details about the design rules set. If there are any changes
to the rules you can edit them here.
30 www.protoexpress.com
Here you can view the predefined track and via dimensions.
Next option is Net Classes. You can see over here, there are different nets. And
you can see there is a default class available. This defines a particular clearance.
Clearance is the minimum distance that needs to be maintained between the two
tracks. KiCad will handle that part once you define this minimum clearance.
You can also define the minimum track width for a particular net. A net class is a
group of nets. So all these nets will be assigned to this net class. And this net
class will follow these design rules in KiCad based on the minimum values you
define for clearance, track width, via size, via drill, differential pair width, etc.
If you want to create a new net class, click the + sign. For this demo, let’s create
a net class for a 90Ω differential pair used for a USB.
We have created a new net class. The width of your differential pair will be
defined in your stack-up along with the spacing. And normally, for differential
pairs, the clearance is five times the track width.
These are the nets present in your circuit and this is the net class. Imagine you
want to assign Net-(BT1-Pad1) and Net-(C2-Pad1) to some other class, click
Default under Net Class, and select the class among the available ones.
If you have multiple differential classes, each of the differential pairs should
follow different track widths or different spacing. You can create multiple
classes and define the clearances for each single-ended line and each
differential pair.
Custom rules
If there are any customized rules applicable to your design, you can define them
under Custom Rules section. Click on Syntax help if you require any assistance
with regards to syntax.
Under Violation Severity, you can define DRC and ERC rules for the schematic
and the board. Each of these rules can be set to error/warning/ignore status. If a
rule is set as error, any violation would result in error in ERC and DRC. Similarly,
when we set a rule as a warning, the violations will display a warning message. A
rule can be ignored by setting it to ignore status.
www.protoexpress.com
Once the design rules are set, you can view them at the top of the screen.
• Click Edit Text and Graphic Properties under the Edit tab
• Select layer
• Enter line thickness (0.152 mm = 6mil)
• Enter text width, height, and thickness at 0.75mm = 30mil
• Click OK
If you want to define a pair as a differential pair, select Place Net Label on the right-
hand side and click the screen. Whatever name you choose, it has to end with + and
– or _P and _N.
This is very important for differential pairs. When you start the routing, if KiCad
notices a D-, it will search for the D+ and consider these two tracks as differential
pairs.
34 www.protoexpress.com
Differential pair routing
Now if you want to route two differential tracks, click Route at the top. You can see
the option for single tracks, which is already available on the right-hand side, and
there is the differential pair option. When we click it, a window pops up and
mentions it is unable to find complementary differential pair nets. This is why you
need to make sure the labels end with – and + or _N and _P.
There are two different differential nets, and their length should be the same.
Under Route, there is an option called Tune Differential Pair Length. We can show
you right now how it works for a single track. We select Tune Track Length and
then this red track. A note appears and reads ‘Too short: 37.440 mm/ 100.000 mm’,
which means that we have set the target length as 100 mm, but the actual length of
our track is just 37.44 mm. This is very important in DDRs, for instance, where you
use address lines and data lines. There are eight different address lines and eight
data and their length should be equal.
If you want to change your target length, right-click the track and select Length
Tuning Setting. As we just saw, the target length is 100 mm. We will see what
happens when we write 40 mm. Meanwhile, don’t forget that all these
parameters are very important in differential pairs. For now, we will just show
you how the target length can be achieved.
So we set the target length to 40 mm. It is still indicating ‘Too short: 37.44
mm/40 mm.’ Now we want to make it 40 mm.
So place your cursor on the track and move it. You can see a small S-shaped track appearing.
This is how you increase the size of your track.
KiCad is a versatile tool for electronic circuit design and corresponding PCB design requiring
familiarity and expertise. This guide on setting up KiCad for your PCB design will help you
design faster and better. Good luck with designing!
In this chapter, we will show you how to place components in KiCad and also cover
how to define your PCB outline.
Here we have created a circuit that converts and transfers data from USB to control-
ler. FTDI chip is used to convert the differential pair output from the USB circuit to
8-bit data, which is fed to the controller. The process is controlled by the Atmega328P
controller. Circuits are shown below:
37
Circuit that converts and transfers data from USB to controller
www.protoexpress.com
The important sections are marked in the above picture,
1. USB connector
2. Differential pair output connection between USB to FTDI chip
3. 8-bit output pins
4. Control pins
The controller circuit is shown below:
Let’s now assume that this is the circuit we are working on. Here, you can see a USB
connector and a differential pair that is going to this chip. These eight data pins and
four control lines here all go to the controller. The controller is powered using a 9V input
that is converted to 5V using a regulator. We have already created a netlist using the
Generate netlist option. From our netlist, we have imported all the components in the
board file.
b. Configure your text, net classes, tracks, vias, and solder mask here.
39 www.protoexpress.com
Configuring text and design rules
We have selected a 62mil thick 4-layer board. Layer 2 is ground, Layer 3 is power,
and the top and bottom are signal layers. In Net Classes, we have set the differential
pair widths and gaps to 8mils. There are two types of power: USB power and
regulator power. And we have set all the different net tracks over here. We have set
the solder mask clearance to zero. We are now good to go with the placement.
On the right-hand side, click Add Graphic Lines > Select Edge. Cuts from the layers >
Draw outline
40
Graphic lines in KiCad
Grid origin
There are two ways to find components. You can press key T on your keyboard
and a pop-up will appear. Type your component name or select it from the list.
Another way to find your component is to press CTRL+S. Type the name and the
component will be highlighted. If you want to select it, press key T. You can now
put all the components outside of the board to place them one by one.
Press T on your keyboard > Select your component
41 Finding components
www.protoexpress.com
There are four mounting holes in our schematic: H1, H2, H3, and H4. So these
mounting holes will be present among components, we have to search and find
them.
Change the grid to 5mils. Press key M and place the mounting hole in the corner. We
are randomly placing this M1 but mounting holes should have fixed locations. And
repeat with the three other mounting holes. Once placed, the mounting holes
shouldn’t move. Click them and select the footprint option. Now, right-click and
select Locking and Lock. The mounting hole is fixed. If you try to move it, a pop-up
will warn you about the locked item.
To lock your component, right-click on the mounting hole > select Locking > Lock
You can see there are many connections. If you find it confusing, you can turn off
these wires. Go to View, click Show Ratsnest and the wires will disappear. We
prefer to keep them as they indicate the connections.
After mounting holes, the next step is to place the connectors. Because connectors
should be in a particular direction as per the device design, which cannot be com-
promised, so we choose the connector next.
Connector placement
43 www.protoexpress.com
The next step is to place the connectors. Always refer to your schematic while you
place components in KiCad. This is the 9V Jack connector, which is the J1 connec-
tor, and we want to place it first. Let’s go to the board again. Press key T and type J1.
Once J1 is selected, press key R if you want to rotate it, and place it. After placing
the connectors, it is a best practice to lock them. Right-click, choose Locking and
Lock.
This is the USB section. These are the three connectors we were talking about: J3,
J4, and J5. The USB connector consists of six pins. But pin number six is common
for two pins of the shield of the connector. There are also voltage suppressors for
the two differential pair inputs and one is synced to the main supply voltage, Vbus.
These three should be close to this connector so that it doesn’t allow the
unwanted voltage to enter into the circuit. And we have these two resistors. This
particular connection is important: this is a differential pair working at high-
frequency, at around 12MHz.
This differential pair should be routed properly, with proper length matching,
meaning the skew should be minimum between the two lengths. This is an
important parameter to consider while placing.
This is the USB connector, and these two pins are the differential pair inputs. One
pin is going over here. This is the surge suppressor, right after the connector. This
will be followed by another trace. This is also a suppressor right after the input.
And here, this pin is VCC which is also going to the surge suppressor. You need to
place the surge suppressors first, and after that, the differential pair so it would be
in a straight line. These two lines are going through the surge suppressor to the
two resistors.
The next step is to follow the sequence of the supply voltage. Before coming into
the circuit, the Vbus needs to go through this surge suppressor. Then, the
capacitor should be close to the Vbus before going to the ferrite. After that, we
want to place the capacitor C13 over there, and C11 and C10 over there by pins 3
and 26.
The capacitor, right after the surge suppressor will go to the ferrite bead. And after
that, it should go to the capacitor.
This is a resistor and this is a capacitor. You can see these two points, this is R4
and this is C8. R4 is drawn from VCC and then is running to AVCC. But before
going to AVCC, it should first pass through C8.
45 www.protoexpress.com
This is a capacitor and this is a resistor. This point is coming through VCC,
through this capacitor, and into the input of the microcontroller. You need to
follow the circuit. Once the placement is finalized and everything is properly
maintained as per your requirements, you can start routing.
Again, always refer to your schematic while you place components in KiCad. You
can see that there are capacitors connected to five volts traces.
We have placed these capacitors on the side in the schematic so this doesn’t get
too congested. These capacitors will be placed at the output of this regulator. And
these two capacitors are used as decoupling capacitors for pins, 7 and 20 of the
microcontroller. This capacitor will be placed at the output pin of this regulator.
And the surge suppressor needs to be placed near the connector because it is
used to suppress any surge voltage coming into the circuit. As you can see, you
just have to go with the flow of the schematic.
So, as per the schematic surge suppressor (D2) is the next. Now search for D2.
Press R to rotate it and place it in the right place.
In this way, we have placed the connector-regulator circuit as per the schematic.
This is how you can place components in KiCad while following the schematic. Re-
member that you have to keep your power, analog, and digital sections separate so
they don’t interfere. As you can see, this is the J1 connector, this is the suppressor,
this is the capacitor close to this pin. C2 is at the output of the regulator and it is
C7 here. This is the electrolytic capacitor and this is C2 which is at the output of the
regulator. There were two capacitors, one each near pins 7 and 20. Place the ca-
pacitor close to the input pins. And there is one more capacitor that is placed over
here, this is pin 21. You can see this connection, both are the same nets. So these
two capacitors are placed close to the pins.
47 www.protoexpress.com
4.2.4.2 Crystal placement
Crystal placement
The next step is the placement of the crystal. It is best to place the crystal as close
as possible to the micro crystal input pins. These two pins are nothing but crystal
input pins, this is the crystal and there are two capacitors. There are two capacitors
connected to the 16-megahertz crystal. Those should be close to the crystal. And
you can see, there are three more connectors in the circuit. Here you have a connec-
tor, a second connector, and a third connector.
All of these lines are input-output pins of the regulator. Ensure that no two connec-
tions overlap each other, or it will create problems while routing. To avoid this, it is
recommended to pre-plan your connections so that when you place components in
KiCad, it won’t affect your routing.
PCB routing
Let us go through the PCB stack-up before we get to the PCB routing.
Try our Stackup Designer tool to easily create your PCB stack-ups.
You can see in this stack-up a 90Ω impedance on the top layer 1 and layer 4 (signal
layers). The outer dark green layers in the stack-up are the top and bottom solder
mask. The yellow layer represents the core and the light green layer the prepreg.
49 www.protoexpress.com
The 0.5 oz copper foil comes with a 0.5 oz plating, so in total it will be 1 oz. The out-
er layers are 1 oz and the required finished thickness is 62mils. The estimated thick-
ness of the lamination is 59.79mils with a tolerance of +/- 6.2. The top and bottom
layers have a 90Ω impedance and a differential line width of 5mils. You can see that
the finished line width is 5mils for layer 1 and layer 4 and the finish spacing is 4mils.
The differential pair width should be 5mils and the spacing between the two tracks
should be 4mils.
Critical routing
Specifying a plane
We are drawing a plane in the left bottom side because the VCC is present in this
section. We have to define +5V for the remaining area on the third layer. The planes
are now set up for VCC and +5V.
51
Drawing a plane on circuit layout
www.protoexpress.com
Let’s route the main tracks, which are power tracks of 9V and +5V that run along
this line to this point. This is the VCC point coming from the connector towards this
point and this one is the VCC running into the circuit.
Select Add Filled Zones again, draw a complete plane on the layer because this is
just a 9V and it will be running only in this region. You don’t have to draw a special
plane on layer 3, you can directly draw it on layer 1.
As shown in the image above there is a connection between FB1 (ferrite bead) and
C13 (capacitor) but you can’t see any line over here as we have created a plane on
layer 3 and this is a through-hole component. Through-hole components normally
connect to all the layers. Since there is a plane on layer 3, FB1 and C13 are connect-
ed through layer 3. The C13 through-hole that is going through layer 3 is connecting
to FB1. It is always a good idea to have a plane because it improves the flow of the
current.
53 www.protoexpress.com
FB1 and C13 connected with through-holes
Now, we will go through how to route differential pairs. We assume that you know how
to import components from your netlist and place them.
The most critical tracks in routing are the differential pair lines. Both wires in the differ-
ential pair should be identical in length and width. We need to make sure that they are
routed properly and are separated by any other high-frequency signal. But if there are
multiple differential pairs then there must be at least a 5W gap between them. 5W is
five times the width of the differential pair.
5.3.1.1 Fiducials
Before routing, let’s take a look at these three circles. These are called fiducials.
Fiducials are normally not connected in the circuit, but they are required as a refer-
ence during manufacturing to indicate the proper orientation of the board. It will also
help you when you place components in KiCad. Click them and place them in three
corners.
Select each fiducial > drag and place them in three corners.
Selection of fiducials
55 www.protoexpress.com
5.3.1.2 Stack-up
Let’s start the routing process by planning the layers. In the PCB stack-up, we have
used Layer 1 and Layer 4 as signal layers, which will be used for proper track rout-
ing. And Layer 2 and Layer 3 are power planes, so they won’t have any tracks. We
will fill the complete area with copper. Layer 2 will be ground so we can route the
differential pair on the first layer. And even then, after the first layer, the reference
for the differential pair should be ground.
We need to make sure that the differential tracks are covered by the reference
ground over their entire length. There shouldn’t be any cut in Layer 2. If there is a
discontinuity, the overall impedance of the 90Ω differential pair will mismatch and
it might affect the signals.
There are two types of grounds here: there is GND for ground and there is GND PWR for
ground power, which are connected to the shield of the USB connector.
Ground pour
Go to toolbar on the right-hand side > click on Add filled zones icon > click on
where you want to start > a window will pop up.
Click where you want to start. A window pops up with various nets. Select which net
you want to pour. We will select the ground power and indicate on which layer we
want to pour, which is Layer 2. You can see the clearance is 20mils. So, when you
pour, there will be a distance of 20 mils from any other component in the circuit.
For corner smoothing, select Chamfer and mention 5mils so when you draw a
square or a rectangle with 90 degree angles, it will automatically make them 45
degrees with a chamfer of 5mils. Click Ok and draw your shape while making sure
to do a complete loop.
57 www.protoexpress.com
Now you can see the portion around GND PWR is connected over here but it is not
completely connected. This is basically a thermal connection. To make it solid:
Now it is completely connected and we have poured this ground. If you select on
the right-hand side GND or Layer 2, you can see the poured layer.
The next step is to pour the remaining portion with your component ground. Repeat
the same pr but this time choose the ground (GND) net instead of GND PWR.
Draw on the required portion for the GND section and click icon to save the
file. Now you have routed the ground layer. It looks like the one shown in the
below picture.
59 www.protoexpress.com
Like this, we have to pour the power layer. There are two types of power here one
coming from the regulator and from the USB. In the USB portion, we have used the
VCC connection, and we can use the remaining portion for the +5V. That will be in
Layer 2. Now, we will route the differential pair first.
Now, let us see the routing of the differential pair. Any net defined with a suffix of
‘+‘ and ‘–‘ are considered as differential pairs. Here it is already defined in the
schematic that this is D+ and D-.
Go to Route option > choose Differential Pair > click on any of the
differential tracks > drag to draw the track.
And one more thing you need to make sure is that all these tracks have an equal
length. For that, Go to Route > click tune differential pair skew/phase > click on any
of the tracks.
When you click on the track, you can see the length of the skew. Length of both
tracks should be the same. If it is different, you need to increase the length of the
shorter track to match with the longer track. To change the length of the track,
Right-click on the track > select Length tuning setting > a window will pop up.
61 www.protoexpress.com
Length tuning settings
There will be a bump in the shorter track in order to increase its length, so we have
to set the dimensions of skew in this pop-up.
You can see over here, this differential pair we have already routed. When we click
it, it says that it is tuned. The differential routing is done.
This is how the completed design looks like.
63
Completed design
www.protoexpress.com
This is how we route differential pairs in KiCad. You should do routing for one
more layer if you are using a double-sided PCB. One thing we must tell you is to
follow the schematic while you do the routing. It can help you to route differential
pairs in KiCad.
A crystal is basically a continuously varying signal which is required for any micro-
controller to operate and used as a reference signal. This should be very close to
the microcontroller and its track should be as short as possible.
Crystal location
We will route this line. Select on the right hand side Route Tracks and mention
10mils. You can go with 10mils when the board is not congested. If it is congested,
then you can reduce it to 8mils. Depending on your requirements, you can even re-
duce it to 6mils.
First, let’s do the routing of the critical nets. As mentioned earlier, the crystal routing
has to be as short as possible.
The ground of a crystal should always be connected to the nearest ground pin. C4
can be connected to a ground pin as shown in the image above. Now, the via is
placed and will connect to the ground plane through the ground pins.
To connect C3 to the ground plane, you can place a via to connect to the ground as
shown in the image above. In some high-speed designs, you can follow guard ring
technique.
To place a via:
65 www.protoexpress.com
5.5 Routing for decoupling capacitors
First, we need to deal with the decoupling capacitors. You can see these are
decoupling capacitors.
Decoupling capacitors
Here, the +5V comes from the regulator. And the track from the regulator should
go towards C5 pins through the capacitor, not directly through the 5V. Let’s connect
this top layer and have the 5V distributed through it. We can place a via near C5.
Now, the +5V will come through the plane towards the C5 capacitor through the via,
and then it will go to the power plane.
As shown in the image below there is a power plane, VCC, and a capacitor.
Select Route Tracks and connect this over here. The plane is connected but the
VCC is still not connected and we have placed a plane on the layer. For that click V
to place the same. Now click Cancel and OK.
Now, the connection will come through the VCC plane, go through the capacitor, and
then to the VCC. Every decoupling capacitor should be routed this way.
67 www.protoexpress.com
5.6 Main pin routing
The next step is to deal with the main pins. These are the control lines with
which we can control operations. They will also give information about whether
the data is available on the chip.
These are 8 data lines that are going to the IC and the pins shown should be con-
nected to the connector.
We actually need to move one of the tracks slightly away from the crystal zone. The
data lines are connected and we need to connect these lines to this connector. To
use the bottom layer, select the line and select bottom.
You can see these lines are running horizontally. But the top to bottom line is run-
ning vertically. This makes the PCB routing very easy if you’re routing different
lengths on the top and bottom. We can connect the via to these tracks on the top.
69 www.protoexpress.com
PCB top layer
As you can see, this is a completed PCB routing. You can see the planes. We have
used a complete plane over here which is connected through layer 3. If you want you
could also have a plane on top. You can see the via that is coming from the plane
through the capacitor and the pin. Same scenario over here.
Now, let’s have a look at the bottom lines. Here, they are in green.
71 www.protoexpress.com
Bottom layers designated in green
Once the PCB routing is completed, the next step is to make sure that the desig-
nators don’t overlap with the pairs. It’s fine if they overlap with the tracks but not
the pairs.
It is possible to place your ref text over your vias, if they are tented, which means
they will be covered with a solder mask. But it is always a good practice to keep
your ref text away from the pads as well as the vias. If it is not possible to keep it
away from your vias, then tent your vias.
To move the ref text, place the cursor on it, select it and find a suitable place without
overlapping. You need to select a proper location and make sure that the distance
from the ref text is at least 6mils from the pads.
Right now, the ref text sizes are quite big. To change the size, go to Edit and Edit
Text & Graphic Properties. Select the footprint references and select the layer. Here,
the line thickness is 6mils and the text width and height will be 30. The text thick-
ness is also 6.
Now that the size is reduced, it is easier to do the placement. If you zoom in a bit,
you will see a white line on the footprints. If you can see this footprint on the right-
hand side, this is nothing but a place bound. It is always a good idea to keep the
ref text outside of this region bound so there is no possibility of interfering with the
actual pads.
73 www.protoexpress.com
Ref text C11 placed cleanly outside bounds (white lines)
Let’s complete the entire placing of the ref text before starting with the DRC checks.
Make sure that all the ref texts are away from the pins. Once this is done, you need
to start with the DRC checks, which are the rules that have been set up at the be-
ginning. This will check whether those rules are being followed or not. So let’s see
how it works. Save the file progress and go to Inspect and Design Rules Checker.
75 www.protoexpress.com
• Select Refill all zones before performing DRC
• Click Run DRC
77 www.protoexpress.com
Now the DRC tells us there are a few errors. Most of these errors are concerning
the differential lines. For instance, here it says ‘two track ends too close.’ Right now,
we don’t have to worry about this because we have set a particular rule for the min-
imum distance between two tracks.
All the errors are in the section shown in the image below and are all the known
errors. Even if we knew this would happen, it is possible to avoid it. We can
change the clearance to 10mils and the spacing to 8mils. The DRC is consider-ing
each track separately and since the spacing is just 8mils, it is actually not
following the rule of 10mils. That’s why it is indicating there is an error, which can
be ignored.
If there are any other errors in the DRC, you need to solve them before going
further.
The connectivity between the schematic and layout can be tested by checking the
box beside Test for parity between PCB and schematic.
It also gives us details of unconnected traces. The data can be filtered by selecting
Errors, Warnings or Exclusions.
To manufacture a PCB, we send these Gerber files and production files of the de-
sign to the manufacturers. Manufacturers send this data to plotters and Computer
Numerical Controlled (CNC) machines to fabricate a PCB.
DEMO VIDEO - How to Export Gerber and Other Production Files in KiCad
Once the routing is completed, we can export our Gerber files. But before generat-
ing the Gerber files, it is important to make sure our design is perfect with the sche-
matics and the layout. So for that, we have created a checklist here.
6.1 Checklist for generating Gerber files
There are three types of checklists you need to go through before generating your
production files – BOM, schematic, and layout.
You need to confirm whether the bill of materials (BOM) which you have created is
as per your schematic. i.e. the footprint, the component values, etc., should match
the manufacturer’s part number.
Now let’s check how to write the details in these sections before generating the
Gerber.
6.1.1 Page settings
We have to add the details such as the name of the board, part number and required
comments, etc. in the title block at the right bottom corner. To do that follow these
steps:
Page settings
81 www.protoexpress.com
Whatever you type in this window will appear on the right bottom corner. In the
same way, you can do the page setting in your schematic as well.
You may need to add text on your board, such as the company name. To do that,
follow these steps
• Select the silkscreen layer and select text icon > click wherever you
need to add the text.
• A window will popup.
• Add the text in the popup window and set the dimensions of the text as per
your requirements.
Now to place the logo of your company you will require a DXF file of the logo. If you
don’t have a DXF file then you can use an image of your logo, and you can find online
software that converts your image into a DXF file. You can use that as the logo for
your board. To import the file:
Browse and select your DXF file from the popup window, and set the dimensions of
the logo in the import scale option.
83 www.protoexpress.com
6.1.3 Adding dimensions
We need to mark the dimensions of the board and then we need to mark the dimen-
sions from one mounting hole to another. Also, the dimensions from the
mounting hole to the board edge. Mark the dimensions in the fab layer. To mark,
select the add dimension icon and select the fab layer.
Move your cursor to the center of the mounting hole, a circle appears when it is at
the center of the hole. Now click on that and then click on the mounting hole on the
other side and pull the dimension down.
Adding dimensions
Once all dimensions have been marked, the layout of your board in the fab drawing
is complete. Check if the orientation of your connectors and all components are as
per the datasheet.
An example of a stack-up
You need to draw the stack-up in your fab layer using the add graphics and
tool mark all the details in the stack-up using the Text tool .
The stack-up drawing should contain all the details related to the stack-up such as
the thickness of each layer and the thickness of the top and bottom solder mask.
The board details such as the total dimensions of the board, the thickness of the
board, the tolerance of the board, etc., can also be mentioned. We get all this infor-
mation from the stack-up report as we saw previously. We need to fill all this infor-
mation over here in the fab drawing again
Fab details are written on the fab layer. In the fab details, you can point out all the
required specifications and information about the board. Details include the IPC
class for the board material, the number of layers in the board, solder mask color,
etc. Next, there are pads on the board – plated through-hole pads and non-plated
through-hole pads. The pad tolerances should be mentioned as well.
There is also one more thing we need to mention in the fab drawing which is the
drill chart. A drill chart describes the number of holes in the board, the different
sizes of the holes, and whether they are plated or non-plated. It also mentions the
number of vias being used and whether they are through-hole vias, blind vias, or
buried vias along with the tolerances for all the holes.
85 www.protoexpress.com
6.1.7 Stack up details
To display the stack-up data on fab layers go to place> Add stackup table.
Stack-up table
The set of files that are required for the production of PCBs are as mentioned below:
0- Gerbers:
`- Top etch
a- Bottom etch
c. Middle layer etch
d. Top and bottom silkscreen
e. Top and bottom paste mask
f. Top and bottom solder mask
g. Top and bottom assembly
h. Fab details
i. Board outline
2. NC drill
3. Pick and place(XY)
4. IPC 356 netlist
5. PDF:
a. Top and bottom assembly
b. Fab details
c. All layers
d. Top and bottom silkscreen
e. Board outline
f. Schematic
g. Stack-up report
h. Top and bottom solder mask (optional)
i. Top and bottom paste mask (optional)
6. BOM
Copyright Sierra Circuits, Inc., 2022
86
Gerber files are a set of files that contains production information of each layer of a
PCB. Here we are using a four-layer board, so we need to create Gerber for all four
layers. The top and bottom silkscreen, top and bottom paste mask, top, and bottom
solder mask, top, and bottom assembly layer should be mentioned in the fab de-
tails. You have to create Gerber files for each layer used in your design.
Next, we need an NC-drill file. An NC drill file gives information about all the holes
required in the board. It will serve as an input to the drill machine to drill the required
holes on the board.
Pick and place files are used by the machine to identify the location of the various
components on the board using coordinates.
IPC-356 netlist files have information about the connections between various com-
ponents. Once you create your netlist make sure that it matches with your schemat-
ic netlist.
Next, we will need PDFs. Generate PDFs for top and bottom assembly, fab details,
all the layers of your board, the schematic, and a stack-up report.
Finally, we need a BOM. The BOM consists of all of the components which will be
used in our board and the manufacturer part numbers that will help the PCB manu-
facturer in identifying the components.
Now you know the files that you need to generate to manufacture your design. Let’s
check how these files are generated in KiCad.
87 www.protoexpress.com
Exporting Gerber
Once these settings are done, we are ready to plot our Gerber. Now Click Plot.
Your files will be saved in your selected folder. It will be displayed in the “Output
message” section in the above popup. Don’t close the popup!
Now we need to create the drill file. Once you complete generating the Gerber
click on Generate Drill File
• Select the Output folder where you want to save the file. Save the drill file in
a separate drill folder.
• Make sure you have selected “PTH and NPTH in single file” (recommended).
• Select the Drill units as “Inches”.
We need to create a map file as well, which gives you the dimensions of holes in
the drill chart. Click on Generate Map File for that. Save the map file in the Gerber
location. After the files are saved, you will receive a notification in the Messages box
about the saved file.
89 www.protoexpress.com
6.5 Generation of pick and place files
1. Select the Output directory where you want to save the file.
2. Under Format select ASCII. which will give you the drill locations and
selecting CSV will give you drill locations in Excel format. If you want, you
can generate both files.
4. Select Files. If you select Single file for the board, all the top and bottom com
ponents will be in a single file. To generate two different files for top and
bottom layers, select Separate files for front and back.
Once the settings are done, to generate the position file, click on the Generate
Position File.
After the files are saved, you will receive a notification in the Messages box about the
saved file.
Once you finish this step, a window will pop up in which you can choose the location
to save the file. Select the location and the file will be exported to that location.
91 www.protoexpress.com
6.7 Generation of BOM file
Generation of BOM
Here we need to follow the steps similar to the ones we used for netlist
generation.
Steps to generate PDFs are similar to the ones we used while generating
Gerber files with some changes needed in plot settings.
Generation of PDF
• Select Plot
• A window will popup:
• Select the Output directory where you want to save the file.
• Select the PDF option from the output format.
• Choose Schematic size in Page Size.
• Select the Output mode either color or black & white.
• Now click Plot All Pages.
Your PDF will be created in the selected folder. We’ll require a stack-up as well. Save
the PDF of the required stack-up along with the schematic PDFs.
93 www.protoexpress.com
6.10 Using GerbView
Now as per this document, all of the files are created. We now need to
check whether the BOM which was generated by us, was properly generated
before it goes to manufacturing. To view all your Gerber files:
Go to the Project manager of the KiCad > Tools > View Gerber Files
Gerber viewer
Now, the Gerbview screen will appear. You would need to see whether the Gerber and
the drill file generated was properly created. For that:
94
Validation of Gerber and drill files
GerbView window
You will be able to see many green dots on the screen. This tells you the locations
of all the holes and their dimensions. Let us see whether all the holes fit within our
board. For that, we need to open the edge cut layer from the Gerber.
95 www.protoexpress.com
Also, open the map file from the gerber files, so that you can view the dimensions
of the holes in your Gerbview.
You can see the green dots which are the map of drill holes. There is a blue rectangle
that covers the entire board set up which is the Edge cut layer. The drill map is dis-
played below the board.
Similarly, you can select each layer from the Gerber and can check whether all the
files for the board are following the layout design. For an overlapping view, you can
also select several layers at a time. For example, we selected the top layer of our
board as depicted in the image below:
Once your files are verified, you can send the files for manufacturing. Send the files
in a single zipped compressed file format. This will ensure that there are no errors
during the transmission of the files.
97 www.protoexpress.com
Sierra Circuits
1108 West Evelyn Avenue
Sunnyvale, CA 94086
+1 (408) 735-7137
www.protoexpress.com
98
www.protoexpress.com
Why would we write on a topic that has
been written about numerous times? What are
we trying to say that is different from what has
already been said? Through this design guide,
we make an attempt to convey the design
aspects from a manufacturing perspective and
the fine details that make a big impact - not just
the theoretical, but also the practical elements. We started offering design layout
services because, for our customers, it comes down to completing the project on
schedule and knowing that the design will work in thousands as well as in ten
piece prototypes.
The impractical design decisions made at the initial design stage will eventually
get baked into the prototype, stay through the lifecycle of the product, and
inadvertently cause quality defects and/or increase costs over the long term.
Yes, a design review can help! But how often do you see a PCB manufacturer at
the table in a design review? And it's not a one-meeting solution.
We have tried to distill the basics of what we believe every electrical engineer and
designer should perceive when it comes to high-speed PCB designing. We will
address most of the important design techniques and hope that we will be able to
impart something that you didn't know before.
Amit Bahl
Director of Sales & Marketing at Sierra Circuits
email: [email protected]