Tutorial Part 2: Schematic

Symbol Library Table Setup

The first time the schematic editor is opened, a dialog will appear asking how to configure the global symbol library table. The symbol library table tells KiCad which symbol libraries to use and where they are located. If you have installed the default libraries with KiCad, which is recommended, select the default option: Copy default global symbol library table (recommended).

If KiCad cannot find the libraries in their expected installation location, this option will be disabled. In this case, the user should choose the second option, Copy custom global symbol library table. Click the folder button at the bottom, and browse to the location given below. Select the sym-lib-table file.

The location of the default library table files depends on operating system and may vary based on installation location:

  • Windows: C:\Program Files\KiCad\6.0\share\kicad\template\

  • Linux: /usr/share/kicad/template/

  • macOS: /Applications/KiCad/KiCad.app/Contents/SharedSupport/template/

Symbol Library Table Configuration

Schematic Editor Basics

To pan around the schematic, click and drag with the middle mouse button or right mouse button. Zoom in and out with the mousewheel or F1 and F2. Laptop users may find it useful to change the mouse controls to be better suited to a touchpad; the mouse controls are configurable in PreferencesPreferences…​Mouse and Touchpad.

By default, KiCad enables a mouse setting called Center and Warp Cursor on Zoom. When this feature is enabled, the mouse cursor is automatically moved to the center of the screen when the user zooms in or out. This keeps the zoomed region centered at all times. This feature is unusual, but many users find it useful once they get used to it. Try zooming in and out with the mouse cursor in different areas of the canvas. If the default zoom behavior is uncomfortable, disable the feature in the Mouse and Touchpad preferences.

Mouse and Touchpad Preferences

The toolbar at the left side of the screen contains basic display settings. The toolbar at the right side of the screen contains tools for editing the schematic.

Most tools in KiCad either have default hotkeys assigned, or can have custom hotkeys assigned. To view all hotkeys, go to HelpList Hotkeys…​. Hotkeys can be changed in PreferencesPreferences…​Hotkeys.

Schematic Sheet Setup

Before drawing anything in the schematic, set up the schematic sheet itself. Click FilePage Settings. Give the schematic a title and date, and change the paper size if desired.

Schematic Page Settings

Adding Symbols to the Schematic

Start making the circuit by adding some symbols to the schematic. Open the Choose Symbol dialog by clicking the Add a Symbol button add symbol to schematic 24 on the right side of the window or pressing A.

This action will trigger the Footprint Library Table Setup dialog. This dialog is equivalent to the Symbol Library Table Setup dialog explained earlier, but for footprints instead of symbols.

Again, select the default option: Copy default global footprint library table (recommended). If this is option is disabled, select the second option, Copy custom global footprint library table. Click the folder button at the bottom, and browse to the location given in the symbol library table setup instructions. Select the fp-lib-table file and click OK.

The Choose Symbol dialog lists the available symbol libraries and the component symbols contained within them. Basic devices like passive components, diodes, and other generic symbols are found in the Device library. Specific devices, such as a particular LED, may be found in other libraries.

Scroll down to the Device library, expand it, and select the LED symbol. Click OK, and click again to place the symbol in the schematic.

LED Symbol in Choose Symbol Dialog

Next, add a current-limiting resistor. Go back to the symbol chooser, but this time try searching for a resistor by entering R in the filter box at the top. Again, it is found in the Device library. The R device is an IEC-style rectangular resistor symbol. An R_US symbol is also available for users who prefer the ANSI-style zigzag symbol. Select a resistor symbol and add it to the schematic.

Finally, add a battery to power the LED. The Device library has a suitable Battery_Cell symbol.

Schematic with Symbols Placed

Selecting and Moving Objects

Next, position the symbols correctly relative to each other, as shown in the screenshot. Do this by selecting, moving, and rotating the symbols.

Schematic with Symbols Moved and Rotated

In KiCad 6.0, objects are selected by clicking on them. Additional objects can be added to the selection with Shift+click, or removed with Ctrl+Shift+click (MacOS: Cmd+Shift+click).

Drag selection is also possible; dragging from left-to-right selects objects that are entirely enclosed by the selection box, while dragging right-to-left also selects objects that are partially enclosed by the selection box. Shift and Ctrl+Shift/Cmd+Shift can also be used with drag selection to add or subtract from the selection, respectively.

Note that it is possible to select an entire symbol (by clicking on the symbol shape itself) or to select one text field in the symbol without selecting the rest of the symbol (by clicking the text). When just a text field is selected, any actions performed will act only on the selected text and not on the rest of the symbol.

Selected objects are moved by pressing M and rotated by pressing R. The G hotkey (drag) can also be used to move objects. For moving unconnected symbols, G and M behave identically, but for symbols with wires attached, G moves the symbol and keeps the wires attached, while M moves the symbol and leaves the wires behind. Selected objects can be deleted with the Del key.

Some users may prefer to automatically select the object under the cursor when pressing M, G, R, and other hotkeys that act on a selected symbol. To enable this behavior, deselect PreferencesPreferences…​CommonEditingFirst hotkey selects tool.

Wiring the Schematic

The symbol pins all have small circles on them, indicating that they are not connected. Fix that by drawing wires between symbol pins as shown in the screenshot. Click the Add a Wire button add line 24 on the right-hand toolbar or use the W hotkey. Click to start drawing a wire, and finish drawing the wire by clicking on a symbol pin or double clicking anywhere. Pressing Escape will cancel drawing the wire.

Another convenient method of drawing wires is to hover over an unconnected pin. The mouse cursor will change to indicate that a wire can be drawn starting from that location. Clicking on the pin will then begin drawing a wire automatically.

