| FreePCB User Guide | Version 1.2

PREV | Table of Contents | NEXT

6. Footprints and Libraries (continued)

6.3 Footprint Editor

The Footprint Wizard is the easiest way to create new footprints, but it is limited to certain predefined pin patterns. There will be times when you need more flexibility in pin placement. Also, you may want to create more informative or artistic outlines for your footprints.

The Footprint Editor lets you do all of these things. It can be opened from FreePCB in several ways:

- By selecting the File > Open Footprint Editor menu item - This is available even when there is no project open in FreePCB.
- By selecting the Tools > Footprint Editor menu item - This is available only when there is an open project in FreePCB.
- By selecting a part, and pressing F2 ("Edit Footprint") - This opens the Footprint Editor with the footprint for the part already imported. When you leave the Footprint Editor, you will be asked if you wish to replace the part's original footprint with your modified one.

6.31 The Footprint Editor Window

When you open the Footprint Editor, it does not create a new window but instead replaces the usual FreePCB window. You can tell that you are in the Footprint Editor by looking at the window title bar. When you have finished editing footprints, you can return to FreePCB by pressing F8 ("Return to PCB") or selecting the File > Return to PCB Layout or Tools > Return to PCB layout menu items, or by clicking in the "Close" box in the upper right corner.

A screenshot of the Footprint Editor window is shown below, with a DIP8 footprint imported.

As you might expect, the menus in the Footprint Editor are different from the FreePCB menus. They are listed below:

- File -
  - New footprint - Start editing a new footprint..
  - Import Footprint - Import a footprint from a library file.
  - Save Footprint As - Save the footprint to a library file.
  - Return to PCB layout - Close the Footprint Editor and return to FreePCB.
- Edit -
  - Undo - Undo the last editing operation (if possible).
- View -
  - Entire footprint - Resize and recenter the window to display all of the footprint elements.
- Add -
  - Pin - Add a new pin or row of pins.
  - Polyline - Add a new polyline to the silk-screen layer.
  - Text - Add a text string
- Tools -
  - Footprint Wizard - Invoke the Footprint Wizard.
  - Make PDF from Library File - Make a PDF file describing the footprints in a library file
  - Return to PCB Layout - Same as in the File menu.
- Help -
  - About FreePCB - Display the "About Box" with the version number.

Other elements of the window such as the toolbar, layer list, function key menu, status bar and layout window are pretty much the same as for FreePCB.

6.32 Footprint Elements

A footprint consists of 4 basic elements. These are:

- Pins - these are implemented as padstacks. A padstack contains copper pads for the top, inner and bottom layers as well as an optional hole.
- Polylines - these are graphical elements on the silk-screen layer. They may be closed or open.
- Reference designator - this is a text string for the reference designator. Since the actual reference designator is a property of the part and not the footprint, the Footprint Editor uses the string "REF" as a placeholder. It is always present and cannot be deleted, but it can be resized.
- Selection box - this is a rectangle that encloses all of the other elements, used for selection of a part during PCB layout. It is generated automatically when saving the footprint.

Creating a footprint is actually very similar to laying out a PCB, so if you have used FreePCB then you already have most of the required skills. Therefore, we will take a tutorial approach to the subject. In the next few sections, we will create a footprint for a polarized capacitor. The capacitor dimensions are shown in the drawing below, taken from a Panasonic datasheet. We will create a footprint for the 12.5 mm body diameter capacitor.

6.33 Starting the new footprint

From FreePCB, invoke the Footprint Editor from the File or Tools menus. You will start with a layout window which is empty except for the origin symbol and the reference designator, as shown in the screenshot below. Since we will be using metric units, make sure that the Units are "mm".

6.34 Adding and Editing Pins

Select the Add > Pin menu item. This pops up the Add/Edit Pin dialog. The controls in this dialog are pretty much self-explanatory. Some of them will be enabled or disabled depending on the pin being added. Since we are adding the first pin, the Padstack > S ame as pin # check box is disabled because there are no other pins present.

The capacitor has leads with a diameter of 0.6 mm. For clearance, we will use a hole diameter of 0.9 mm. and pad diameters of 1.5 mm. For the first pin, we will use square pads on the top and bottom layers and a round pad on the inner layers. Select the Padstack > Through-hole radio button and set the hole diameter to 0.9 mm. Set the Top pad > Shape to "square" and the Width to 1.5 mm. The Inner pad > Shape should be "round". The Bottom pad should be the same as the Top pad. Set the Position to X = 0.0 and Y = 0.0. The dialog should look like this:

Clicking OK should result in the pad being placed at the origin.

According to the datasheet, the lead spacing is 5 mm. so we will place our second pin at X = 5.0 mm and Y = 0.0 mm. To make this easier, set the Visible and Placement grids to "1 mm". Now select Add > Pin to add the second pin.

Since there is already one pin in our footprint, the dialog will come up initialized for the second pin, with the Padstack the same as pin 1 by default. However, we should use a round pad for pin 2 instead of a square pad. Therefore, uncheck the Padstack > Same as pin # check box, and change the Padstack > Top pad > shape to "round". Then you can check Padstack > Inner pads > Same as top pad and Padstack > Bottom pad > Same as top pad to make these pads are the same as the top pad. Now the dialog should look like:

Click OK to leave the dialog and start dragging the pad. Place it at X = 5.0 mm and Y = 0.0 mm, as shown.

6.35 Adding Polylines

Now we will add some silk-screen graphics to our footprint, consisting of a part outline (a circle with about the same diameter as the body diameter of the capacitor), and a "+" to mark the positive terminal, which by convention is pin 1.

Let's start with the circle. This will be a closed polyline, with arcs for sides. Since we will need to place corners mid-way between the pins on the X-axis, set the Placement grid to "0.5 mm". Also, make sure that the Angle grid is set to "45". Then select the Add > Polyline menu item. This will pop up the Add Polyline dialog:

For the circle we need a closed polyline so make sure that the Closed button is selected, as shown above. The Line width is set to 0.254 mm (or 10 mil) by default. This is a reasonable value so you can leave it alone. Click OK to start dragging the first corner of the polyline. Place it at X = -4.0 mm, Y = 0.0 mm. While dragging the second corner, press F2 ("Arc (CW)") to change the side style to a clockwise arc. Place the second corner at X = 2.5 mm, Y = 6.5 mm. Place the third corner at X = 9.0 mm, Y = 0.0 mm and the fourth corner at X = 2.5 mm, Y = -6.5 mm. Then right-click to close the polyline. Your circle should look like:

Now let's add the "+". Select Add > Polyline, but this time make it an open polyline. Draw a vertical line by placing the first corner at X = -6.0 mm, Y = 5.0 mm and the second corner at X = -6.0 mm, Y = 1.0 mm. Then right-click to stop drawing. Add another open polyline, and draw a horizontal line by placing the first corner at X = -8.0 mm, Y = 3.0 mm and the second corner at X = -4.0 mm, Y = 3.0 mm. Now your footprint should look like:

6.36 Modifying the Reference Designator

Finally, let's move the reference designator out of our part outline. Click on it to select it, and press F4 ("Move Ref Text") to start dragging it. Move it above the part outline and place it by left-clicking. If you want to make it larger or smaller, you can press F1 ("Set Size"), and then use the Reference Text Properties dialog to change the size and stroke width as you see fit. Your final footprint should look something like:

6.37 Saving the Footprint

To save your new footprint into a library file, select the File > Save As menu item. This will pop up the Save Footprint dialog. Enter the Footprint name and (optionally) the Author, Source and a Description, as shown below. Then select the Library file that you wish to use (or enter a new filename), and click OK to save the footprint.

6.38 Importing Footprints

So far, we have described how to create a footprint from scratch. In many cases, it will be easier to start with an existing footprint and modify it. You can import a footprint into the Footprint Editor by using the F ile > Import footprint menu item. This pops up the following dialog.

From here, you can select a library folder, open library files and select footprints. You will see a preview of the selected footprint in the dialog. Click OK to import the footprint into the Footprint Editor. Then you can edit it.

6.39 Using the Footprint Wizard

You can also use the Footprint Wizard from within the Footprint Editor. Here's an example. Let's make a footprint for the PGA package shown below. This is a Kodak image sensor. The pin diameter is 18 mils, and the pin spacing is 100 mils. The pins are named as usual for a PGA.

From within the Footprint Editor, select Tools > Footprint Wizard. We will use round pads with a diameter of 50 mils, and a hole diameter of 28 mils. Since the pins are arranged in 11 columns and 11 rows, we will initially create our footprint as a matrix of 11 x 11 = 121 pins. Then we will remove the extra ones. Set up the Footprint Wizard dialog as shown below.

Click Done to create the footprint and import it into the Footprint Editor. It should look like:

Now, select each extra pin and delete it. Move the "REF" string so that it will be visible with the part in place. Your finished footprint should look like:

6.310 Making PDF Files from Libraries

If you create or modify a library file, you can make a PDF file describing the footprints in the library by selecting Tools > Make PDF from Library File... This will pop up the following dialog:

If necessary, use the Library Folder field to select a library folder. Use the Library File drop-down menu to select the file that you wish to document. To make PDF files from ALL of the library files in the folder, scroll to the bottom of the file menu and select "*** all library files ***", as shown below. You can use the Page size menu to select between letter and A4 page sizes, and the Units menu to choose the units that will be used in the PDF. Then click Make PDF file to make the file(s).

A sample page from a PDF file is shown below.

PREV | Table of Contents | NEXT