đź—™

Sign up for a free Altium Designer License and Curriculum?

Understanding Libraries


If you look at PCB design forums, sites like stackexchange, or design guides on the internet, you’ll often see mentions of libraries. Sometimes, when another designer shares a project with you, they won’t just share schematics and PCB files, they will also share libraries. All component data is stored somewhere in a library, whether it’s in a project folder on your local computer, or in the cloud on Altium 365. When you add components into a project from the Manufacturer Part Search panel in Altium Designer, or you download a component from a component website, you’re taking that component data and placing it into a library so that it can be used in your design.


Libraries operate on a simple concept: store component data for use in projects. All ECAD software applications use libraries to store component information, including symbols, PCB footprints, simulation models, and 3D models that are used to define a component. ECAD applications have multiple tools available to do this, and we’ll look at this in more detail in the next lesson when we start to create components. For now, we want to see how to use libraries so that footprints and schematic symbols can be accessed and used in a PCB.


How to Work With Libraries

Before we look at creating any of this information for components, we need to look at how to use libraries. Libraries are normally used in two ways:


  1. To hold component data so that it can be placed in schematics
  2. To reuse old component data in a new component


When you want to reuse old component data, or create new components, you’ll need to create a library to hold all of the data. Libraries are stored as files on your computer, and this lets you share your component libraries with other designers. In total, there are 7 types of libraries in Altium Designer. However, for working with components, you only need 3 types of libraries:


  • A schematic library file (.SchLib) stores the schematic symbol for a component and all the properties for a component, like the manufacturer information and some electrical data. Each component entry in a schematic library can be linked to a PCB footprint in a corresponding PCB library
  • A PCB library file (.PcbLib) stores footprints that can be assigned to a component as described above.
  • An integrated library file (.IntLib) combines .SchLib and .PcbLib files into a single file so that components can be easily shared. These files give a convenient way to share component data, but they are not required when creating components.


These different types of files can be created inside Altium Designer from the main menu:

We’ll access these functions later when it’s time to start creating custom components.


Creating New Libraries From an Old Project

When you have an old project, and you want to reuse that design data in any new project, you’ll need to export the design data into libraries. Once all the data is in a library, you can add it into new components and projects. All ECAD software applications will enforce this type of workflow for reusing component data.


To see how this works in Altium Designer, open up the MiniPC example project. To quickly create an .SchLib file, open any schematic in the project. Click the Design → Make Schematic Library command in the top menu. Altium Designer will take all the schematic data for all components in your schematics and will compile this data into a new .SchLib file. When the process finishes, you should see the following window:

The SCH Library panel contains all components in the project. As you click through the list, you’ll see the schematic symbol for each component. In the bottom section of the window is a list of PCB footprints that are attached to an item in the top SCH Library panel. Click File → Save As from the top menu, and save this file as MiniPC.SchLib.


Next, we need to create a .PcbLib to store all the component footprints in the project. To do this, open up the .PcbDoc file for the project. Navigate to Design → Make PCB Library in the top menu. Altium Designer will run through the same process as before and will compile all the PCB footprints into a .PcbLib file.


When the tool finishes compiling the data, you’ll see the following window with a list of footprints. As you click through the entries in the Footprints list, each footprint will show up in the design window.

When you’re inside either of these libraries, you’ll be able to modify the footprints and schematic symbols if needed. Sometimes this is necessary, such as if you discover a footprint has an error and needs to be changed. In other cases, you may want to add in a new footprint or symbol to a library.


Now that you’ve created your PCB library for the project, go to the File → Save As… command from the top menu, and save the new library as MiniPC.PcbLib. If there is an existing library in the project folder, you can overwrite that file. You’ll use this new library in the next lesson to learn more about creating components.


Review

Let’s review what we’ve done here by creating these libraries. When the project was originally created, it likely had component data brought in from multiple component libraries in the Components panel, from the Manufacturer Part Search panel, or from Altium 365. By creating these libraries, we’ve taken all of that data and placed it in one location.


Why do we need to do all of this? If you’re working as a professional designer, you will need to keep this data in one location for your customers or employer. When you send the schematics and PCB layout file to someone on your design team or to a customer, you want to make sure they can access and use all the project data. This means, whenever you deliver project files to someone, you should also deliver libraries for the project so that all the required component data can be accessed.


In other cases, you might request that another designer make modifications to an existing layout with new components. If you have libraries with the new component data, the designer can quickly add the new components into the design and make the modifications. The designer won’t need to manually create symbols and footprints, they can quickly use the existing data to place components in the design.


Mixing and Matching Symbols and Footprints

Suppose someone emails you a schematic sheet or a PCB file. You will always be able to open that file in your ECAD software and view any information for components in the file. However, you need the library that contains the component for:


  • Reusing one of the components in a different project
  • Using the symbol or footprint to create a different component


Remember that a component will generally have a single symbol, but it could have different footprints. As an example, let’s look at the ADS1118 component from Texas Instruments. Go to Octopart and search for “ADS1118”. As you scroll through the list of results, you should see two entries for what appear to be different components:

Search results for ADS1118, an analog-to-digital converter from Texas Instruments.


While these might appear to be totally different components, they only differ in one aspect: the pad arrangement. The ADS1118IDGST has a gull-wing package, while the ADS1118IRUGT has an X2QFN package. This component has two variants; because they come in different packages, they will each have different footprints. However, the two components could likely use the same schematic symbols because they rely on the same basic electrical connections.


Now let’s look at another example with two different components. In Octopart, search for the part numbers “NCN4557MTG” and “MKL02Z16VFG4”. You’ll see that the NCN4557MTG is from ON Semiconductor, and the MKL02Z16VFG4 is a different component from NXP Semiconductors.

These two components have the same packages, so they will have the same footprint, even though they are totally different components. When you need to place these in your design, you can use the same footprint in a .PcbLib file for both components.


It’s important to note that these components are not always pin-compatible. In other words, they may have the same package and pad arrangements, but the components may have different pinouts. Be sure to check the datasheets for both components before reusing a footprint in a new component. You’ll want to make sure that the pin functions are compatible for each component.


Migrating Your Libraries to Altium 365

One way you can easily reuse your components and library data in new projects is to migrate your libraries into Altium 365. This process uses the Library Migrator tool in Altium Designer. To access this feature, first make sure that you’re signed in to your Altium 365 workspace. Once you’re signed in, navigate to the File → Library Migrator option in the main menu.


The Library Migrator will take the symbols and footprints in your library and place them into your Altium 365 workspace. To use the Library Migrator, drag the .SchLib and .PcbLib files you created for the MiniPC project into the window. The Library Migrator will generate a list of all the components in the libraries and prepare for migration.

If you’re done adding libraries into the tool, click the Migrate button in the top right area of the window. Once the process finishes, all of the footprints and symbols in the libraries will be available in Altium 365. You can then reuse those objects in new components. We’ll see an example of how to do this in the next lesson.



Further Reading