HOPE: KiCad Schematics

For the first few classes, the focus will be on becoming familiar with HOPE's PCB tool of choice: KiCad. Follow instructions in the Lecture 1 slides to download KiCad 6.


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


KiCad Project Manager Window

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 "Project Files" 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 a list of tools that make up KiCad. KiCad can be thought of as a collection of "independent" programs that make up the features of an entire PCB ECAD. The programs are:

1

Schematic Editor

(Eescheema)

For creating and editing schematics. Most PCB designs start here.

Note: This program was awkwardly called 'Eescheema' in KiCad 5.1 and earlier, so you may still see the Schematic Editor refered to as such in online resources.

2

Symbol Editor

Symbol editor and symbol library manager. Often used to make and manage custom symbols that aren't found in KiCad's default symbol library.

3

PCB Editor

(PCBNew)

Board layout editor. You will likely be spending most of your time in this editor.

Note: This program was awkwardly called 'PcbNew' in KiCad 5.1 and earlier, so you may still see the PCB Editor refered to as such in online resources.

4

Footprint Editor

Footprint editor and footprint library manager. Often used to make and manage custom footprints that aren't found in KiCad's default footprint library.

5

Gerber Viewer

Gerber and drill file viewer. Gerber and drill files are the files sent to manufacturers to produce your PCBs.

6

Image Converter

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

7

Calculator Tools

Tool to calculate track widths, and many other things.

8

Drawing Sheet Editor

Schematic drawing sheet and border editor. Used to edit the page layout and format (ie. page size, borders) of your schematics.

Most of your time spent when developing a PCB will be in the Schematic Editor and PCB Editor.

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


KiCad Project Window Toolbar

Their functions, from top to bottom:

  • New Project
  • Open Project
  • Zip Up Project Directory
  • Unzip Project Files from a .zip
  • Refresh project tree
  • Reveal project files in Explorer/Finder

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.


KiCad Project Directory Example

Note that on your actual computer, there will be a folder with the project name where you saved your project, with  .kicad_pro , .kicad_sch , and .kicad_pcb files inside.

Schematic Editor

When you first start Schematic Editor, you may encounter this dialog box:


KiCad Configure Global Symbol Library Window

Use the default option (Copy default global symbol library table) and continue. If this is not available 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, ask an instructor for assistance.

This is the main window of Schematic Editor:


KiCad Schematic Editor

The basic concept of using this program (or any other PCB ECAD schematic editor) is simple: take your hand-drawn diagram of your circuit 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.

While search up help for the Schematic Editor in KiCad, you may find it occasionally referenced as 'Eeschema'. This was the original name for the schematic editor sub-program of KiCad, before the decision was made in KiCad 6 to just called it 'Schematic Editor'.

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 "form" of an electrical component we are talking about:

  • (part) symbol belongs on the schematic
  • footprint belongs in the board layout
  • 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, Schematic Editor 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 Schematic Editor 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 (online) 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

Useful tip:  Hover over any icon in the toolbar to see a pop-up describing what each icon does.

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 schematic while the "Place Symbol" tool is enabled to open up the "Choose Symbol" window. 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.


KiCad Symbol Selection 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. (These symbols are also in the regular 'Choose Symbol' menu above.)


place power symbol icon

Once you've place your symbols on the schematic, you will need to connect them with wires. Switch to the "Place Wire" tool by finding the following icon in the right side bar. The icon on your system may look like the one below, or it may look like a green stick. (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. KiCad treats multiple wires and pins that has the same label as all electrically connected together, without needing a wire actually connecting all of the section. The power symbols are basically a special type of 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_output" may be better than a auto-generated name like "Net-(C2-Pad1)".


net label usage example

Manipulation

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

In addition to selecting objects with a click, KiCad can also work by hover selection; that is, when using shortcuts, the object under your mouse cursor is your active object. This allows for fast single object editing. Please note that if an object is selected, it will always be the active object, whereas if there is no object selected, then the active object is whatever is under your mouse cursor.

The following is a short list of helpful keyboard shortcuts for manipulation of 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

Copy Objects

Ctrl+C (Cmd+C)

Paste Objects

Ctrl+V (Cmd+V)

Drag wire (wire-like objects only)

G


manipulating a symbol

Dragging existing wires with 'G' in the Schematic Editor is somewhat non-intuitive, and the wires do not stay perpendicular/horizontal when 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 Schematic Editor (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 or whether or not you are using a component correctly, that is your job as an engineer.

Conclusion

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