HOPE: KiCad Schematics

For the first few classes, the focus will be on becoming familiar with HOPE's PCB tool of choice: KiCad. You can download the latest version of KiCad at their website: https://kicad.org/


Starting KiCad, you should be greeted with the main Project Manager window:


KiCad project manager

This window serves as the hub for the files and tools you need for any ECAD project in KiCad. When first started, the left side pane and main body of the window would be blank, as in the image above.

The left side pane serves as the project tree view. KiCad projects are maintained as a folder directory, and the active project's directory is shown in this side pane. PCB files can be opened in their respective KiCad sub-programs through this side pane with a double-click.

The row of large icons is Utility launch pane. KiCad is actually a collection of "independent" programs that make up the features of an entire PCB ECAD. The programs are:

1

Eeschema

Schematic editor.

2

LibEdit

Component editor and component library manager.

3

Pcbnew

Board layout editor.

4

FootprintEditor

Footprint editor and footprint library manager.

5

Gerbview

Gerber file viewer. It can also display drill files.

6

Bitmap2component

Tool to build a footprint or a component from a B&W bitmap image to create logos.

7

Pcb Calculator

Tool to calculate track widths, and many other things.

8

Pl Editor

Page layout editor, to create/customize frame references.

Most of your time spent when developing a PCB will be in the schematic and board layout editors. These program names also are not too important.

The top toolbar consists of standard New/Open/Save buttons:


top toolbar buttons

Their functions, in left to right order:

  • New Project
  • New Project from Template
  • Open Project
  • Zip Up Project Directory
  • Unzip Project Files from a .zip
  • Refresh project tree

These functions can also be accessed through the standard program part at the top (File -> New, etc.)

Creating a new project creates both a new schematic file and board layout file in your project tree, with the same name that you chose for your project.


project tree

Note that on your actual computer, there will be a folder with the project name where you saved your project, with both .sch and .kicad_pcb files, and the additional .pro file, inside. This is the only discrepancy between the file structure shown in project tree in the project manager and your actual file system.

EECSCHEMA Schematics

When you first start Eeschema, KiCad's schematic editor, you may encouter this dialog box:


Configure Global Symbol Library Table Dialog Box

Use the default option (Copy default global symbol library table) and continue. If this is not avaliable as an option, this means the default global symbol library table was not installed with KiCad, which is known to occur during some Mac installations. If this is the case, you may need to download the library from the KiCad website and select it with the second option.

This is the main window of Eeschema:


Eeschema

The basic concept of using this program (or any other PCB ECAD schematic editor) is simple: take your hand-drawn schematics of your circuit (aka your circuit diagram) and recreate it. If you have used some kind of digital schematic editor before, such as the one in LTSpice, this should feel somewhat familiar.


Schematic Basics

Schematics are meant to be diagrams of an electrical circuit that are:

  • Human Readable
    • Neat - focus on visual clarity
    • Consistent
      • Component representation
      • Connectivity representation
  • Provide Accurate Circuit Description
    • Show all components
    • Express full connectivity
    • Contain additional information to assist the physical layout

A blueprint is a good analogy. Without a good, clear, and thorough blueprint, the building the blueprint is for will likely be built inadequately, or even worse, not work at all.


We assume that you are used to working with electrical components and schematics already, and understand the abstracted swiggly line in a schematic as a physical resistor. In making PCBs we use the following three terms to differentiate which "version" of an electrical component we are talking about:

  • (part) symbol belongs on the schematic
  • footprint belongs in the board layout (we will go over this later)
  • component/part refers to it as the physical object

ECAD Schematic Core ideas:

  1. Everything is built on a grid: Like many other drawing programs, Eeschema is built on a grid. Everything in the schematic, from the electrical/part symbols to the wires and even text notes adhere to the grid. You can change the grid size, the grid units, and the grid visibility if you wish, but since connections between components must also be drawn on the grid, it is better to leave the grid size and units settings alone.
  2. Electrical Components are represented by abstract Part Symbols: This is a concept you should be familiar with, but when working with PCBs, there is an additional, important feature: most symbols represent real parts, which are often abstracted in symbol form as boxes with pins.
  3. Symbol Pins are special: the pins in a symbol are stuck to it and have special properties compared to the connecting wire in the schematic editor. Real components often have constraints on their pins, and such general descriptions of pins can be set in the part symbol. KiCad uses these special pin properties to detect any potential bad connections in your schematic when your run the Electric Design Rules Checker.
  4. Symbols are found in Symbol Libaries: By default, KiCad allows you only to place parts from its global symbol library table. This is a list of collections ("libraries") of part symbols, with each library organized such that all the parts in it are related to each other in some way, such as all capacitors, or all from a certain company. Users such as yourself can create your own symbol libraries, and designate them to be either part of the global symbol library table (accessable in any of your projects) or project symbol library table (accessable in only the current project).
  5. Computer understands schematic as a netlist: A netlist is essentially a textfile listing which component is connected to each other. Specifically, it is a list of nets, which are the connection between any set of component pins.

Just like how the wires in schematics can be whatever shape and still mean the same connections, the netlist is like the ultimate minimization of that idea. The reason for this is because all the connection in a schematic implies is that these component pins are connected together, but in no way specifies how they should be connected physically. The art of PCB layout is figuring out that part.


example of a net in a netlist

Making Schematics

This lesson will go through the basic schematic creation process, and thus will not cover every single aspect of Eeschema in detail. KiCad comes with a comprehensive wiki-style manual which we highly recommend that you reference should you be confused with program specifics. You can pull up the manual for any of KiCad's program through the "Help" menu in the Top menu bar:


