Generate Gerber files in Eagle

Posted by

Introduction

Gerber files are the standard format used by PCB manufacturers for producing printed circuit boards (PCBs). They contain information about the copper layers, solder mask, silkscreen legend, drill holes, etc. needed to fabricate the PCB.

Eagle is a popular PCB design software that allows designers to easily generate Gerber files. This comprehensive guide will walk you through the entire process of generating Gerber files in Eagle, from creating your PCB layout to exporting the files. We’ll also cover some tips and best practices when it comes to generating error-free Gerber files that manufacturers can use.

Creating the PCB Layout in Eagle

The first step is of course to design your PCB layout in Eagle. Here are some things to keep in mind:<h3>Use the Right Design Rules</h3>

Set your design rules in Eagle according to the capabilities of your PCB manufacturer. This includes things like:

  • Minimum trace width and spacing
  • Minimum via diameter and hole size
  • Minimum annular ring for vias
  • Minimum clearance between copper and board edge

Using the right design rules from the start will ensure your PCB can be manufactured correctly.<h3>Create Layers Properly</h3>

Use the right number of copper layers (Top, Bottom, etc.) and create other necessary layers like keepout layers. Name your layers appropriately.<h3>Follow Good Layout Practices</h3>

  • Use 45-degree angles for traces whenever possible
  • Avoid acute angles less than 60 degrees
  • Minimize the use of vias
  • Place components with care to minimize wire length
  • Use planes/polygons for ground and power nets

This will result in a neat, manufacturable layout.

Perform Design Rule Check

Before generating Gerber files, always run the Design Rule Check (DRC). The DRC checks your PCB against the design rules and highlights any errors or violations. Fix all errors shown by the DRC.

Generating Gerber Files

Once your PCB layout is complete and DRC error-free, you are ready to generate the Gerber files. Here are the steps:<h3>1. Create a New Gerber Job</h3>

Go to File > CAM Processor. This opens up the CAM editor. Click File > New > Gerber job. Give it a meaningful name.<h3>2. Select Layer Information</h3>

In the CAM editor, you will see a table listing all the layers in your PCB layout. For each layer, select whether you want it to be output as part of the Gerber job.

Some typical mappings are:

  • Top copper layer -> GTOL
  • Bottom copper layer -> GBL
  • Bottom soldermask -> GBSL
  • Top soldermask -> GTL
  • Bottom silkscreen -> GBO
  • Top silkscreen -> GTO
  • Board outline -> GKO
  • Drill holes -> Excellon NC Drill Files

You can use custom file extensions as well.<h3>3. Set Output Locations</h3>

Specify the output folder where you want the Gerber files to be saved. Make sure to select a unique folder for each project to avoid overwriting files.<h3>4. Generate Files</h3>

When you have finished selecting layers and set the output folder, click on the Generate button. Eagle will now generate all the specified Gerber files.<h3>5. Review Files</h3>

Carefully review each generated Gerber file before sending to your PCB manufacturer. Check for:

  • Completeness: All required layers should be present
  • Correct information: Verify part numbers, reference designators, etc.
  • Proper extensions: File extensions should match the layer type

Also view the overall layers together in your Gerber viewer to catch any potential problems.

Zip and Send Gerber Files

Collect all the Gerber files and compress them into a single ZIP file. Make sure to include any additional files like:

  • Drill/hole files
  • BOM file
  • Readme text file with notes
  • Position file if required by your manufacturer

Send this ZIP file to your PCB manufacturer. Confirm what format or method they prefer for receiving files. Some typical options are uploading via FTP, email, cloud drives, etc.

Tips for Generating Better Gerber Files

Follow these tips when generating Gerber files in Eagle to minimize errors:<h3>Use Layer Transparency</h3>

Set your layers to be transparent so you can see through outer layers to inner ones. This helps catch any issues between layers.<h3>Generate a PDF</h3>

Also generate a PDF of your PCB layout before Gerber files. Review the PDF thoroughly as a visual validation.<h3>Use Unique File Names</h3>

File names should be unique to avoid overwriting old files. You can incorporate the project name and date.<h3>Check Polarity Markings</h3>

Verify polarity markings are present on polarized components and oriented correctly.<h3>Include Panel Information</h3>

If your PCB will be panelized, include panel drawings, border, tooling holes, etc. in the Gerber layers.

Following these best practices will help you create accurate Gerber files that ensure a smooth PCB manufacturing process.

Frequently Asked Questions

<h3>What version of Eagle should I use to generate Gerber files?</h3>

The latest version of Eagle is recommended as it contains the most up-to-date features and fixes. However, most versions from Eagle 7 onwards should support Gerber file generation adequately.<h3>How do I know if my Gerber files are valid?</h3>

Use a Gerber file viewer like the free ViewMate to inspect your files. Check for issues like missing copper or soldermask, incorrect drill sizes, etc. Your PCB manufacturer will also validate your files.<h3>What is the most common issue with DIY Gerber files?</h3>

Incorrect layer mapping is a common mistake. For example, swapping the top and bottom copper layers will result in unusable Gerber files. Always double check layer assignments.<h3>Can I generate Gerber files for only a portion of the PCB?</h3>

Yes, you can use the CAM editor to select a region of the PCB layout to output to Gerber files. This is useful for generating plots of specific sections.<h3>How can I reduce Gerber file size?</h3>

Enable the “Remove Empty Areas” option when generating Gerbers. Avoid copper pours and use higher compression if your manufacturer allows that. Keep file names short.

Conclusion

Generating Gerber files is a critical step that determines the manufacturability of your PCB design. Following the steps outlined in this guide – using the right design rules, layer mappings, and output settings in Eagle – will enable you to produce accurate and error-free Gerber files. Reviewing the files thoroughly and communicating effectively with your PCB manufacturer is also key. Applying the best practices highlighted will help streamline the fabrication of your printed circuit board.