Eagle DRC and Gerber Files

Posted by

What are Gerber Files?

Gerber files are the standard file format used in the printed circuit board (PCB) industry to describe the printed circuit board images (copper layers, solder mask, legend, etc.) in an electronic format. Gerber files are ASCII vector format files used by PCB fabrication houses to determine the copper areas, drill holes and other features of the PCB.

Gerber files were originally developed by the Gerber Systems Corp., a division of Gerber Scientific, founded by Joseph Gerber. The Gerber file format has become the de facto standard used by PCB fabrication houses.

Advantages of Gerber Files

Some of the key advantages of using Gerber files for PCB fabrication include:

  • Universally accepted standard in the PCB industry
  • ASCII vector format allows efficient description of copper and other PCB layers
  • Supported by all major PCB design CAD packages
  • Compact file size compared to image formats like TIFF or BMP
  • Can precisely describe features like complex pad shapes and custom apertures

Creating Gerber Files in Eagle

Eagle is a popular PCB design software package developed by Autodesk. Eagle provides an integrated environment for schematic capture, PCB layout, and generation of manufacturing files like Gerber files.

Eagle CAM Processor

To generate Gerber files in Eagle, you use the CAM Processor. The CAM (Computer Aided Manufacturing) Processor allows you to select which layers of the PCB you want to export as Gerber files.

To open the CAM Processor in Eagle:

  1. Open the PCB layout (.brd file) for which you want to generate Gerbers
  2. Select File -> CAM Processor from the menu

This will open the CAM Processor window.

Selecting Gerber File Layers

In the CAM Processor window, you need to select the layers you want to export as Gerber files. The standard Gerber files required for PCB fabrication are:

Layer Description
Top Copper Copper traces and pads on top layer
Bottom Copper Copper traces and pads on bottom layer
Top Silkscreen Silkscreen legend on top layer
Bottom Silkscreen Silkscreen legend on bottom layer
Top Solder Mask Solder mask on top layer
Bottom Solder Mask Solder mask on bottom layer
Drill Files NC drill files for holes and vias

To select which layers to export in Eagle CAM Processor:

  1. Click the “Add” button below the “CAM Processor Job” list to create a new job
  2. Enter a name for the job, e.g. “Gerbers”
  3. In the “Output:” dropdown, select “Gerber RS-274X”
  4. Click the “Layers” button to open the layer selection dialog
  5. Check the boxes for the layers you want to export, e.g. Top, Bottom, Pads, Vias, Dimension, tPlace, bPlace, tStop, bStop
  6. Click “Add” to add the selected layers to the job
  7. Repeat steps 4-6 for any additional layers like solder mask, paste mask, etc.

Setting Gerber Options

Once you have selected the layers to export, you need to configure the options for each Gerber file.

To configure the Gerber file options:

  1. Select the Gerber file in the “CAM Processor Job” list
  2. Click the “Wheel” button to open the CAM Processor Gerber properties dialog
  3. Configure the Gerber options as desired, for example:
    • Set the output resolution (e.g. 4.6, 4.5)
    • Select the aperture table file (if needed)
    • Enter the file extension for the Gerber file (e.g. GTL for Top Layer)
  4. Click “OK” to apply the settings
  5. Repeat steps 1-4 for each Gerber file in the job

Here is an example of typical Gerber file extensions used:

Layer Extension
Top Copper GTL
Bottom Copper GBL
Top Silkscreen GTO
Bottom Silkscreen GBO
Top Solder Mask GTS
Bottom Solder Mask GBS
Top Paste Mask GTP
Bottom Paste Mask GBP
Drill Files TXT

Generating Drill Files

In addition to the Gerber files for the copper and mask layers, you also need to generate NC drill files to specify the location and size of holes and vias on the board.

To generate drill files in Eagle CAM Processor:

  1. Click “Add” to add a new job for NC drill files
  2. Enter a name like “Drills”
  3. In the “Output:” dropdown select “Excellon”
  4. Click “Layers” and select the Drills, Holes, and Vias layers
  5. Click “Add” to add the drill layers to the job
  6. Select the drill file in the job list and click the “Wheel” button to configure options
  7. Set the drill units, resolution, hole size limits, etc. as required
  8. Click “OK” to apply the drill file settings

Running the CAM Processor

Once you have set up all the desired Gerber and drill file jobs, you are ready to run the CAM Processor to actually generate the output files.

To process the job and generate the Gerber and drill files:

  1. Select the job to process in the “CAM Processor Job” list
  2. Click the “Process Job” button
  3. Choose the output directory where you want to save the Gerber/drill files
  4. Click “OK” to generate the files
  5. Repeat steps 1-4 for any other jobs you have set up

After generating the Gerber and drill files, it is a good idea to visually inspect them using a Gerber viewer application to check for any obvious errors. Popular free Gerber viewer applications include:

  • gerbv
  • KiCad GerbView
  • ViewMate

Running Eagle DRC

Before generating Gerber files and sending a design for fabrication, it is very important to run the Eagle DRC (Design Rule Check) to verify the PCB layout meets the design rules and constraints specified.

The DRC checks things like:

  • Minimum clearance between traces, pads, vias, etc.
  • Minimum trace width
  • Minimum drill size for vias and holes
  • Silkscreen over bare copper
  • Missing or overlapping soldermask and pastemask
  • etc.

To run DRC in Eagle:

  1. Open the PCB layout (.brd) file
  2. Select Tools -> DRC… from the menu to open the DRC dialog
  3. Click the “Load…” button to load a DRC rule file (.dru)
  4. Select the rules you want to check in the “Check:” list
  5. Set the desired Allowed or At least values for each rule
  6. Click “Check” to run the DRC
  7. The DRC errors (if any) will be listed in the DRC Errors list
  8. Double-click on an error to zoom to its location on the board

It is important to fix all DRC errors before generating Gerbers or sending the board for manufacturing. Running the DRC on the PCB layout will help ensure the design is manufacturable and will not have any unexpected issues during fabrication.

Common DRC Errors and Resolutions

Here are some of the most common DRC errors encountered in Eagle PCB layouts and how to resolve them:

DRC Error Description Resolution
Clearance Copper features too close together Move features further apart or reduce copper widths
Width Trace or copper feature too narrow Increase trace width or copper pour width
Drill Drill size too small Increase hole drill size
Masks Soldermask or pastemask openings too small Increase mask opening sizes
Silk Silkscreen overlaps bare copper Move silkscreen away from copper features

Fixing these common DRC errors will help ensure your Eagle PCB layout is ready for fabrication.

Frequently Asked Questions

Q: What file format should I use to send Gerber files to a PCB manufacturer?
A: Gerber RS-274X is the current standard Gerber file format to use. Older formats like RS-274D are obsolete. Always use RS-274X format when generating Gerbers in Eagle CAM Processor.

Q: What Gerber files do I need to send to a PCB fab house?
A: At a minimum, you should send Gerbers for the top and bottom copper layers, top and bottom soldermask, top and bottom silkscreen legend, and NC drill files. If your design has extra inner copper layers, you need to send Gerbers for those too.

Q: How do I check my Gerber files before sending them for manufacturing?
A: You can use a free Gerber viewer application like gerbv, KiCad GerbView, or ViewMate to visually inspect the Gerber files and check for any obvious mistakes. Gerber viewers allow you to load all layers and check alignment, apertures, drill sizes/locations, etc.

Q: What should I do if I get DRC errors when checking my PCB layout in Eagle?
A: Carefully review each DRC error and determine what needs to be changed in the layout to resolve the error. Common resolutions are increasing clearances between features, increasing trace widths, increasing drill sizes, or moving silkscreen away from exposed copper. After making changes, re-run DRC until no errors are reported.

Q: The manufacturer says my Gerber files are missing information or are incorrect. What could be wrong?
A: Double check that you exported all the necessary layers as Gerber files. Make sure you are using the correct file extensions for each layer. Verify you included the NC drill files in addition to the Gerber files. If needed, contact your manufacturer and ask them for a list of required layer types and file extensions to use for generating your Gerbers.

Conclusion

Gerber files are a critical part of the electronics manufacturing process. Taking the time to properly set up and generate accurate Gerber files will help ensure your PCB design can be successfully fabricated.

Remember to always run a DRC check on your PCB layout in Eagle before generating Gerber files to verify the design meets manufacturability requirements.

Use Eagle CAM Processor to select the necessary layers, set up the desired Gerber options, and generate your Gerber and NC drill files. Visually inspect the Gerber files with a Gerber file viewer to check for any potential issues.

By following the steps outlined here and working closely with your PCB fabrication partner, you can successfully turn your Eagle PCB design into a professional-quality printed circuit board.

Leave a Reply

Your email address will not be published. Required fields are marked *