| FreePCB User Guide | Version 1.2

PREV | Table of Contents | NEXT

5. PCB Layout (continued)

5.19 Exporting Drill and Gerber Files

5.191 Creating Files

The final step in creating a PCB layout is to export the files that the board house will use to produce your boards. These files are described below.

- Gerber files - These files are used to create the photoplots that will be used to make the copper layers, silk-screens and masks for the PCB. There is one file for each layer or mask. The format is extended Gerber RS274X.

- Drill file - This will be used by the machine that drills the holes in the PCB. It uses Excellon format, which is the industry standard. Basically, it starts with a list of drill sizes (in inches), and then gives the coordinates of the center of each hole. There is an important issue regarding drill sizes, which is discussed in Section 5.193: Drill Sizes. Please read this section before you send your files to the PCB house for fabrication.

To export drill and Gerber files, select Generate CAM files... from the File menu. The following dialog will pop up.

In the Files section, select the files that you want to generate by checking or unchecking the boxes next to each one.

The Gerber file options section allows you to select or deselect the following options:

- Include board outline - check this box to include the board outline in all Gerbers
- Add moires - add moire symbols (sometimes called "targets") for layer registration
- Add layer description text - add a text string to each Gerber file indicating the layer that it represents
- Add pilot holes to pads and vias - add a pilot hole to through-hole pads and vias on the top and bottom layers, to aid in drilling
- Use thermal reliefs for pins - when connecting through-hole pins to internal copper layers, use a thermal relief
- Use thermal reliefs for vias - when connecting stub traces to internal copper layers with vias, use a thermal relief
- Make cutouts in solder masks for vias - create openings in the solder masks around via pads

The Gerber file dimensions section allows you to set values for the following:

- Copper to copper-fill clea rance - is the clearance that FreePCB will create around traces or vias that pass through copper layers.
- Hole-edge to copper-f ill clearance - is the clearance that will be created around drill holes. Please refer to Section 5.194: Drill Clearances for an important note about these clearances.
- Solder mask clearance - the space that FreePCB will provide around pads in the solder masks.
- Pilot hole diameter - the diameter of the pilot holes, if you selected them.
- Minimum silkscreen stroke width - the minimum stroke width that FreePCB will use for the silkscreen layers, which is usually recommended by the board house.
- Thermal relief line width - the width of the lines that will be used to connect pads or vias to copper fill areas using thermal reliefs.
- Board outline line width - the width of the board outline, if used.
- Annular ring width (pins) and Annular ring width (vias) - the width of annular copper rings placed around inner layer pin and via holes with thermal relief connections to copper areas.

When you click Create Files, the files will be written to the Output folder. By default, this is a subfolder of the project folder called CAM. It will be created if it doesn't already exist. You can change it if you want.

Assuming that all goes well, you will see the following Log dialog, with "*** SUCCESS ***" as the final line. If errors occur, there will be messages in the log. If an error occurs while creating a file, FreePCB will usually abort that file and go on to the next file. Each file is named according to its content, such as top_copper.grb or drill_file.drl.

Click OK to dismiss the log.

When you are finished creating files, click Exit in the Generate Gerber and Drill Files dialog.

5.192 Viewing and Printing Files

There are a number of free programs that let you view Gerber and drill files. Before sending your files to a board house, I would STRONGLY suggest that you check them with one of these programs. I have been using ViewMate by PentaLogix (formerly Lavenir). You can download this at www.pentalogix.com/Download/download.html. ViewMate lets you view both Gerber and drill files, and also lets you make check-plots by printing them to a Windows printer. Since the printing functions in FreePCB are not yet implemented, this is currently the only way to print your designs.

An example of a FreePCB Gerber file as displayed by ViewMate is shown below. This Gerber file includes the board outline, moirés and layer description text ("Top Copper Layer").

5.193 Drill Sizes

The drill file specifies the size and position of each hole in the PCB. An issue that arises with these files is whether the hole size refers to the actual drill bit size (in which case the final diameter of the hole will be a few mils smaller after plating) or the finish size (or plated size) which is the final hole size after plating. To me, it makes more sense to specify the finish size and let the board house figure out which drill bit to use, since they know how thick their plating will be. FreePCB footprints use finish sizes, so these are the sizes which appear in the drill file.

You MUST check with your board house, however, as some of them expect actual bit sizes, which must be larger than the finish size. In this case, you may have to edit the drill file and increase the drill sizes appropriately. Your board house should be able to help with this, as long as they know what you want.

A sample FreePCB drill file is shown in the listing below.

`;Holesize 1 = 24.0 PLATED MILS
;Holesize 2 = 18.0 PLATED MILS
;Holesize 3 = 14.0 PLATED MILS
M48
INCH
T01C0.024
T02C0.018
T03C0.014
%
G05
G90
T01
X028000Y018000
X029000Y018000
X028000Y017000
X023000Y010000
X023000Y011000
X023000Y012000
T02
X012000Y017000
X006000Y012000
X012000Y012800
X024000Y011000
X024200Y009000
X024200Y005000
X024000Y003000
T03
X019000Y010000
M30`

`
` Lines that begin with ";" are comments. Each different hole size is described in a comment, such as
`;Holesize 1 = 24.0 PLATED MILS
` which indicates a hole diameter of 24 mils, after plating. The line
`T01C0.024
` is the actual instruction to the machine that establishes the drill size, in inches.

If you need to change a drill size to allow for plating, you should change both the comment and the instruction. For example, to use a 28 mil bit instead of a 24 mil bit, change the comment to
`;Holesize 1 = 28.0 UNPLATED MILS
` and the instruction to
`T01C0.028`

Some board houses will ask for a separate text file which lists the drill sizes. You can tell them to look at the comments at the beginning of the drill file, or you can copy these into a separate file.

5.194 Drill Clearances

Board houses will often recommend a "drill clearance". This is the minimum recommended size of clearance holes in inner layer copper that should be created around drill holes, to allow safe passage of the hole without shorting. Typically, they will specify something like "drill diameter plus 0.025 inches". This refers to the DIAMETER of the clearance hole. FreePCB uses the Hole-edge to c opper-fill clearance value to create these clearances. However, because FreePCB treats this clearance as the distance between the edge of the hole and the edge of the copper, it will be the difference in RADIUS between the holes, which is half of the difference in diameter. Therefore, to create a drill clearance of "drill diameter plus 0.025 inches", you should use a Hole-edge to c opper- fill clearance of one half of 0.025 inches, or 12.5 mils. This would be rounded up to 13 mils.

PREV | Table of Contents | NEXT