locating the manual

Left Click

General selection

Right click

Pop-up menu

Middle-click

Pan

Scroll Wheel

Zoom In/Out

basics

As with any other schematic, you start with placing down some components. You can switch to "Place Symbol" by finding the following icon in the top menu bar or right side bar:


place symbol icon

Click anywhere in the place space of the schematic pane while the "Place Symbol" tool is enabled to open up the "Choose Symbol" window to select which part to put down. Any symbol in a library associated with the current project will be selectable. You can search for the part symbol you want with the filter bar. Recently used symbols will conveniently show up at the top.


choose symbol window

After selecting a symbol you will be able to place it down in your schematic.

Fun search tidbit: this search-bar supports Regular Expressions and wildcards!

An important part of any schematic are power port symbols, such as supply power and system ground. KiCad treats these as special symbols and has its own special tool to access just the "power" library.


place power symbol icon

Once your symbols have made their way into your schematic, you will need to connect them. Switch to the "Place Wire" tool by finding the following icon in the top menu bar or right side bar (note that the blue stick is a different tool!):


place wire icon

With the tool selected, click anywhere to start placing a wire. While wire-placing is active, you can click again to make a junction, allowing you to change the direction of the wire. Connect the wire to a symbol pin, or double-click in an empty space, to terminate the wire. You can cancel the wire placement by hitting the "esc" key or through the right-click menu.


routing

By default, wire movement is restricted to straight lines and right-angle turns. This is to keep your schematic neat, but there is an option to disable this: can you find where it is?

As with any tool program, hotkeys (or "shortcuts") exist to speed-up your workflow. You can open up the hotkey list for any KiCad program through the "Help" menu or with Ctrl+F1. We recommend getting used to using shortcuts, it will considerably speed up your design process.

In addition to wires, you can also directly add a component pin to a net with a net label. You are probably familiar with how you can use the ground symbol to show that two different parts of your schematic are connected together via ground, and this is the exact same idea, but more generalized.


place net label icon

Net labels are very useful for keeping your schematic neat and readable, and are also used to name nets. It'll become more obvious why this is useful later, but for now you can ponder why a net named "servo1_ouput" may be better than a autogenerated name like "Net-(C2-Pad1)".


net label usage example

manipulation

Sometimes a symbol has to be moved or rotated, or wires re-organized. Selection is done with click-and-drag, and all manipulation options can be found in the right-click menu. Double-clicking on editable object (such as symbols) will bring up their properties.

KiCad also works by hover selection; that is, when using shortcuts, the object under your mouse cursor is your active object. In tandem with keyboard shortcuts, this allows for fast single object editing.

The following is a short list of helpful keyboard shortcuts for manipulation of either selected block or singular schematic objects:

Edit Item

E

Delete Item

Del

Rotate Item Counter-Clockwise

R

Drag Item

G

Mirror X

X

Mirror Y

Y

Move Schematic Item

M

Duplicate Symbol or Label

C

Drag wire (wire-like objects only)

G


manipulating a symbol

Moving around existing wires in Eeschema is somewhat non-intuitive, and the wires do not stay perpendicular/horizontal in dragged in certain ways. You will have to add breakpoints, or junctions, in the wire manually.


adjusting a wire

In both KiCad's schematic editor and board layout editor, your cursor will actually snap to the grid. This can sometimes make selecting things precisely difficult. In cases when your selection might be ambiguous, KiCad will prompt you with a dialog such as this:


clarify selection pop-up

annotation

Now your schematic has really taken shape, but all your symbols have unfilled part designators. These are short names to help both KiCad, and you the designer, and possibily anyone else working with your PCB, identify the components. The letter helps identify generally what kind of component it is, and the number is just a numerical identifier. (It is a bit easier asking for "What is Resistor 4?" than "What is component 17?")

You can find many lists of letter references online, such as this one.

KiCad takes care of the designator letter, as these letters are stored in the library data of the symbol. However, the number is determined per-project, and thus completing the rest of the part designator is the job of the PCB designer. Luckily, KiCad has a "Annotate Schematic" function to auto-magically do this for you, changing those R? into R2's and R3's. You can find this tool with it's icon:


annotate schematic tool icon

The Annotate Schematic tool assigns numbers based on symbol location in the schematic, and there are some options to change which order the number goes in. Play around with symbol placement and the sort direction to see what happens.

erc

Like most other PCB eCAD, KiCad has Electrical Rule Check functionality, albeit very primitive. Straight from the Eeschema manual:

The ERC checks for any errors in your sheet, such as unconnected pins, unconnected hierarchical symbols, shorted outputs, etc. Naturally, an automatic check is not infallible, and the software that makes it possible to detect all design errors is not yet 100% complete. Such a check is very useful, because it allows you to detect many oversights and small errors.

How it does this is through the pins of the symbols. These pins can, for example, specify they are output or input, power or bidirectional. If two incompatible pins are connected (i.e. two outputs are connected to the same net) or if a symbol's pin is left unconnected, the ERC will catch this and report an error. ERC errors will prevent you from moving on to layout, so learn to work with them. A problem in your schematic will also mean problems in your manufactured board.


ERC tool icon

The point of the ERC is to prevent oversight of simple mistakes in your schematic. ERC cannot tell you whether your circuit will work, that is your job as an engineer.

Conclusion

This was just a short introduction to how to use KiCad's Eeschema schematic tool. We highly suggest you look around in the official manual for more on its features, or ask an instructor if you have questions.