Making Parts for PCB Libraries
This article describes how to create a new part in SSI's Altium PCB component libraries. SSI maintains a collection of Altium component libraries, many of them derived from libraries generously donated to SSI by the Stanford Solar Car Project. This is designed to serve as both a reference, and a practical guide for how to turn a component with a datasheet into a schematic symbol with a corresponding PCB footprint.
Introduction
Prior to creating a part, you should have installed and configured Altium and TortoiseSVN. In Altium, open the SSI Library project - SSI.libpkg, in SSI_SVN/libraries/intlib - with File → Open Project f → j
. Your "Projects" pane should now have a large number of .PcbLib and .SchLib files open (see right; open the projects pane with View → Workspace Panels → System → Projects v → w → s → p
if the "Projects" pane is not visible).
Altium has several different noteworthy types of libraries.
- Schematic libraries (.SchLib files) store schematic symbols and the components they correspond with. Schematic libraries contain schematic editor symbols, links to footprints (from PCB libraries; see below), mapping between the pins in the schematic symbol and pads on the footprint, and links to the part supplier (most often, DigiKey)
- PCB libraries (.PcbLib files) contain the actual PCB layouts for library components. PCB libraries include landing patterns (the actual pad shapes that will appear on the PCB) and 3D models of the associated packages.
- Integrated libraries (.LibPkg files) are Altium projects that combine schematic and PCB libraries.
- Compiled libraries (.IntLib files) are installable files that allow you to use library parts in schematics and PCBs. Every time a part is added to a library, the Integrated library will need to be recompiled before the part can be added to a PCB project.
Locking in SVN
Prior to adding a part to a library, it's important to "lock" the library in SVN so that other people using the library don't create a conflicted copy. Locking does keep other people from making library edits at the same time, so do not lock a library unless you will be immediately editing it, and, even if a symbol or component is not completely done, commit any libraries you've locked before stepping away for an extended period of time (see Recompiling and SVN Management). To lock any library, right click on it in the Projects pane, click "Version Control," and then "Lock" right click → e → l
. If you need to edit a locked library, mouse over the lock symbol in the Projects pane to see who has the lock, then message them in the #altium
Slack channel to ask if they still need the lock. You can override the lock, but doing so creates the risk of a conflict and will result in lost work if the lock is protecting ongoing changes.
Creating a New Schematic Symbol
Drawing a Symbol
To create a new schematic symbol, first find the relevant schematic library. Schematic libraries are sorted by function - i.e. power management integrated circuits (PMIC), diodes, etc. Next, lock the library you'll be working with, and double click the library to open it. If not already visible, open the "SCH Library" pane v → w → c → b
and look at the top field, where there should be a list of symbols. Click "Add" to create a new symbol, giving it a name consistent with the names used in the library (this is poorly standardized, but typically consists of, in all caps, <category_of_component>_<manufacturer_part_number>). Your new part should then become active, bringing up a blank editing window.
Next, you'll draw out the graphics for your symbol. Begin by setting the snap grid of the editor (the grid of points it will allow for drawing) to 10 point spacing, by opening the snap grid settings v → g → s
and entering 10 for the snap grid size. This is not strictly required, and smaller grids can be used to create finer detail in symbols (5 and 2.5 are recommended), but all connection points for the symbol (added later) must be placed on a 10 point grid and thus symbols should be drawn to accommodate that.
For logic gates, transistors, and other components that traditionally have distinct schematic symbols, it is helpful to draw those symbols - you can often copy the graphics from an existing, similar part by simply opening the existing part from the symbols list in the SCH Library pane, selecting all of the symbol in the editing window and copying, then reopening and pasting into your own symbol. You should then delete all of the pins and replace them as described below. If no suitable symbol exists, draw a symbol by placing lines p → l
, referring to existing symbols for guidelines on size and color. Altium's documentation of the line tool is available here.
Integrated circuits are typically represented in schematics simply with rectangles; you can place a rectangle p → r
by specifying two opposite corners. Rectangles are easy to resize; it is recommended that you start with a large rectangle and downsize after placing pins.
Pins
Pins are how your symbol will be connected to wires when used in schematics. Enter the pin placement tool p → p
, but before clicking to place your first pin, bring up the pin placement settings window tab
. If designing a footprint for an IC, enter the pin name for the first pin in "Display Name," and set the "Designator" to the first pin's pin number (typically 1). If placing a pin for a symbol where a name should not appear, uncheck the "Visible" box by Display Name, and set the Designator to the appropriate number. Finally, set "Length" to 20, and exit the "Pin Properties" dialogue. You can now place your pin - make sure you are using a 10 point snap grid, as failing to do so can lead to errors in boards that use your symbol. After clicking to place your pin, you should automatically be able to place another pin, with the designator automatically incremented - enter Pin Properties tab
to set the Display Name (and Designator, if needed), and then place your next pin. Repeat until all pins are placed.
Next, resize rectangles and lines and move pins around until you're satisfied with the look of the symbol. You're done drawing the symbol! Make sure to save the .SchLib you're working on - if you're not going to immediately proceed to Creating a New Footprint and/or Finishing a Component, commit the library you were working on - this will release the lock and allow others to work on the library.
While this is the generic approach for drawing a schematic symbol, Altium also contains tools for automatically drawing certain types of symbols.
Creating a New Footprint
Footprints are the geometries of the actual layers that will be made on a printed circuit board. They correspond to the "packages" components come in - ie. SOIC, SOT-23, and many more - and so are often reusable between different components. While schematic libraries were sorted by function, footprints are sorted by series (QFN, DFN, etc.) and part type. If the package type marked on your component's datasheet doesn't clearly fit a series and isn't a passive (resistor, capacitor, or inductor) and isn't a sensor (appropriate if the symbol was made in sensor.SchLib) or module (i.e. a full microcontroller, like a Teensy board), it probably belongs in the Miscellaneous library.
As before, lock the library your footprint will be added to, then open the library. If not already visible, open the "PCB Library" pane v → w → p → b
.
Drawing a Footprint
The component you created a symbol for above may already have a footprint in a PCB library; search for it before starting work in this section, and if it exists, skip to "Finishing a Component".
If your component is a standard package, there's a good chance you'll be able to generate your footprint using Altium's IPC Compliant Footprint Generator. Open up the tool t → i
, click "next," and search through the default styles listed. If your component is from a supported series, the tool will make your life a lot easier. Select the relevant series, and you will be prompted for a number of dimensions that should be specified on your component's datasheet. Unspecified dimensions - thinks like heel spacing, solder fillet, and courtyard and keepout areas - can typically be left as their default values.
Finishing a Component
Recompiling and SVN Management
Commit Files to SVN
This Altium-related article is a stub. You can help SSI by expanding it.