6.1. Using Component Library Editor
6.1. Using Component Library Editor
- We can use the Component Library Editor (part of Eeschema) to make new components. In our project folder tutorial1 let’s create a folder named library. Inside we will put our new library file myLib.lib as soon as we have created our new component.
- Now we can start creating our new component. From KiCad, start Eeschema, click on the Library Editor icon and then click on the New component icon . The Component Properties window will appear. Name the new component MYCONN3, set the Default reference designator as J, and the Number of parts per package as 1. Click OK. If the warning appears just click yes. At this point the component is only made of its labels. Let’s add some pins. Click on the Add Pins icon on the right toolbar. To place the pin, left click in the centre of the part editor sheet just below the MYCONN3 label.
In the Pin Properties window that appears, set the pin name to VCC, set the pin number to 1, and the Electrical type to Passive then click OK.
Place the pin by clicking on the location you would like it to go, right below the MYCONN3 label.
- Repeat the place-pin steps, this time Pin name should be INPUT, Pin number should be 2, and Electrical Type should be Passive.
- Repeat the place-pin steps, this time Pin name should be GND, Pin number should be 3, and Electrical Type should be Passive. Arrange the pins one on top of the other. The component label MYCONN3 should be in the centre of the page (where the blue lines cross).
Next, draw the contour of the component. Click on the Add rectangle icon . We want to draw a rectangle next to the pins, as shown below. To do this, click where you want the top left corner of the rectangle to be (do not hold the mouse button down). Click again where you want the bottom right corner of the rectangle to be.
If you want to fill the rectangle with yellow, set the fill colour to yellow 4 in Preferences → Select color scheme, then select the rectangle in the editing screen and edit (E), selecting Fill background.
- Save the component in your library myLib.lib. Click on the New Library icon , navigate into tutorial1/library/ folder and save the new library file with the name myLib.lib.
- Go to Preferences → Component Libraries and add both tutorial1/library/ in User defined search path and myLib.lib in Component library files.
- Click on the Select working library icon . In the Select Library window click on myLib and click OK. Notice how the heading of the window indicates the library currently in use, which now should be myLib.
- Click on the Update current component in current library icon in the top toolbar. Save all changes by clicking on the Save current loaded library on disk icon in the top toolbar. Click Yes in any confirmation messages that appear. The new schematic component is now done and available in the library indicated in the window title bar.
- You can now close the Component library editor window. You will return to the schematic editor window. Your new component will now be available to you from the library myLib.
- You can make any library file.lib file available to you by adding it to the library path. From Eeschema, go to Preferences → Library and add both the path to it in User defined search path and file.lib in Component library files.