Kicad: Step-by-Step Guide to Adding Libraries
In the world of electronic design automation, Kicad stands out as a powerful and open-source software suite that enables engineers and hobbyists alike to create excellent circuit board designs. Kicad's extensibility and user-defined modules add to its potency, allowing users to create and use their libraries. If you're new to Kicad and want to know how to add a library, this guide will walk you through the process in a clear and engaging way.
Before we dive into the steps, let's ensure we're on the same page. A Kicad library, in simple terms, is a collection of symbols and footprints that describe electronic components. These libraries allow us to represent components in our designs accurately and consistently. By the end of this tutorial, you'll be able to create and add your own library to Kicad, expanding its capabilities to suit your specific needs.
Understanding Kicad Libraries
Before we dive into creating our library, it's essential to understand the components of a Kicad library. A library in Kicad consists of three main files: a project file with the .pro extension, a symbol file with the .sym extension, and one or more footprint files with the .mod extension.
A symbol file contains information about the electrical properties of a component, such as its pin names and connections. Footprint files describe the physical dimensions and package type of a component, including its physical pins and any design rules specific to that package. The project file ties these together, defining the library's contents and any dependencies between its symbols and footprints.
Creating a New Library
Now that we have a basic understanding of Kicad libraries, let's create a new one. Open Kicad Eeschema, the graphical schematic editor, and click on Libraries in the menu bar, then select Manage Libraries. In the dialog that appears, click the Create new library button.
Give your library a name, for this example let's use 'myNEWLIB'. After clicking OK, you'll be prompted to select a directory for your new library. Choose a location that's easy for you to find later, such as a 'Libraries' folder in your Kicad install directory. Click OK to create the library.
Creating Symbols for Your Library
With your new library created, it's time to add symbols. In the Manage Libraries dialog, select your new library and click OK. This will open your library in Eeschema. Click the + icon in the left-hand toolbar to create a new symbol. You'll now be prompted to choose a template. For basic symbols, the Not Connected symbol is an excellent starting point.
After selecting a template, you'll be presented with a blank symbol canvas. Add your component's pins using the Add Pin tool (also in the left-hand toolbar). Right-click on the canvas to add graphical elements like text and rectangles. Once you've created your symbol, click File, then Save to save it to your library. Repeat this process to create all the symbols you need for your library.
Creating Footprints for Your Library
Now that you have symbols for your components, it's time to create footprints. From the main Eeschema menu, select Libraries and then Manage Libraries. Select the footprint ' Trois_pattes' provided with Kicad, then click the Apply button to use it as a template for your new footprint.
With the 'Thirty_pads rectangulair' canvas open, use the graphical tools (Add Pad, Add Line, Add Rectangle, etc.) to design your component's footprint. Once you're satisfied with your design, click File, then Save to save your footprint to your library. Again, repeat this process to create all the footprints you need for your components.
Linking Symbols and Footprints
After creating symbols and footprints, you must link them together in your library. In the Manage Libraries dialog, select your library and click Edit. This will open the Library Editor. Select the Association tab, then click the New button to create a new association between a symbol and a footprint.
Choose the appropriate symbol and footprint from the dropdown menus, then click OK. In the main Library Editor window, you'll now see the linked symbol and footprint. Repeat this process to link all the symbols and footprints in your library.
With your new library created and all symbols and footprints linked, you can now use your components in your Kicad projects. To use your library, save it to the preferences library search path (C:\Users\YourUserName\AppData\Roaming\Kicad\6.0\template.library or similar) or add it to your project's library search path.
Remember, creating libraries in Kicad is an ongoing process. As you design more projects, you'll likely find that you need additional libraries or components. Keep adding to your libraries, and soon you'll have an ever-growing collection of custom components for use in your projects.