$EndLIBRARY
to the end of some/most/all of these files to prevent a parsing error.Table of Contents
KiCad Schematic Symbol Management
The stuff here was written for versions of KiCad preceding 4.0. The latest versions of KiCad have introduced new library management features, rendering some of what follows obsolete.
Symbols, components, libraries
KiCad places schematic symbols into component libraries. Component libraries use the .lib
extension. One .lib
file typically contains definitions for several (usually related) components.
KiCad uses the term “component” to mean “schematic symbol.”
There are two kinds of libraries in KiCad: component libraries (i.e., schematic symbol libraries), which are stored in .lib
files, and footprint libraries, which are stored in .mod
files. Our concern here is with component libraries.
A component is a schematic symbol that can represent a generic electronic part (e.g., and NPN transistor), a specific electronic part (e.g., a 2N2222 transistor or a Cirrus CS8414 IC), or a power port.
System component libraries
KiCad ships with a large set of predefined component libraries. The locations of these component libraries will depend on your operating system, but they are typically installed in a system level (rather than user level) subdirectory. Eeschema by default is configured to let you use these system component libraries automatically. You can also (and often need to) supplement the system component libraries with third-party and user libraries.
Third-party component libraries
Third-party KiCad component libraries are available from many sources.1) They are often provided at no cost (i.e., gratis) but may or may not have limitations on usage (i.e., they may or may not be fully libre). You should always confirm that your intended use is consistent with the creator's licensing.
Adding a third-party component library to a project
To use a third-party component library in your project, you must first make the library available to the project.2) The procedure is as follows:
- Place the
.lib
file in a location that makes sense.3) - Open your project.
- Inside Eeschema, select Preferences → Library.
- Use the top part of the resulting dialog to Add or Insert the additional
.lib
file you wish to use in the project. - Click “Ok”.
- You will be prompted to apply the changes to the current project's
.pro
file or to select another project's.pro
file. Go with the default—the current project's.pro
file.
You should now be able to access the third-party library's components in Eeschema.
Adding individual third-party components to system and third-party libraries
You should add new components only to user component libraries. See User component libraries below.
Even though you can import components into system and third-party libraries, you are strongly advised against making any changes to system and third-party libraries.
This is because when you update KiCad, there is a good chance that the system libraries will be overwritten, and you will lose any changes you have made to them. Similarly, if you download an update to a third-party library, you will lose the changes you have made to that library
User component libraries
While components contained in predefined system and third-party component libraries will be enough to create many designs, at some point you will almost certainly need to create a new component or edit an existing one.
For creating new components and for making changes to components in system or third-party component libraries, it is highly recommended that you use only libraries you have created yourself—what we will call user libraries. In other words, you should create new components only in user libraries, and components in system and third-party libraries that you wish to change should first be copied to a user library and edited there.
Even though you can create/add/edit components in system and third-party libraries, you are strongly advised against making any changes to system and third-party libraries.
This is because when you update KiCad, there is a good chance that the system libraries will be overwritten, and you will lose any changes you have made to them. Similarly, if you download an update to a third-party library, you will lose the changes you have made to that library.
The Component Library Editor
Component library maintenance and the creation and editing of footprints is done with KiCad's Component Library Editor. To open the Component Library Editor:
- Open a project and open Eeschema.
- Click the Library editor icon in the top toolbar.
Managing symbols and libraries
Managing symbols and libraries uses concepts that are essentially identical to managing footprints and footprint libraries. Therefore this will not be treated in depth here.
Cautions
When creating and editing symbols, you should keep the following in mind the following.
Pin numbering
There will be a one-one correspondence between the pin numbers of the symbol and the footprint with which it is associated.
Electrical type of pins
You need to set the electrical type of pins appropriately because Eeschema uses the pin's electrical type in its electrical rule check (ERC). Your initial temptation may be to make all pins “Passive” as this will result in the least restrictive ERC conditions (i.e., it makes it easiest for the pin to pass the ERC). However, mastering the meaning of the different pin electrical types and their relation to ERC can help you to create more error-resistant designs.
Hidden pins and automatic connections
Power pins that are marked as hidden (i.e., the Visible property is unchecked) will automatically connect to nets with that name in the schematic:
Eeschema automatically connects invisible power pins of the same name to the power net of that name.4)
This is a tradition dating back to the early days of EDA and one that today is mired in controversy.
Our preference is to avoid this kind of automatic connectivity. While it has its advantages (e.g., it makes circuits, especially logic circuits, appear cleaner), because modern designs frequently use a number of power supply rails and grounds as well as power supply bypass and treatment schemes, it can create schematics that are confusing at best and impossible to draw at worst.
To avoid the “auto-connect” side effect of invisible pins in your parts, make all the part's pins visible.
Multipart components
Often a single physical package will contain multiple, identical functional parts. A typical example is the 7400 IC—which contains four identical two-input NAND gates. Eeschema lets you define such parts as individual symbols and then quasi-magically group them into sets of four that make up the actual part. This is an advanced topic and will not be treated further here.
Additional resources
KICAD part generators
Creating packages with many pins in KiCad's Library Editor is a tedious and error-prone task. Much of the tedium and potential for error can be eliminated by using the online KICAD quicklib gen application, the offline KiPart application, and (no doubt) similar tools. You should use KiCad's Library Editor to check that files made with KICAD quicklib gen are as you expect and to make any needed adjustments that are not possible from within KICAD quicklib gen.
An Internet search should reveal other solutions if neither of the above is suited to your needs or they become unavailable.
Copyright ©2011-2016 Mithat Konar. All rights reserved.