In this tutorial, we will cover schematic design in KiCad. We will also discuss high-speed PCB design with the identification of differential pairs and the marking of high-current traces.
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.
How to create a schematic design in KiCad
We will demonstrate how to create a simple schematic design in KiCad and we will talk about the factors we need to consider when doing a schematic design for a high-speed design. Let’s start with the schematic part.
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 LED project. Click Save.
Go to file > Click new project > Choose a location to save your project and name it > Click save (In this demo, we will name it LED project.)
Now you can see, 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.
How to place components on a schematic
For this tutorial, 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 into 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
You can choose your components from the library. Here we need a battery, resistor, capacitor and an LED.
Search for a battery among the components. We will select a single-cell battery for this tutorial. 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.
How to create a new library
We have selected components which are already available in the library. All the components we require may not be in the built-in library, for example, a regulator.
Since we require a regulator, we will create it here
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
Here we will name the library as an LED project.
Watch our tutorial on how to create a symbol library in KiCad.
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 own 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 registered datasheet by the manufacturer.
In this case, there are four different packages. These packages depend on the Manufacturer 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.
How to add pins to symbols
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 50 mils. 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 Rectangle 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.
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.
For this tutorial, we have created four pins for the regulator. Once the pins are created, save it 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.
Now you can see the LM7805 device inside the LED project. Select it, click Ok and place it on your schematic. Import all the symbols required to proceed. You can then place these components properly and make the connections.
How to connect symbols in KiCad
In order to wire the components first arrange these components properly, then
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
When you are done, right click and choose 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.
You now need to connect a ground terminal.
Click the Ground option on the right hand side toolbar > click on the screen. A window will pop up.
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.
How to annotate symbols
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 schematic and Keep existing annotations > select Annotate
Now you can see that the question mark has turned into a number. The tool automatically 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.
How to generate a BOM in KiCad
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 material, components, assemblies and subassemblies and other items needed for product manufacturing
To create BOM of your design,
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 this extra .xls 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.
How to create a High-Speed schematic design in KiCad
Now we will explain how to create a high-speed schematic design. For that in this tutorial, we are using a circuit we previously created.
This is the schematic design of a microcontroller that is interfacing with an FTDI chip and a USB version 2.0. USB 2.0 is basically a high-speed signal, so it normally operates from 12 Megahertz to 240 Megahertz14. For such cases, you need to be careful when designing the layout.
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 A 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.
Impedance and Differential Pairs in KiCad
Let’s move onto another example.
This sheet has the FTDI chip which converts the input serial signal into a USB differential signal. The other yellow rectangle is the USB connector. Here, we are using a USB 2.0 which can operate from 12 megahertz to around 240 megahertz. You could also use a USB 3.0 which can operate up to 5 gigahertz.
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 of 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 defined 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 thickness of the track.
There is also crosstalk, which is nothing but interference on one line due to another trace which 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 impedance calculators.
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.
And there is a power track which operates at 500 milliamps. 500 milliamps is considered high for a USB. We normally put less power, less current. And this is how you get started on your high-speed schematic design in KiCad.
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 annotation components, and creating BOM for a design. Finally, we have gone through two high-speed schematic design examples.
Hope this tutorial was helpful and now you can create your own schematic design.
Also, read more KiCAD tutorials:
DOWNLOAD OUR DFM HANDBOOK: