| FreePCB User Guide | Version 1.2

PREV | Table of Contents | NEXT

5. PCB Layout (continued)

5.11 Parts

5.111 The Anatomy of a Part

Every PCB will include one or more parts. Each part contains the following elements:

- reference designator, such as "U1" - This is usually assigned in a schematic diagram, and must be unique.
- package identifier, such as "DIP14" - Parts come in various physical packages, and the PCB designer must know which package will be used for each part, because this will determine the footprint for the part in the PCB layout.
- pins - The electrical terminals of a part are called pins, even when they are non-pin terminals such as wire leads, tabs, etc. Pins are identified by a name (which is usually a number) which is appended to the reference designator, such as "U1.4" for pin four on part U1. The way pins are named will depend on the package. All pins must be named, even interchangeable pins such as the leads on a resistor.
- mounting holes - Mounting holes may be used to attach parts to a PCB. A fastener such as a machine screw may be passed through the hole, or the part may have built-in fasteners such as press-fit posts or solder tabs. Mounting holes may be insulated, or may have pads and be plated-through. It is not unusual to use a plated-through mounting hole to make an electrical connection to a part, such as a ground connection to a connector shield. Therefore, FreePCB treats all mounting holes as pins. The pin names assigned to mounting holes are usually numbers that are higher than the numbers used for conventional pins. For example, a 9-pin D-SUB connector with 2 mounting holes would have pin numbers 10 and 11 assigned to the mounting holes.
- footprint - This is the pattern of copper pads and other elements which will become part of the PCB layout.

Actually, when we use the term "part" during PCB layout, we are usually referring to the part's footprint, because this is what we are working with in the layout. The actual part is the electronic component which will be soldered to the footprint when the PCB is assembled.

Footprints have the following elements:

- pads - These are the copper elements to which pins will be soldered. There are two types:
  - Through-hole pads have a hole drilled through them so that the pin can be passed through the hole before soldering. For a through-hole pad on a multilayer board, there is usually a pad on each copper layer, connected together by plating the hole with copper. This arrangement is called a padstack. Through-hole pads are usually round or square. A common arrangement is to use a square pad for pin 1 and round pads for the rest of the pins.
  - Surface-mount pads do not have a hole, and are only on one layer. Nevertheless, they are still represented by a padstack, although it is a pretty simple one with only one pad. Surface-mount pads are almost always rectangular.
- part outline - This is a graphical representation of the part on the silk-screen layer.
- reference text - This is a text string for the reference designator on the silk-screen layer.
- other text - Text strings such as pin numbers, etc. can be added to the silk-screen layer.
- selection rectangle - This is invisible until the part is selected, then it is shown in the selection layer color (usually white). It determines the boundary of the part for selection purposes.
- origin - This is an invisible point which serves as the origin for the internal coordinate system of the footprint. When a footprint is created, the position of each element will be specified relative to the origin. When a footprint is dragged during editing, it will be "attached" to the cursor at the origin. When the position of a part is reported in the status bar or in dialogs, it is actually the position of the origin which is reported. The center of pin 1 is often used as the origin.

Some typical footprints are shown below.

In the screenshot above, U1 is an IC in a 20-pin DIP package, with though-hole pins. It has been placed on the top (or component) side of the board, so the silk-screen elements of the footprint are on the top silk-screen layer. It has been selected for editing, so its selection rectangle is visible. Since the top copper layer is the active routing layer, its top pads are shown in the color for the top copper layer.

U2 is an IC in a 20-pin surface-mount PLCC package, also on the top side of the board. Its pads are drawn in the color for the top copper layer. C10 is a surface-mount capacitor in a chip package. R12 is a surface-mount resistor in a different chip package, on the bottom (or solder) side of the PCB. Its pads are drawn in the color of the bottom copper layer and its silk-screen elements are drawn on the bottom silk-screen layer. Also, its reference text is drawn as a mirror-image, so that it will be readable from the bottom of the board.

5.112 The Partlist

In FreePCB, all of the parts in a project are contained in a data structure called the partlist, which is empty when the project is first created. Normally, parts are added to the partlist by importing a netlist file from a schematic editor. This will be covered in Section 5.14: Importing Netlist Files. You can view or edit the partlist by selecting Parts... from the Project menu, which pops up the View/Edit Part List dialog, as shown below.

Each part in the project is listed by reference designator, package and footprint. Individual parts can be selected from the list by clicking on them, or multiple parts can be selected by clicking with the Ctrl key held down. The partlist can be modified using the Add New Part, Edit Selection, and Delete Selection(s) buttons. These will be described in the following sections.

Important Note: You should be careful when modifying the partlist, for two reasons.

- If you are working from a schematic, editing the partlist can introduce discrepancies between the schematic and the PCB. This should not be a problem if you are just assigning footprints, but could be very confusing if you add or delete parts or change reference designators. If you do make any changes like these, you should back-annotate the schematic to reflect them.
- Once you click OK in the View/Edit Part List dialog, the changes that you made CANNOT be undone with the Undo function from the Edit menu. Therefore, you should probably save a copy of your project beforehand.

5.113 Editing Parts

Parts can be added, deleted or modified from either the View/Edit Part List dialog (shown above) or the layout window, using the methods described below.

- New parts can be added to the partlist using either the Part selection from the Add menu, or the Add New Part button in the View/Edit Part List dialog. Either method pops up the Add/Edit Part dialog, shown below

  - A new part is created by entering a reference designator into the Reference field, and selecting a footprint from the large tree control which occupies the left side of the dialog. This control contains a list of all of the files in the selected library folder. You can change library folders using the Browse... button. There is also an entry for "local cache", which contains all of the footprints which are already loaded into the project. You can expand a library by clicking on the "+" next to it. In the example above, the library C: \FreePCB\lib\sm_plcc.fpl has been expanded. The footprint "LCC-24" has been selected and is shown in the preview pane. Its name has been automatically entered into the Footprint field of the dialog. Alternatively, you can just type the footprint name directly into this field.
  - If you leave the Position radio button set to Drag to position, you will be dragging the new part when you click OK. If you want to position the part explicitly, you can use the Set position radio button and the X, Y, Angle and Side fields in the Position box. Then when you click OK, the new part will be placed at the position that you set. If you select Off-board, the part will be placed to the left of the origin.

- Parts can be deleted or edited from the layout window by selecting them, and using the function-key or context menus. With a part selected, the following menu items are available:
  - F1 ("Edit Part") - this pops up the same Add/Edit Part dialog which was shown previously, except that the Reference and Footprint fields are filled-in. You can use this dialog to change the footprint or position of the part.
  - F3 ("Glue Part") - this "glues" a part in place so that it cannot be accidentally moved without "ungluing" it. For a part which is already glued, this command changes to "Unglue Part".
  - F4 ("Move Part") - this is the most commonly used command. It initiates dragging the part with the cursor. Then left-click to "drop" the part at a new position. While dragging, the following function-keys are active:
    - F2 ("Change Side") - flip the part from the top side to the bottom or vice-versa
    - F3 ("Rotate Part") - perform a 90 degree clockwise rotation of the part
  - F7 ("Delete part") - this deletes the part from the partlist. You will be asked if you also wish to delete all references to the part from the netlist. Normally you would answer "Yes" unless you think that you might add the part back at a later time.
  - F8 ("Recalc. Ratlines") - this recalculates the ratlines for all nets connected to the part, to minimize their total length. By default, this command is executed automatically each time a part is moved.

- Parts may also be deleted or edited from View/Edit Part List dialog, as follows.
  - You can delete one or more parts from the list by clicking on them (holding the Ctrl key down for multiple selections), and then click the Delete Selection(s) button. References to the part(s) will NOT be removed from the netlist.
  - A single part can be edited using the Edit Selection button, which pops up the Add/Edit Part dialog, which was shown earlier. The main reason for using the View/Edit Part List dialog to edit parts, instead of just selecting them in the layout window and using the function key menu, is to assign footprints to parts which don't already have them. A part without a footprint can't be displayed, so it can't be selected in the layout window. This situation often arises when importing netlist files, as discussed in Section 5.14: Importing Netlist Files.

5.114 Moving or Resizing the Reference Designator

The reference designator for a part may be moved by selecting it and pressing F4 ("Move Ref Tex"). Then you can drag it to a new position. While dragging, it can be rotated 90 degrees clockwise by pressing F3 ("Rotate Ref Text").

You can change the size of the text string by selecting it and pressing F1 ("Set Size"). This pops up the dialog shown below. You can change the character height and the stroke width. If you select Use default for height, the stroke width will automatically be set to 1/10 of the height.

5.115 Making the Reference Designator Invisible

If you set the character height of the reference text to "0", the reference designator will become invisible. To make it visible again, select the part and right-click, then select Set Ref. Text Size from the context menu that pops up. Then set the character height to a non-zero value.

PREV | Table of Contents | NEXT