2021 May 10

Acoptex.Com

Arduino and Raspberry Pi projects

Basics project 135n Creating custom symbol and custom symbol library in KiCad v5


SHARE

Basics: Project 135n

Project name:  Creating custom symbol and custom symbol library in KiCad v5

Tags: KiCad, KiCad v5, creating new symbol, creating custom symbol, creating new library, creating custom symbol library

Attachments: none

General

We will learn how to create custom symbol and custom symbol library in KiCad v5.

KiCad has a separate library for schematic symbols and footprints. The only place that a linkage between these libraries occurs – your project. In the Schematic Layout Editor, you can define a footprint to associate with a schematic symbol, or component.

What is Symbol Library?

A symbol library consists of three files with extensions .dcm, .lib, and .bck. KiCad creates the .bck automatically. In case you make unintended changes to your library file, you can roll-back to the previous version. The .dcm file contains metadata for the library’s symbols. The .lib file contains all of the schematic symbols as a “library”. By the way, the file format is plain text, so you can quickly view or edit it. Within your project folder, KiCad creates a file called “-cache.lib.” It keeps all of the symbols used in a schematic. With this file, any PC can open the schematic. The KiCad schematic symbol library and the cache is a single file.

Creating new symbol and library in KiCad v5
Creating new symbol and library in KiCad v5

What is footprint library?

Footprints are text files that have a .mod_kicad extension. A directory of these files makes up a Footprint library. The directory name has the .pretty extension. If you see KiCad files with the .mod extension, those are legacy footprints. Since there is one footprint per file, it is possible to have multiple footprints for the same component. There is no native linkage between a schematic symbol and a footprint in KiCad. The schematic (or circuit board) design makes that link. To create your own library of parts, you need to create two libraries: one for schematics and one for footprints. KiCad has a big library of standard footprints that are easy to match up to a custom symbol.

Step by Step instruction

1.Creating a new custom symbol library

  1. But before creating a symbol we need to create a new KiCad library. We assume that you have the KiCad v5 already installed. Double-click on the KiCad shortcut to start the program.
shortcut KiCad

2. You will see KiCad project manager window opened. Go to Tools -> Edit Schematic Symbols or press Ctrl+L on your keyboard of click on Symbol Editor button.

how to create new symbol and new library in KiCad v5

3. Go to File -> New Library… Creating your library keeps your custom symbols in one place. These can be symbols you create or download.

how to create new symbol and new library in KiCad v5

4. Navigate to the folder where you would like to save your library, give it a name and click on Save button.

how to create new symbol and new library in KiCad v5

5.The Add to Library Table window pops up. You have two options: Global or Project to choose from and you need to tell KiCad if you want to keep this library specific to the current project or if you want it available globally. Global means that all projects can access it and this library will be added in the predefined libraries which already exist in KiCad. Select Global and click on OK button.

how to create new symbol and new library in KiCad v5

6. The library My_library.lib is created. Please note that if you already created a schematic library file, you can go to File -> Add Library and then select Global or Project.

how to create new symbol and new library in KiCad v5

2.Creating a new symbol

  1. Go to File -> New Symbol… or press Ctrl+N on your keyboard or click on Create new symbol icon.
how to create new symbol and new library in KiCad v5
how to create new symbol and new library in KiCad v5

2. Select My_library and click on OK button.

how to create new symbol and new library in KiCad v5

3. You will be asked for a symbol name (this name is used as default value for the value field in the schematic editor), the reference designator (U, IC, R…​), the number of units per package (for example a 7400 is made of 4 units per package) and if an alternate body style (sometimes referred to as DeMorgan) is desired. If the reference designator field is left empty, it will default to “U”. These properties can be changed later, but it is preferable to set them correctly at the creation of the symbol. Let’s name our symbol BMP180, leave the reference as U and click on OK button.

how to create new symbol and new library in KiCad v5

