KiCad Library Tutorial

Making Component Library in KiCad


Software : KiCad   Version: 5.1.9

Domain : PCB Designing    Content by : Sincgrid


 

Circuit design starts from a schematic design which is then converted into a physical form using a layout design. 

The schematic part is designed in KiCad Eeschema

The layout part is designed in KiCad PcbNew.

For use in KiCad Eeschema, symbol of the component is required.

For use in KiCad PcbNew, footprint of the component is required.

Through this tutorial we will be learning how to make symbol and footprint of any component. 

MAKING A SYMBOL IN KICAD

There are three options to make a symbol library in KiCad:-

   A. Make a new library and then add symbol to it.

  B. Add component symbol to already available library in KiCad.

  C. Add library downloaded from online sources.

We will be working step by step through above mentioned points.

PART A : MAKE A NEW LIBRARY AND THEN ADD SYMBOL TO IT.

A1. Open KiCad and click on Symbol Editor icon (  ).

A2. Click on File menu and then select “New Library …”  symbol.

A3. Now the location to save the library will be asked for. You can use the current folder location for your project. Else one can also use the library folder in the KiCad installation folder. 

KiCad symbol folder location: %APPDATA%\kicad\share\kicad\library

(e.g. D:\PROGRAMS\KiCad\share\kicad\library)

A4. Name your library as per requirement. (Hint:  Name should be such that it covers component of a same or similar class.). Click Save.

A5. Now “Add To Library Table” option window will appear. We will be selecting Global library option.

Global library: Library added to this table will be visible for all projects.

Project library: Library will be visible to current project only.

(Note: Only those library which are added in the library tables will be available within KiCad.)

A6. New Symbol

Right click on the newly saved library from libraries list panel and click on “New Symbol …” .

Now ” Symbol Properties” window will appear.

A7. Symbol Properties

Add Symbol Properties

 

Symbol name: Name should be specific to that component. (For example, we are making a AC to DC 5V/1A adapter, we are naming it AC-DC5V)

Default reference designation: This is the prefix used for annotating the component in the schematic editor. For example, we are using MOD as reference because our component is module. (Link for selecting reference designator: Reference designator)

Number of units per package: In some components such as IC a same unit is replicated multiple times. In such cases we need to change the units per package to that number. For example, consider 7404 IC which contains 6 inverter logic gates, leading to 6 number of units per package.

Generally alternate body style is not used.
In case of creating a power symbol such as +3V3, etc, select create symbol as power symbol.
Some visibility options are also provided in the Pin Settings.
Now proceed by clicking OK.

A8. A blank screen with symbol name and reference designator will be placed automatically at the centre. Start by placing these to the left at some distance. Use Move tool by pressing key “M“.

 

 

A9. To draw the body of symbol use the tools provided in the right side toolbar.  

Draw the symbol outline. 

Click on the pin tool to add the pins. 

A10. Pin Properties need to be filled. It is advisable to use the datasheet of the component for getting proper information about each pin of component.

SAMPLE PIN PROPERTIES

 

A11. After adding the pin details and attaching it to the body of symbol, the symbol should look something like this.

A12. Add only critical information on the symbol body.

A13. Edit Symbol properties 

For providing additional data, such as datasheet, footprint association, use “Edit symbol properties” tool.

Library Symbol Properties in Edit symbol properties

A14. The symbol can now be used in KiCad Eeschema.

PART B : ADD COMPONENT SYMBOL TO ALREADY AVAILABLE LIBRARY IN KiCad

B1. Open KiCad and click on Symbol Editor icon (  ).

B2. Right click on the already available library in which you want to add the new symbol.

B3.  Now follow step A6. Add required details in Symbol Properties window.

B4. Now follow steps from A7 to A13. Adding required details as per the step. Now save the file by pressing “Ctrl+S”.

B5. The symbol can now be used in KiCad Eeschema.

PART C. ADD LIBRARY DOWNLOADED FROM ONLINE SOURCES

If the component is highly used in industry or hobbyists domain chances are high that it is already available at some online resources. Before initiating with library making, it is highly suggested to search the component or module online. Some good resources for downloading library files for KiCad are given below:-

  1. Component Search Engine 
  2. Ultra Librarian 
  3. SnapEDA
  4. Digikey KiCad Library
  5. Octopart 
  6. SparkFun-KiCad-Libraries

We have tried to provide with major resources for library. Various other online library resources might exist which are not listed here.

C1. Download the required symbol library.

C2. Open KiCad and click on Symbol Editor icon ().

C3. Choose Add Library…(  ) from the File menu.

C4. Locate the downloaded library. Select the “.lib” file. 

C5. Now “Add To Library Table” option window will appear. We will be selecting Global library option.

Global library: Library added to this table will be visible for all projects.

Project library: Library will be visible to current project only.