Schematic with Nets Wired

Next, add power and ground symbols to the schematic. While not strictly necessary in such a simple schematic, these make it easier to understand large schematics.

A number of power and ground symbols are available in the Power symbol library. However, there is a shortcut for adding these symbols: click the Add a Power Port button add power 24 or use the P hotkey. This brings up the Choose a Symbol dialog, but only displays symbol libraries that contain power port symbols.

Add a VCC symbol and GND symbol and then connect them to the circuit with wires.

Finally, add a label to the wire between the LED and resistor. Again, this may not be necessary in a simple circuit, but it is good practice to label important nets. Click the Net Label button add label 24 in the right toolbar (L), type a label name (led), and place the label into the schematic so that the square attachment point overlaps with the wire. Rotate and align the label as necessary.

Schematic with Nets Labeled

Note that labels and power ports with the same name are connected together. Another GND power port or wire labeled led on this schematic page would be shorted to the existing one, even without wires visually connecting them.

Annotation, Symbol Properties, and Footprints

Annotation

Each symbol needs a unique reference designator assigned to it. This process is also known as annotation. Click the Fill in schematic reference designators button annotate 24 in the top toolbar. There are some options available, but the defaults are fine. Click Annotate and then Close. The symbols are now annotated with reference designators R1, D1, and BT1.

Symbol Properties

Next, fill in values for each component. Select the LED, right-click, and select Properties…​ (E). This project will use a red LED, so change the Value field to be red. In a real project, it might be better to write the LED manufacturer’s part number here instead. Note that it’s possible to edit reference designators individually in each symbol’s properties.

This project will use a 3V lithium coin cell battery, so change the Value field of BT1 to 3V. Change the resistor’s value to 1k.

Footprint Assignment

Finally, assign a footprint to each component. This defines how each component will attach to the PCB. Some symbols come with footprints pre-assigned, but for many components there are multiple possible footprints, so the user needs to select the appropriate one.

There are several ways to assign footprints, but one convenient way is to use the footprint assignment tool by clicking the button icon cvpcb 24 24 in the top toolbar.

The left pane of this window lists the available footprint libraries. The middle pane shows the symbols in the schematic. All of these symbols will get footprints assigned to them. The right pane shows the footprints that can be chosen for the symbol selected in the middle pane. Footprints can be viewed by right-clicking a footprint and selecting View selected footprint.

Assign Footprint Tool

Many footprints are included with KiCad, so the footprint assignment tool offers several ways to filter out footprints that aren’t relevant to the symbol in question.

Footprint Filter Buttons

  • The leftmost button module filtered list 24 activates filters that can be defined in each symbol. For example, an opamp symbol might define filters that show only SOIC and DIP footprints. Sometimes those predefined filters are missing or too restrictive, so it can be useful to turn this filter off in some situations.

  • The middle button module pin filtered list 24 filters by pin count, so that only 8-pad footprints are shown for 8-pin symbols. This filter is almost always useful.

  • The right button module library list 24 filters by selected library. Libraries are selected in the left pane; footprints not in the selected library will be filtered out. This filter is useful as long as it is known which library contains the right footprint. Often it’s best to use this filter or the symbol filters, but not both.

  • The text box filters out footprints that don’t match the text in the box. This filter is disabled when the box is empty.

Using the filters, find and assign the footprints shown in the screenshot above. Click OK.

There are other ways to assign footprints; one way is through the symbol properties window. For more information on assigning footprints, see the manual.

Electrical Rules Check

The last remaining thing to do in the schematic is to check for electrical errors. KiCad’s Electrical Rules Checker (ERC) cannot make sure that the design in the schematic will work, but it can check for some common connection issues such as unconnected pins, two power outputs shorted together, or a power input that isn’t powered by anything. It also checks for some other mistakes like symbols that aren’t annotated and typos in net labels. To see the full list of electrical rules and to adjust their severity, go to Schematic SetupElectrical RulesViolation Severity. It is a good idea to run ERC before starting layout.

Run an electrical rules check by clicking the ERC button erc 24 in the top toolbar and then clicking Run ERC.

Even in this simple schematic, KiCad has found two potential errors. The errors are listed in the ERC window, and arrows point to the violation locations in the schematic. Selecting a violation in the ERC window highlights the corresponding arrow.

ERC Violation Messages

Violations can be ignored (for the current ERC run) or excluded (from all future ERC runs) by right clicking on each error message. However, it’s usually worth addressing the violations, even if they aren’t actual design errors, in order to get a clean ERC report and avoid missing real problems.

In this case, KiCad reports “Input Power pin not driven by any Output Power pins” for both the VCC and GND nets. This is a common KiCad ERC error. Power port symbols are set up to require a power output pin, such as the output of a voltage regulator, on the same net; otherwise KiCad thinks the net is undriven. To a human, it is obvious that VCC and GND are driven by the battery, but it’s necessary to explicitly show that in the schematic.

PWR_FLAG Added to Schematic

There is a special PWR_FLAG symbol in the Power symbol library that is used to solve this problem by telling KiCad that the nets are actually driven. Add this symbol to the VCC and GND nets and re-run ERC. When ERC passes without any violations, the schematic is complete.

Bill of Materials

A final optional step is to generate a Bill of Materials listing all components used in the project. Click ToolsGenerate BOM…​.

BOM Dialog

KiCad 6 uses Python scripts to generate BOMs. Two BOM scripts are included, and users can create their own scripts to generate BOMs in whatever format is desired.

Select the bom_csv_grouped_by_value_with_fp script, and click generate. A CSV file containing BOM information is created in the project directory. The BOM generator also generates an intermediate XML file, which can be safely deleted.

Generated BOM