Creating Library Components For Altium
Creating Library Components For Altium
Summary
Tutorial TU0103 (v2.1) February 12, 2008
This tutorial covers the creation of schematic components and PCB footprints, including adding 3D body objects, using the Schematic and PCB Library Editors in Altium Designer. A glossary of terms used in this tutorial is included as an appendix.
In this tutorial, we will cover the following topics: creating new libraries creating schematic components with single and multiple parts checking the components using Schematic Library Editor reports creating PCB component footprints manually and using the PCB Component Wizard handling other special footprint requirements, including irregular pad shapes including three-dimensional component detail (3D bodies) checking the component footprints using PCB Library Editor reports creating an integrated library of the new components and models.
This tutorial presumes you have a working understanding of the Schematic and PCB Editor environments and are familiar with placing and editing components. The example components and libraries used in this tutorial are available in the Creating Components folder of your Altium Designer installation.
4. Select File Save As and save the library as Schematic Components.SchLib. 5. Click on the SCH Library tab to open the SCH Library panel.
Set the Library Editor Workspace options as per Figure 3. Then click on the Units tab and enable Imperial Units, using DXP Defaults as the units. Click OK to close the dialog. If the schematic library editor grid is not visible when the dialog is closed, press PAGE UP to zoom in until it is visible. Note that zooming occurs around the cursor, so keep the cursor close to the origin as you zoom in.
Creating Library Components 4. To create the NPN transistor we will first define the component body. Select Place Line [shortcut: P, L], or click on the Place Line toolbar button (Utilities toolbar). If required, you can press the TAB key to set the line properties in the PolyLine dialog. Using Figure 4 as a guide (use the grid lines to help you), place the vertical line. Click once to define the first end of the line, move the mouse to the location of the other end and click to define it, then right-click or press ESC to end placement of this line. Note that you are still in line placement mode, as indicated by the crosshair on the cursor. 5. Now create the other two lines. For this transistor they are placed on a non-regular angle, when you start placing the line you may find that the line is constrained to horizontal/vertical, or 45. Press SHIFT + SPACEBAR while you are placing a line to cycle through the different Figure 4. NPN body placement modes. One of the modes is any angle, this mode will allow you to define the lines correctly. After defining these two lines you will need to press ESC once more to drop out of line placement mode. 6. The small arrow head is created out of a closed polygon. Select Place Polygon [shortcut: P, Y] or click on the Place Polygon toolbar button (Utilities toolbar). Before you start placing the polygon press the TAB key to set the polygon properties in the Polygon dialog. Set the Border Width to Smallest, enable Draw Solid and set the fill and border colors to the same color (basic color 229), then click OK to close the dialog. Click to define each vertex of the triangle and right-click to end. Right-click or press ESC to end polygon placement mode. Figure 5 shows the coordinates of the polygon vertices.
The exact location of graphical lines is not critical. What is critical in component design is the pin location, or more specifically what is referred to as the hot end of the pin. This is the point that creates the electrical connectivity so it is the pins you should always place on a grid that is suitable for wiring.
Utilities toolbar Figure 5. Use the coordinate information to confirm that your arrow head is correct.
If you wish to alter the distance (in hundredths of an inch) between the pin name or number and the body of the component, select Tools Schematic Preferences and change the Pin Margin options in the Schematic General page.
3. In the Pin Properties dialog, type in a pin name in the Display Name field (1 for the first NPN pin), and a unique pin number (also 1) in the Designator field. Enable the Visible options if you want the pin name and designator visible when you place the component on a schematic sheet. 4. Set the Electrical Type of the pin from the drop-down list. This type is used when compiling a project or analyzing a schematic document to detect electrical connection errors in a schematic sheet. In this component example, all pins are have their Electrical Type set to Passive. 5. Set the length of this pin (all pins in this component are set to 20), and click OK.
TU0103 (v2.1) February 12, 2008
Creating Library Components 6. Press the SPACEBAR to rotate the pin in 90 increments while it is floating on the cursor. Remember that only one end of a pin is electrical (referred to as the hot end) and you must place the pin with this end out from the component body. The non-electrical end of the pin has the pin name next to it. 7. Continue to add the pins required to finish the component, making sure the pin names, numbers, symbols and electrical types are correct as shown on the NPN symbol shown in Figure 6. 8. If you have placed all the pins with the Name and Number visible, you can easily change the display state of all in a single editing action. To do this select just the 3 pins (SHIFT + Leftclick on each pin), press F11 to display the Inspector panel, and disable the Show Name and Show Designator options, as shown in Figure 8. 9. You have now finished drawing your component, select File Save to save it.
Figure 9. Review and edit all pins in the Component Pin Editor dialog.
Creating Library Components For a multi-part component, the relevant pins for the selected part will be highlighted with a white background in the Component Pin Editor dialog. All pins of other parts are grayed. You are, however, still able to edit the pins of these non-selected parts. Select a pin and click Edit to display the Pin Properties dialog for that pin.
Figure 10. Basic component properties are defined in the Library Component dialog.
2. Type in the Default Designator, eg. Q? Including the question mark will allow the designator number to auto-increment on placement, e.g. Q1, Q2, if the designator is defined before placing the component (press TAB while placing to edit an object before placement). 3. Enter a Comment that will display when the component is placed on a schematic sheet, e.g. NPN. Make sure the Visible options for the Designator and Comment fields are enabled. If the Comment field is left blank it will automatically be populated with the Library Reference when the component is placed. 4. Enter a string into the Description field that describes the transistor, eg. Transistor, NPN Generic. This string is searched during a library search, and is displayed in the Libraries panel. 5. Leave the other fields at their default values while we add models and parameters, as required.
TU0103 (v2.1) February 12, 2008
Library panel. Alternatively, you can add models to the current component via the SCH Library panel by clicking on the Add button below the Model list, as shown in Figure 11, or from the Model region of the Schematic Library Editor workspace. Click on the arrow located at the lower right side of the workspace to show the Models view, as shown in Figure 12.
Figure 12. Click the arrow to display the Models view at the bottom of the workspace, then use the Add button to select a model-kind and add a new model.
1. Display the Model view section in the schematic library editor workspace by clicking on the upsidedown arrow/caret symbol as shown in Figure 12.
2. The PCB Model dialog displays. 3. Click the Browse button to open the Browse Libraries dialog, this dialog allows you to browse footprint libraries that have been added into your library project, or have been added to the installed libraries list. 4. If the footprint is not available in any of the current libraries we will need to search for it. To do this click the Find button in the Browse Libraries dialog. The Libraries Search dialog displays, as shown in Figure 14.
Creating Library Components 5. Set the Scope to Libraries on Path and the Path to \Altium Designer 6\Library\Pcb. Make sure Include Subdirectories option is enabled. 6. In the query field at the top of the dialog, type BCY-W3 and click on Search.
Figure 14. Searching the supplied footprint libraries for the footprint.
7. You should get a number of results from the PCB library Cylinder with Flat Index.PcbLib listed in the Browse Libraries dialog, as shown in Figure 15. Select BCY-W3 from this library and click OK to return to the PCB Model dialog.
8. Since this is the first time you have used this library, you will be asked to confirm the installation of this library which will make it available for use. Click Yes in the Confirm dialog. The PCB Model dialog is updated with the footprint model information.
10
9. Click OK to add the model. It will appear in the Model region at the bottom of the workspace, as shown in Figure 16.
Figure 16. The footprint model has been added to the component.
11
Creating Library Components project file. In this case the most appropriate way of referencing it would be to define a search path to the folder that contains the simulation model files. To do this select Project Project Options from the menus, then click on the Search Paths tab. 2. Press the Add button to define a new search path, the Edit Search Path dialog will appear. 3. Unless specifically required, it is suggested that you always disable the Include sub-folders in search option as this can greatly slow the searching process. 4. The default search path is the current folder, since you have copied the model to your working folder you can simply click OK. To confirm that the model will be found click the Refresh List button in the Options dialog, as shown in Figure 17. Now that the search path is defined any model stored in the working folder will automatically be found.
5. Now that the model is available to the project you are creating (the library package New Library.LibPkg), it is time to add the simulation model to the NPN component. To do this follow the same steps you followed to add the footprint model, except choosing Simulation model this time. The SIM Model General / Generic Editor dialog displays, as shown in Figure 18.
12
Figure 18. Specifying and configuring all Spice model kinds is done in the Sim Model dialog.
6. Since the NPN is a transistor, select Transistor from the Model Kind list. The dialog becomes the Sim Model - Transistor/BJT dialog, as shown in Figure 19.
The Model Name is the link to the SIM model file, so make sure it is a valid model filename (without the extension). Note: the Found In region of the dialog when a valid model is found it is listed here.
13
Creating Library Components 8. Enter the name of the model file in the Model Name field, for this tutorial it is NPN (for the model file NPN.mdl), as soon as you finish typing the name the model should be detected, if it is found the path/name will be shown in the Found In region of the dialog. 9. Type in a suitable Description, e.g. Generic NPN. If you do not have a model file (.mdl), you could press the Create button to run the Spice Model Wizard that will step you through the creation of a simulation model file for your component. 10. Click OK to return to the Library Component Properties dialog where the model NPN has been added to the Models list, as shown in Figure 20.
Figure 20. NPN with the footprint and simulation models listed in the Models view.
14
Figure 21. Signal Integrity model editor, configured for the NPN transistor.
2. If you wish to import an IBIS file, click on the Import IBIS button and navigate to the required .ibs file. For this tutorial we will use built-in default pin models. Set the Type to BJT and type in a suitable entries for the Model Name and Description fields (eg. NPN), as shown in Figure 21. 3. Click OK to return to the Library Component Properties dialog where the model is added to the Models list, as shown in Figure 22.
Figure 22. The simulation and signal integrity models have been added to the transistor.
For more information about adding and editing Signal Integrity models, refer to the Performing Signal Integrity Analyses tutorial.
15
3. Enter the name of the parameter and a value. Make sure String is selected as the parameter Type if you require a text string and the values Visible option is enabled if you want the value to display when the component is placed on a schematic sheet. Click OK. The parameter is added to the Parameters list in the Library Component Properties dialog.
HelpURL
If a component includes a parameter with the reserved parameter name HelpURL, then the URL will be resolved when the F1 key is pressed while the cursor is hovering over the component. The URL can actually be a web address, a text file, or a PDF file.
16
Component links
The second technique supports multiple links, and naming of each link. Here you add a pair of parameters, one that points to the linked document or URL, the second defines a label (or description) for this link. The parameter pairs are defined as follows. Parameter Name 1 parameter 2nd parameter 1 parameter 2
nd st st
Example Parameter Value C:\MyDatasheets\XYZDatasheet.pdf Datasheet for XYZ C:\MyDatasheets\AlternateXYZDatasheet.pdf Datasheet for Alternate XYZ
parameter
Any number of links can be defined using the same parameter pair, except with the number incremented. When you right-click on a component that uses datasheet linking, a Reference menu entry will appear in the Context menu, in it you will find an entry for each component link, as shown in Figure 24.
Component-to-datasheet linking linkage can be used when you are browsing components in the Libraries panel press F1 or right click on the component name in the panel to access the linked documents/URLs.
String Indirection
Often there are situations where you need to define a placeholder that is populated with some text later. For example, you might want a parameter called DesignedBy on a schematic template, whose value is defined when the template is used for a new schematic. Altium Designer uses a technique known as string indirection to support this requirement. At the schematic sheet level, you can add a document parameter, for example DesignedBy, whose value is left blank. You then place a standard string on the document, whose value is the text =DesignedBy. The equals sign sets this string to be an indirection string, instead of displaying the text it will display the current value of the document parameter DesignedBy. Note: The default behavior is to not analyze indirection strings and display the
TU0103 (v2.1) February 12, 2008
17
Creating Library Components final value, to do this you must enable the Convert Special Strings option in the Schematic Graphical Editing page of the Preferences dialog. Be aware that if the value of the parameter is blank then nothing will be displayed, which is why the Convert Special Strings option is disabled by default. String indirection can also be used with components too as well as displaying any parameter that has been added to the component in its own right by enabling its own Visible option, you can also indirect the string to the components Comment field. One situation where string indirection is useful is for a component that is used for both PCB design and circuit simulation. During schematic-to-PCB design transfer the schematic Comment field is mapped to the Comment field of the PCB component. But for circuit simulation the Comment field is not used, since the simulator can require many properties for a component a BJT has five simulation properties for example. These five properties are defined as parameters instead. In this case any of the circuit simulation parameters can be mapped to the Comment field using string indirection, by entering the name of the parameter preceded by an equals sign. For example, a resistor has one simulation parameter, called Value. If the resistors Comment field is set to =Value, then the contents of the Value parameter will be displayed as the Comment. If you are tuning the resistance value during simulation the correct resistance will be used when you transfer the design to PCB layout.
Simulation parameters
As mentioned above, the string indirection feature can be used to map any parameter to the components Comment field. Note: You do not need to add the simulation parameters to the component manually, they are built into the simulation model. If you edit the simulation model for the transistor you are creating you will see that the BJT model supports five simulation parameters, as shown in Figure 25.
Figure 25. Simulation parameters are defined in the Sim Model dialog.
If you want easier access to the simulation parameters, or want to display them on the schematic, or if you want to include them in output documentation, you can promote them to be component parameters by enabling the Component parameter option next to each parameter.
18
Figure 26. Configure the Component Rule Check dialog to test the current component.
2. Set the attributes you wish to check. Click OK. A report named libraryname.err displays in the Text Editor, listing any components that violate the rule check. 3. Make any adjustments necessary to the library and rerun the report. 4. Save the schematic library.
Component Report
To create a report that lists all the information available for the active component: 1. Select Reports Component [shortcut: R, C]. 2. The report 'libraryname.cmp' is displayed and includes the number of parts with the pin details for each part in the component.
Library Report
To create a extensive report of each component in the library: 1. Select Reports Library Report [shortcut: R, L]. 2. Configure the report settings in the Library Report Settings dialog. The report will be opened in Microsoft Word, or your web browser, depending on the style chosen.
19
Figure 27. Copying the selected components from the current library.
20
2. Type in the name of the new component, e.g. 74F08SJX, and click OK. The new component name displays in the Components list in the SCH Library panel and an empty component sheet displays with a crosshair through the center (origin) of the sheet. 3. Now we will create the first part of the new component as shown above, including its pins, as detailed in the following sections. The first part will then be used as the basis for the other parts, as only the pin numbers need to change between the parts.
Placing lines
1. Note the current grid setting displayed on the Altium Designer Status bar (bottom left). You can cycle through the three definable grid settings at any time by pressing the G key set the grid to 5. toolbar button. The cursor changes to a 2. Select Place Line [shortcut: P, L] or click on the crosshair and you are now in multi-segment line placement mode.
21
Creating Library Components 3. Press the TAB key to set the line's properties. Set the line width to Small in the Polyline dialog. 4. Referring to the X, Y co-ordinates at the left end of the Status bar, position the cursor at 25, -5, then left-click or press ENTER to anchor the starting point of the line. Then position the mouse and left-click to anchor a series of vertex points that define the segments of the line (at 0,-5; 0,-35 and 25,35). 5. When you have finished drawing the line, right-click or press ESC to exit line placement mode. 6. The completed polyline is shown in Figure 29. Save the component.
Figure 29. Place the Polyline to define the body of the first part
Drawing an arc
Placing an arc is a four-step process that sets the center point, radius, start angle and end angle of the arc. Note: You can press ENTER instead of left-click to place the arc. 1. Select Place Arc (Center) [shortcut: P, A]. The last arc drawn appears on the cursor and you are now in arc placement mode. 2. Press the TAB key to set the arc's properties. The Arc dialog displays. Set the radius to 15, start angle to 270, end angle to 90, and the line width to Small, as shown in Figure 30.
Figure 30. The properties of the arc can be defined in the dialog, or using the mouse.
3. Position the cursor at 25, -20 and press ENTER or left-click to anchor the center point of the arc. There is no need to move the mouse, the cursor will jump to the correct location to define the arc radius of 15, as set in the Arc dialog. Press ENTER to accept the radius setting. 4. The cursor will then jump to the start point of the arc, as set in the dialog. Without moving the mouse press ENTER to accept the arc start angle, and when the cursor jumps again press ENTER again to define the arc end angle. 5. Right-click, or press ESC, to exit arc placement mode.
22
Figure 31. Part A of component 74F08SJX. The input/output indicator triangles are a display feature, controlled by the Pin Direction option in the Schematic General page of the Preferences dialog.
4. Select Edit Paste [shortcut: CTRL + V]. The outline of the component part will appear on the cursor, place it at the same relative location to the sheet origin as Part A (the black crosshair in the center of the sheet indicates the origin). If necessary select and move the copied part until it is positioned the same as the original part. 5. Update the pin information in the new part, Part B, by double-clicking on each pin and changing the pin name and number in the Pin Properties dialog. Once complete, Part B will look like Figure 33.
6. Repeat steps 3 to 5 above to create the remaining two parts, Part C and D, as shown in Figure 34. Save the library.
23
24
Figure 36. View mode Alternate 1 used to draw an IEEE representation of an AND gate
25
Footprints can be copied from the PCB Editor into a PCB library, copied between PCB libraries, or created from scratch using the PCB Library Editors PCB Component Wizard or drawing tools. If you had a PCB design with all the footprints already placed, you could use the Design Make PCB Library command in the PCB Editor to generate a PCB library that includes those footprints only.
Altium Designer also includes comprehensive libraries of predefined through-hole and SMD component footprints for use in designing PCBs. The footprint libraries (.PcbLib files) supplied are stored in the \Altium Designer 6\Library\Pcb folder in your Altium Designer installation directory. The footprints that are created manually in this part of the tutorial are only to illustrate the procedures required, they are not dimensionally accurate. Always check the specifications of a new footprint against the manufacturers datasheet.
26
Figure 39. Work through the wizard to build a DIP14 footprint. TU0103 (v2.1) February 12, 2008
27
Creating Library Components To create our new component footprint, DIP14, using the Component Wizard: 1. Select the Tools Component Wizard [shortcut: T, C]. The PCB Component Wizard will automatically start. Click on Next > to progress through the wizard. 2. Answer the questions asked by selecting from the options available. To create our DIP14, select Dual in-line Package (DIP) as the pattern, Imperial units, 60mil round pads with 32mil hole (select and type over the dimensions), a distance between pads of 300mil (horizontal) and 100mil (vertical), then accept the rest of the defaults until you need to specify the number of pads required. Type in 14 for the number of pads required. 3. Press Next > until you come to the final page of the wizard and click Finish. The filename of new footprint, DIP14, will appear in the Components list in the PCB Library panel and the new footprint will display in the design window, as shown in Figure 40. You can then further modify the component to suit requirements. 4. Save the library with its new footprint component by selecting File Save [shortcut: CTRL + S].
Figure 41. The IPC Footprint Wizard builds the footprint based on the component dimensions.
28
To manually create a footprint suitable for the NPN transistor: 1. Before creating the footprint, check that the units and grids are suitable. Select Tools Library Options [shortcut: D, O] to display the Board Options dialog, and confirm that Units are Imperial, and the Snap Grid is set to 10mil in the X and Y directions. You will need to set the Grid to suit the spacing required by the pads in the footprint you are creating. Set Visible Grid 1 to 10mil and Visible Grid 2 to 100mil. 2. An empty component footprint workspace is created when you select the Tools New Blank Component [shortcut: T, W], however, the new library already has a blank footprint, so we will use that one. 3. To rename this default blank footprint, double click on its name in the list in the PCB Library panel (it will be called something like PCBComponent_1). Lets name the footprint the same as the one used earlier in the tutorial, BCY-W3, type in the new footprint name in the PCB Library Component dialog. 4. It is recommended that you build the footprint around the workspace 0, 0 reference point, indicated by the origin marker. Use the shortcut J, R to jump the cursor to the origin at any stage while you are working. The reference point is the point you will be holding the component by when you place it. Typically, the reference point is either the center of pad 1 or the geometric center of the component. The reference point can be set to either of these at any time using the Edit Set Reference submenu options.
TU0103 (v2.1) February 12, 2008 To change the snap grid while you are working press CTRL + G. To display or hide the visible grids press the L key to display the View Configurations dialog. If the origin marker is not displayed, open the View Configurations dialog and enable the Origin Marker option in the View Options page.
29
Figure 43. Set the properties of the pads before placing the first pad.
2. Edit the various regions of the dialog as shown in Figure 43. This creates a stretched round pad.
30
Creating Library Components 2. Using the coordinates displayed at the left of the status bar, position the first pad at X:0, Y:-50, and click (or press ENTER) to place pad 1. 4. After placing the first pad, another will appear on the cursor. Position the cursor at X:0, Y:0, then click to place the second pad. Note: The pad designator is automatically incremented. 5. Position the cursor at X:0, Y:50, then click to place the third pad. 6. Right-click, or press ESC, to exit pad placement mode. The three pads should look like Figure 44. 7. Save the footprint by selecting File Save [shortcut: CTRL + S].
To position the pad that is floating on the cursor without the mouse, use the J, L shortcut to display the Jump to Location dialog. Press TAB to move between the X and Y fields, press ENTER to accept the changes, and press ENTER again to place the pad in the workspace.
Pad Designators
Pads can be labeled with a designator (usually representing the component pin number) of up to 20 alphanumeric characters. The designator can be left blank if desired. If the designator begins or ends with a number, the number will autoincrement when placing a series of pads sequentially. To achieve alpha increments, eg. 1A, 1B, or numeric increments other than 1, use the Paste Array feature. Paste Array feature By setting the designator of the pad prior to copying it to the clipboard you can use the Paste Array feature to automatically apply a designation sequence whilst pasting the pads. By using the Text Increment field in the Paste Array dialog, the following pad designator sequences can be placed: Numeric (1, 3, 5) Alphabetic (A, B, C) Combination of alpha-numeric (A1 A2, or 1A 1B, or A1 B1 or 1A 2A, etc). To increment numerically, set the Text Increment field to the amount you wish to increment by. To increment alphabetically, set the Text Increment field to the letter in the alphabet that represents the number of letters you wish to skip. For example, if the initial pad had a designator of 1A, set the field to A, (first letter of the alphabet), to increment designators by 1. Set the field to C (third letter of the alphabet) and the designators will become 1A, 1D (three letters after A), 1G etc. Create the initial pad with the designator required, eg. 1A. Copy this pad to the clipboard using Edit Copy [shortcut: CTRL + C]. Click on the pad center to define the copy reference point. Select Edit Paste Special [shortcut: E, A]. The Paste Special dialog displays.
31
Creating Library Components Click the Paste Array button to display the Setup Paste Array dialog, and configure as required.
2. First, we will place the arc, as shown in Figure 45. To place the arc, select Place Arc (Center) from the menus. Position the cursor at X:0, Y:0 and click to define the arc center. If you know the arc radius and start and end angles it is actually easier to complete the arc placement without trying to interactively define these settings, then edit the placed arc through the settings in the Arc dialog. 3. Click somewhere to approximately define the arc radius, then click to define the arc start angle. If required you can press the SPACEBAR to toggle the direction the arc is rendered before defining the end angle, set the render direction as shown in Figure 45 then click again to define the arc end angle. Right-click to exit arc placement mode. Now double-click on the placed arc to display the Arc dialog, and set the properties as follows: Width=6mil, Radius=105mil, Start Angle=55, End Angle=305. 4. Next is the line. Select Place Line [shortcut: P, L], or click on the button. Position the cursor near the end of the arc and press PAGE UP to zoom in, as shown in Figure 45. As you move the cursor close to the end of the arc it will snap to it, this is the electrical grid pulling the cursor to the end of the existing object. Click to start the line segment.
If you make a mistake during Line placement, press BACKSPACE to remove the last track segment.
5. Press TAB to define the line width (6mil) and check the layer in the Line Constraints dialog. 6. Move the mouse until it is over the other end of the arc, then click again to define the other end of the line. Note: During line placement you can cycle through the different line corner modes by pressing the SHIFT + SPACEBAR key combination. 7. To exit line placement mode, right-click or press ESC.
Figure 45. Placed arc, using the electrical grid to snap to the arc end when starting the line, the completed overlay.
32
33
Figure 47. Update the net name on unnamed footprint primitives in the Configure Physical Nets dialog.
Figure 48. TO-3 footprint showing two pads with a designator of 3, on the same net
34
Note: Manually placed solder mask definitions are automatically transferred when the component is placed on the bottom of the board.
Figure 49. Printed push button footprint, designed by placing pads, lines and arcs.
35
Creating Library Components Displaying the masks To check the solder and/or paste masks have been automatically defined in the PCB Library Editor, we will turn on the Top Solder layer and examine the contents. 1. To make the mask layers visible, open the View Configurations dialog (Tools Board Layers & Colors [shortcut: L]) and enable the Show option for each mask layer then click OK. 2. Now click on the layer tab, eg. Top Solder, at the bottom of the design window to view the top solder mask, as shown in Figure 50. Note: The ring that appears around the edge of each pad in the color of the Top Solder Mask layer represents the edge of the solder mask shape protruding by the expansion amount from under the multilayer pad (because multilayer is at the top of the layer drawing order, it is drawn on top. The layer drawing order is set through the PCB Editor Display page of the Preferences dialog). Setting mask expansions by design rules To set the mask expansions in the design rules: 1. Confirm that the Expansion value from rules option is enabled in the Paste Mask Expansion and/or Solder Mask Expansion sections of the Pad dialog. 2. With a PCB open (you can simply create a temporary new PCB file if you do not have a PCB open) select Design Rules from the PCB Editor menus and examine the Mask category design rules in the PCB Rules and Constraints Editor dialog. These rules will be obeyed when the footprint is placed in the PCB. Note: The rule system is hierarchical, you can define a higher priority rule to selectively override the general rule that applies to the entire board, if required. Manually specifying mask expansions To override the expansion design rules and specify a mask expansion as a pad attribute: 1. Select Specify expansion value in the Paste Mask Expansion and/or Solder Mask Expansion sections of the Pad dialog. 2. Type the required value(s) and click OK. Save the footprint.
36
Creating Library Components .Comment special string). To cater for your assembly house you would place the .Designator string on a mechanical layer in the library editor, and then generate a printout that included this layer. If you need this feature, you would: 1. Display the required mechanical layer by enabling the Show and Enable options for each mechanical layer in the View Configurations dialog (Tools Board Layers & Colors). 2. Click on the Mechanical layer tab at the bottom of the design window to activate this layer. The tab will be highlighted and all new text will be placed on this layer. 3. Select Place String [shortcut: P, S] or click on the Place String button . 4. Press the TAB key to display the String dialog, where you can type in the text string and define its properties, eg. font, size and layer etc, before you place the text. Select .Designator from the Text list. Set Height to 40mil and Width to 6mil and click OK. The bottom left corner of the actual designator will be located where the dot in the .Designator string is located. 5. Now we can place the text string. Press the SPACEBAR to rotate the text string, position it in the required location, and click to place it. Right-click or press ESC to exit string placement mode. 6. If required place the .Comment special string using the same procedure. 7. To test the special strings, place the footprint on a PCB. You can place the footprint by right-clicking on its name in the PCB Library panel and selecting Place (assuming there is a PCB open). If the designator is not displaying when the footprint is placed in the PCB document, make sure that the Convert Special Strings option is selected in the View Options page of the View Configurations dialog in the PCB Editor.
Using this approach you select a suitable mechanical layer to include the glue dot (or other special requirement), and define its shape using the available objects. When you place that footprint onto a board you must set up the layer pairing, this instructs the software which layer it must transfer objects to when this component is flipped to the other side of the board. Note: You cannot define layer pairs in the PCB Library Editor, this is done in the PCB Editor.
37
38
2. Press L to open the View Configurations dialog and confirm that a suitable mechanical layer is enabled to place the 3D body objects on. Note: 3D body objects must flip to the other side of the board when the component is flipped. This means you will need to define a layer pair in the PCB Editor, as discussed in the section Handling special layer-specific requirements such as glue dots. Close the dialog to return to the PCB Library Editor workspace. 3. Click on the layer tab of the mechanical layer you have chosen for body objects, to make it the active layer. 4. Select Place Place 3D Body [shortcut: P, B]. The cursor changes to a crosshair and allows you to place a 3D body object in much the same way as you would a region or polygon pour. 5. Click to define the vertices of the 3D body shape (a rectangle that encloses all the pads, for example). The 3D body object displays as a hatched shape in the color of its mechanical layer (Figure 53). Right-click or press ESC to complete placement of the body. While defining the shape, use SHIFT + SPACEBAR to cycle through various corner modes. Modes available are: any angle, 45, 45 with arc, 90 and 90 with arc. Arcs can be increased or decreased in radius using SHIFT + . (period or full stop) or SHIFT + , (comma) respectively. Use SPACEBAR to toggle the direction of the corner. When a 3D body object is selected, editing handles are displayed at each vertex. When the cursor changes to over a handle, left-click and drag to move the vertex. When this cursor appears over the middle of an edge, leftclick & drag to add a vertex to that edge and move it. When the cursor changes to body.
Figure 53 DIP-14 footprint with 3D body on layer Mechanical1.
over an object edge, left-click & drag to move that edge of the 3D
When the cursor changes to over the object, left-click and drag to move the 3D body. The 3D body can be rotated or flipped while dragging. Use the editing controls to adjust the shape of the 3D body until you are happy. Use the BACKSPACE key while in placement mode, to remove the last placed vertex point. Repeatedly use this key to 'unwind' the outline for the polygon, right back to the initial starting point.
39
Creating Library Components This shape would be suitable for collision detection by the Component Clearance design rule, but may not be precise enough for a 3D visualization. You can design and add 3D body objects to add further detail to the component. 6. At the moment, the 3D body is still a two dimensional shape without any 3D features. Double-click the 3D body object or right-click and select Properties from the pop-up menu to open the 3D Body dialog. In this dialog you can set various properties for the 3D body that determine how it is rendered in 3D. 7. Adjust the Overall Height (the distance from the board to the topside of the 3D body) to 200mil and Standoff Height (distance from the board to the underside of the 3D body) to 0mil; set the 3D Color to a suitable color. Leave the Body Projection (which side of the board the 3D body should project vertically) as Top Side. Click OK to close the dialog. Note: You can enter a negative standoff height for components that protrude through the PCB, such as pins. Standoff heights are not checked by the Design Rules Checker. 8. To view the 3D body in 3D at any time, press 3 to enter 3D viewing mode. If you cannot see the 3D body, press L to open the View Configurations dialog and enable the Show Simple 3D Bodies option on the Physical Materials page. To return to 2D mode, press 2. 9. Save the PCB library. Interactively creating 3D bodies Interactively creating 3D body objects from a footprint is very similar to the manual method. The basic difference is using Altium Designer to detect closed shapes that can be used to extrude into 3D bodies from the existing objects that comprise the footprint details. This is accomplished through the 3D Body Manager dialog. Note: Only closed polygons will create 3D body objects. We will use the 3D Body Manager for dialog to define a 3D body for the transistor package, TO-39. Using this approach is much easier than attempting to define the shape manually, because of the curved shape and orientation tab of the package body. To use the 3D Body Manager dialog: 1. Make the TO-39 footprint the active footprint in the library. 2. Select Tools Manage 3D Bodies for Current Component. The 3D Body Manager for component: TO-39 dialog appears.
40
Figure 55. Use the 3D Body Manager for dialog to quickly create 3D body objects based on existing primitives.
3. To create a shape that follows the outline defined on the component overlay we will use the second option that appears in the list, Polygonal shape created from primitives on TopOverlay. For this row in the dialog, click Add to (component_name) in the Action column, set the Registration Layer to the mechanical layer that the body object should be placed on (Mechanical1 in this case), set the Overall Height to a suitable value, eg. 180mil, and set the Body 3D Color to a suitable color, as shown in Figure 55. Scroll through the list to select any closed polygons that you want to use to define the component model. 4. Click Close and the 3D body shape will appear on the component, as shown in Figure 56. Save the library. Figure 57 shows a completed 3D model for TO-39. This model consists of five 3D body objects: one for the base, which was created from the footprint outline (overall height 50mil, standoff height 0mil, Body 3D color in gray) one for the body of the casing, which was created by placing a circle and then taking the closed polygon from it as detected by the 3D Body Manager dialog and given the following properties - overall height 180mil, standoff height 0mil, body color gray one for the pins, which was created also by placing a circle (overall height 0mil, standoff height -450mil, body color in gold). This was then copied, pasted and positioned twice to make up the remaining pins.
41
Creating Library Components To edit any 3D body object, left-click on it to select it then right-click and select Properties from the pop-up menu to open the 3D Body dialog (Figure 54). You can also use the PCBLib List panel (Figure 58) to list 3D body elements and edit them directly.
Refer to the 3D Body section in the PCB Editor and Object Reference document for further details on 3D body objects.
42
Creating Library Components 4. Select a reference point on the STEP model by left-clicking at the desired location. Right-click or press ESC to exit snap point placement mode. Snap points leave a marker behind on the model for reference. Press SPACEBAR whilst selecting snap points to enter Mid-point mode in this mode, the snap point will be placed at the mid-point position between the last two selected vertices. 5. Select Tools STEP 3D Body Placement Position STEP Model. 6. Click the STEP model, the cursor changes to the 3D positional cursor that will snap to any snap points on the model. 7. Left-click at the required snap point to select it the cursor changes to two blue cones. 8. Position the cursor at the target position and left-click the model is moved so that the reference snap point and the target point are aligned. If the cursor changes to two green triangular prisms when selecting the target position, it is snapping to the nearest multi-layer object's electrical hotspot. The Three Point Method 1. Select Tools STEP 3D Body Placement Add Snap Points From Vertices. 2. Click the STEP model, the cursor changes to the 3D positional cursor (blue, six-pointed) that will snap to various vertices on the model. 3. Select three points on the STEP model by left-clicking at each point. Right-click or press ESC to exit snap point placement mode. Snap points leave a marker behind on the model for reference. Press SPACEBAR whilst selecting snap points to enter Mid-point mode in this mode, the snap point will be placed at the mid-point position between the last two selected vertices. 4. Select Tools STEP 3D Body Placement Orient and Position STEP Model. 5. Click the STEP model, the cursor changes to the 3D positional cursor that will snap to various snap points on the model. 6. Left-click at the required snap point to select it. Select three of them. The order you select the snap points in is the order that they will be aligned with the three target positions. 7. Select three points on the footprint for the STEP model to anchor to, align with and rotate around by left-clicking at each point. If the cursor changes to two green triangular prisms when selecting target positions, it is snapping to the nearest multi-layer object's electrical hot-spot: - The first point chosen acts as the main anchor the first snap point you selected on the STEP model will be aligned precisely with this one. - The second point chosen acts as the alignment point imagine a line drawn from the main anchor point through the second point, the second snap point you selected on the STEP model will be aligned along this line. - The third point chosen defines any rotation of the STEP model rotation takes place about the alignment line created when defining the second point. Imagine a plane intersecting the three STEP model snap points as the surface of the board, that is how the model will be placed, even if it passes through the board surface. Figure 59 illustrates this technique numbers in colored circles represent the STEP model snap points and their order; numbers in white circles represent the main anchor point, alignment point and rotation point and their order. The resulting positioning and orientation of the STEP model is shown to the right. Either way, non-graphical controls are available
43
Creating Library Components in the 3D Body dialog to fine tune snap point positions so that the models can be positioned and oriented accurately.
The 3D Body Dialog Method 1. Double-click the STEP model, or right-click and select Properties from the pop-up menu, to open the 3D Body dialog. 2. In the Model region of the dialog are four fields to determine rotation of the STEP model in the X, Y and Z-axes as well as a Z-axis offset. Note: The axes may differ from that of the PCB Library Editor environment depending on the way the STEP model was created. 3. Enter a value in one of the Rotation X / Y / Z fields. 4. Enter 3D mode [shortcut: 3] and observe how the STEP model has changed position. 5. Continue to edit the STEP model orientation using these controls until the desired orientation is achieved. Figure 60, Figure 61, Figure 62 and Figure 63 show the original orientation of a STEP model and how the 3D Body dialog controls were used to correct it.
44
From here you can go on to create 3D models for all components used in this tutorial if you want. Doing this gives you the opportunity to have a detailed assembly of the PCB in Altium Designer, available at any time.
45
2. Select Reports Component Rule Check [shortcut: R, R] to open the Component Rule Check dialog. 3. Check all the boxes available and click OK. A report, named PCBlibraryfilename.err, is generated and opens in the Text Editor. Any errors will be noted. 4. Close the report to return to the PCB Library Editor.
46
For the last task in this tutorial we will now compile the Library Package to create an integrated library, creating a single file that includes the components and all their referenced models. Even if we did not want to use the integrated library, but preferred to work directly from the source library and model files, there is a strong incentive to compiling the Library Package. Doing this will perform an extensive set of checks on the components and the component-to-model relationships, as shown in Figure 65. To compile the Library Package:
1. Compile the source libraries and model files in the library package into an integrated library by selecting Project Compile Integrated Library. Any errors or warnings found during compilation are displayed in the Messages panel (View Workspace Panels System Messages). Double-click on an error in the Messages panel to view more information and jump to the component. Fix any inconsistencies in the individual source libraries at this point and recompile the integrated library. 2. A new Integrated Libraryname.INTLIB is generated, saved in the output folder nominated in the Options tab of the Project Options dialog. The new integrated library is automatically added to the installed libraries list and displays in the Libraries panel, ready to use. Note, that you can also create an integrated library from a completed project using the Design Make Integrated Library command this will first create the source libraries and then the integrated library. For more detailed information about integrated libraries, refer to the Building an Integrated Library tutorial.
47
Glossary
The following definitions are used in this tutorial. Component A component is a physical device that is placed on the board, e.g. the integrated circuit or resistor. Within these components, there may be either a single part or a set of parts that are packaged together. A 3D body is a polygonal shaped object that can be added to a footprint, on any enabled mechanical layer. It can be used to define the physical size and shape of a component in the horizontal and vertical planes, enabling more controlled component clearance checking, and better 3D visualization. 3D body objects also act as placeholders for imported STEP models in the component footprint. Unique identifiers that are used to tell one component from another in a PCB. They can alpha, numeric, or a combination of both. Pads also have unique designators that correspond to the component pin numbers. A footprint defines (or models) the space required by the component to mount it on the PCB. The footprint model of a component is stored in a PCB library. A footprint may contain pads for connecting to the pins of a device and a physical outline of the package created from track and/or arc segments on the silkscreen (overlay) layer. Device mounting features may also be included. Footprints in the PCB library have no designator or comment. They become components when placed on a PCB sheet where the designators and comments are allocated. Hidden pins Library These are pins that exist on the component but do not need to be displayed. Typically, they are power pins and can automatically be connected to a specified net. A Schematic Library is a set of components and its parts stored on individual sheets. A PCB Library contains the component footprints. Each library type has its own Editor. Integrated libraries combine schematic libraries with their related models and cannot be edited directly by the Library Editors. Any individual item that can be placed in the Library Editor workspace. Pad objects are normally used in a footprint to create connection pads for component pins. A collection of graphical objects represents one part of a multi-device component. Parts are stored in separate sheets within components in the schematic component libraries. Component pins give a component its electrical properties and define connection points on the component.
3D body
Designators
Footprint
Pins
48
Revision History
Date 09-Dec-2003 24-Nov-2004 23-Aug-2005 Version No. 1.0 1.1 1.2 Revision New product release Updated for DXP 2004 SP2. Revised and updated for Altium Designer SP4. Component bodies included. 12-Dec-2005 9-Jun-2006 1.3 1.4 Path references updated for Altium Designer 6 Updated for Altium Designer 6.3 in regards to new pad hole kinds and updated Pad properties dialog. 12-Sep-2006 05-Jan-2007 1.5 1.6 Reference to the IPC Footprint Wizard added. Amended order of parameter entries in table under Component Links section. 12 Nov-2007 21-Dec-2007 22-Jan-2008 29-Jan-2008 12-Feb-2008 1.7 1.8 1.9 2.0 2.1 Updated for Altium Designer 6.8 Updated for 6.9. Added detailed STEP model import/orientation for 6.9 Removed incorrect document reference. Changed component body references to 3D body.
Software, hardware, documentation and related materials: Copyright 2008 Altium Limited. All rights reserved. You are permitted to print this document provided that (1) the use of such is for personal use only and will not be copied or posted on any network computer or broadcast in any media, and (2) no modifications of the document is made. Unauthorized duplication, in whole or part, of this document by any means, mechanical or electronic, including translation into another language, except for brief excerpts in published reviews, is prohibited without the express written permission of Altium Limited. Unauthorized duplication of this work may also be prohibited by local statute. Violators may be subject to both criminal and civil penalties, including fines and/or imprisonment. Altium, Altium Designer, Board Insight, CAMtastic, CircuitStudio, Design Explorer, DXP, LiveDesign, NanoBoard, NanoTalk, Nexar, nVisage, P-CAD, Protel, SimCode, Situs, TASKING, and Topological Autorouting and their respective logos are trademarks or registered trademarks of Altium Limited or its subsidiaries. All other registered or unregistered trademarks referenced herein are the property of their respective owners and no trademark rights to the same are claimed.
49