Wednesday, November 25, 2009

Easy way to create new components in Altium Designer libraries.

Citizens of the earth:

If your life is like mine, you are trying to create new components in an Altium Designer library. Here's a faster way than punching everything in manually. A lot of this could be scripted to make it even faster...
Ill use National's LP3906 dual buck controller as an example.

1. Get the pin layout from the datasheet or website

With any luck, the pin-out of your component is available electronically. The lp3906 has a pin assignment table in the datasheet pdf. Though a simple copy will work, the next step is easier using Adobe Reader's save as table feature.



2. Arrange the pin-out in a spreadsheet table

Direct from the datasheet, the data looks like this:


The copied data from the datasheet will have to be massaged to the right format for the pin import script. Here is an example of many possible pin parameters and their settings, which can be used in any column order, and need not all be specified:

(this is an example file found in C:/Program Files/Altium Designer/Examples/Scripts/Delphiscript Scripts/Sch/Import Pins/)

Note that with the ImportPins script of Altium Designer Summer 09 that I am using, the Length field does not appear to work - when it is used the length of the pins becomes zero!

This is the result of my data massaging:


If you are working with Microsoft Excel, when you save a .csv file, the fields will be separated by semicolons and you will have to open the file with a text editor and find-replace those semicolons with commas. With OpenOffice Calc, the .csv file will save with the format in which it was opened.

Be careful there are no hidden spaces in your spreadsheet because hidden spaces in the pin names will confuse Altium's correlation with the footprints!

3. Run ImportPins Script

In Altium Designer, go to DXP>Run Script... and navigate to C:/Program Files/Altium Designer/Examples/Scripts/Delphiscript Scripts/Sch/Import Pins/ImportPins.PRJSCR and select the script RunImportPins from the tree.Browse to your pin table, open it, click Update Mappings, and then Execute. Your component should then look like this:

Place a rectangle around your component, maybe sort the pins a bit, and you're done!

No comments:

Post a Comment