4. You can now see BMP180, which is the name of your symbol, and U, which is the reference designator. Make sure the name and reference designator are in an appropriate place. You can put the reference designator at the upper-left hand corner and the name field at the lower-right hand or use your way to do it. Right-click on the screen, you will see an option called Grid. It’s best to keep it to 50.00 mils.

how to create new symbol and new library in KiCad v5

5. Click on Add graphic rectangle to symbol body icon and draw a rectangle.

how to create new symbol and new library in KiCad v5
how to create new symbol and new library in KiCad v5

6. Let’s fill in the background of this rectangle. There are two different ways to do that:

  • Place your cursor on the rectangle line, then right-click with mouse on it. Select Edit Rectangle Options. The Rectangle Drawing Properties window pops up. Select Fill with body background color setting and click on OK button.
  • Place your cursor on the rectangle line, then press E on your keyboard. The Rectangle Drawing Properties window pops up. Select Fill with body background color setting and click on OK button.
how to create new symbol and new library in KiCad v5
how to create new symbol and new library in KiCad v5
how to create new symbol and new library in KiCad v5

7. Let’s place the pins. Click on Add pins to symbol icon. Place the cursor where you want to create the pin and click with mouse. The Pin Properties window pops up. KiCad gives you many attributes to describe a pin, but there are main requirements: a pin name, a pin number and a pin orientation. The name should be descriptive. If you use the tilde (~) character, KiCad adds a bar above the name. This mark is useful for inverted or active-low signals. If your symbol has multiple package styles, you need to create a different symbol for each style to match up the pins’ numbers. The orientation lets you place pins on all of the sides of a symbol. After exiting the Pin Properties window, if you need to change the pin’s orientation, use the R on your keyboard. One optional element is the pin’s function. You can define the function as input, output, power, and several others. This extra information is used when running the Electrical Rule Check (ERC). It tries to detect schematics with short circuits.

how to create new symbol and new library in KiCad v5
how to create new symbol and new library in KiCad v5

6. As we are trying to make BMP180 symbol we need 4 or 5 pins, the BMP180 we will use has 5 pins because of 3.3V converter. Set the pin name, number, electrical type, graphical type, orientation and click on OK button. Repeat the same action for other pins. Once the pins are placed, right-click with your mouse on the screen and select End Tool.

bmp180
how to create new symbol and new library in KiCad v5
how to create new symbol and new library in KiCad v5
how to create new symbol and new library in KiCad v5
how to create new symbol and new library in KiCad v5
how to create new symbol and new library in KiCad v5
how to create new symbol and new library in KiCad v5

There are different ways to lay out the pins:

how to create new symbol and new library in KiCad v5
  1. Pin Order. This method is similar to setting up the schematic as the IC or component appears.
  2. Schematic Order. It’s a good way when you add the inductors, capacitors, and resistors as you can see a nice clean schematic.
  3. Schematic Order. It’s a good way when you add the inductors, capacitors, and resistors as you can see a nice clean schematic.

7. You can see the pins are placed and the names are given. Our custom symbol is completed and you can save it now. Click on Save all changes icon. Remember your library name – My_Library and the symbol name – BMP180.

how to create new symbol and new library in KiCad v5

3. How to give description to a custom symbol

  1. Select your custom symbol in the custom library. Go to Edit -> Properties…
how to create new symbol and new library in KiCad v5

2. Type your description and keywords and click on OK button. You can also change fields data and other options here.

how to create new symbol and new library in KiCad v5

4. How to give description to a custom symbol library

  1. Go to Preferences -> Manage Symbol Libraries… Find your library and type description. Click on OK button. Restart the Symbol Editor tool.
how to create new symbol and new library in KiCad v5
how to create new symbol and new library in KiCad v5
how to create new symbol and new library in KiCad v5

Summary

We have learnt how to create custom symbol and custom schematic symbol library in KiCad v5.

Thank you for reading and supporting us.

Libraries:

  • None

Project resources:

  • See attachments on the beginning of this project description.