C6. The symbol can now be used in KiCad Eeschema. 


MAKING FOOTPRINT IN KICAD

There are three options to make a footprint library in KiCad:-

   A. Make a new library and then add footprint to it.

  B. Add component foootprint to already available library in KiCad.

  C. Add library downloaded from online sources.

We will be working step by step through above mentioned points.

PART A : MAKE A NEW LIBRARY AND THEN ADD FOOTPRINT TO IT.

A1. Open KiCad and click on Footprint Editor icon (  ).

All the footprint libraries will be loaded.

A2. Click on File menu and then select “New Library …” symbol.

Now the location to save the library will be asked for. You can use the current folder location for your project. Else one can also use the library folder in the KiCad installation folder.
KiCad footprint folder location: %APPDATA%\kicad\share\kicad\modules
(e.g. D:\PROGRAMS\KiCad\share\kicad\modules)

A3. Name your library as per requirement. (Hint:  Name should be such that it covers component of a same or similar class.). Click Save.

A4. Now “Select Library Table” option window will appear. We will be selecting Global library option.
Global library: Library added to this table will be visible for all projects.
Project library: Library will be visible to current project only.

Note: Only those library which are added in the library tables will be available within KiCad.

A5. Right click on the library from libraries list panel and click on “New Footprint …

A6. Footprint name will be asked for now. The footprint name should be kept as per the details given in datasheet. If you are making footprint for a custom part, it is preferred to use the name of that module as footprint name, which is the case for our present footprint. We will keep the footprint name as “AC-DC5V1A“.

A7. A blank screen with symbol name and reference designator will be placed automatically at the centre. Start by placing these to the left at some distance. Use Move tool by pressing “M“.

A8. Before starting with this procedure it is important to get physical dimension details of the component. This data can be gathered from the device datasheet. One can also use measuring devices like vernier caliper to get the accurate dimension details.

  • Draw the outline of the component in F.SilkS layer using graphic tool. This layer will be printed on the PCB in silkscreen part. Do not cover tracks or any copper part with this layer.
  • Draw the outermost outline of the component in F.CrtYd layer. This layer is important because it helps to  prevent any overlapping component on the same side of the board. This layer will be checked during Design Rule Check to prevent from any potential issue in the board.

A9. Now pads will be added in the footprint. Using the “Add pad” tool. It is also required to set the Pad properties while adding the pad. Pad size, pad number and other details should be set accurately. Use datasheet or measure the pad dimensions using vernier caliper or other measuring tools. KiCad provides provision for a variety of Pad types and Pad Shapes.

Since the footprint will correspond to a particular symbol, make sure that the pad number is correct. The connections in KiCad PcbNew will be made on the basis of connections made in the KiCad Eeschema. Take help from the device datasheet during this process.

After placement of pads at appropriate locations. The Footprint should look something like this.

A10. Now the footprint is ready. It can be used in footprint association and KiCad PcbNew.

PART B : ADD COMPONENT FOOTPRINT TO ALREADY AVAILABLE LIBRARY IN KiCad

B1. Open KiCad and click on Footprint Editor icon (  ).

B2. Right click on the library where you want to add the new footprint and then click on “ New Footprint …“. 

B3. Now start following from step A6 to A9.

B4. Now the footprint is ready. It can be used in footprint association and KiCad PcbNew.

PART C: ADD LIBRARY DOWNLOADED FROM ONLINE SOURCES

If the component is highly used in industry or hobbyists domain chances are high that it is already available at some online resources. Before initiating with footprint making, it is highly suggested to search the footprint online. Some good resources for downloading library files for KiCad are given below:-

  1. Component Search Engine 
  2. Ultra Librarian 
  3. SnapEDA
  4. Digikey KiCad Library
  5. Octopart 
  6. SparkFun-KiCad-Libraries

We have tried to provide with major resources for library. Various other online library resources might exist which are not listed here.

C1. Download the required footprint library. Make sure the file type is “kicad_mod“, this file type indicates KiCad footprint. Also, this file should be present in a folder with “.pretty” extension. 

For example, we downloaded the library for MSP430G2553IN20 microcontroller. In our downloaded files, the “.pretty” extension folder was not available, hence we had to make one.

C2. Open KiCad and click on Footprint Editor icon (  ).

 

C3. Choose Add Library…(  ) from the File menu.

C4. Locate the “.pretty” folder. The folder should contain the “kicad_mod” extension type footprint file.

C5. Now “Select Library Table” option window will appear. We will be selecting Global library option.
Global library: Library added to this table will be visible for all projects.
Project library: Library will be visible to current project only.

Note: Only those library which are added in the library tables will be available within KiCad.

C6. Now the footprint is ready. It can be used in footprint association and KiCad PcbNew.


 

%d bloggers like this: