PCB Design – KiCad Library Editor:
When we design a PCB in any CAD software, we need to find suitable components. For example, if we need a resistor, we must be clear about the component type, dimensions (optional), SMD component or through-hole component and different parameters. Any EDA software consists of component libraries. We can select a required component from the library, but the library may not have all the components. If we need any component that is not present in the library, we need to create it and save it in the library to use it in the future. In KiCad, we can use the library editor to create a new component. The library editor is part of Eeschema.
Figure 1: KiCad PCB design tool screenshot
Note: Before editing and creating a new component, create a new folder in the project folder called library. In this file we can place all our newly created components.
Before creating a component, we need to gather enough details about the component such as pin diagram, pin configuration, its size, shape, dimension, etc. Therefore, before starting the library editor, consult the component datasheet.
In this tutorial, I am choosing IC CD4017. Furthermore, for pin diagram, pin configuration and other necessary details, I referred to our website engineersgarage.com. Required component information:
After this step, open the library editor in Schema, a new window will appear on the screen. In this window we can see the tools necessary to edit the component on the right edge of the window.
To start editing, click on the “create new component” option.

Fig. 2: Screenshot of creating a new component in KIcad
A new window will appear on the screen. Enter the component name in the Empty field, select the necessary changes from the remaining options and click “OK”.

Fig. 3: Screenshot of the component properties window in KIcad
The name will be placed in the middle of the spreadsheet. Move it from there and place it on top of the component. Now select the “Place pin” option and left-click on the spreadsheet. The “Pin Properties” window will appear on the screen. In this window we must provide the pin name, pin number, pin orientation and electrical type of the pin.
Note: Specify the pin number and name as per the pin diagram. Also follow the diagram for pin orientation. Select the electrical property of the pin as pin description (INPUT, OUTPUT, BI-DIRECTION, etc.) in the datasheet. Selecting the electrical pin type is very important, please do not neglect it. Select perfectly, otherwise there will be errors after ERC.
After placing all the pins with their names and numbers, choose “Add graphic rectangle to component body” and draw the rectangle touching all the pins.

Fig. 4: Graphic image of a component

Fig. 5: Screenshot of the component placed in the layout in KIcad
After creating CD4017, save it in a new folder designated for library components (if any).
After saving, close the editor and open the Eeschema circuit editor. Then click on the Add components option and look for the created component (CD4017). If found, place it in the spreadsheet. Otherwise, directly open the created library folder and select the component from there.