What are Gerber Formats

Posted by

Introduction to Gerber Formats

Gerber format is a standard file format used in the electronic industry for the design and manufacture of printed circuit boards (PCBs). It was developed by Gerber Systems Corporation, now a subsidiary of Ucamco, and has become the de facto standard for PCB design data exchange. Gerber files contain information about the layout, shape, and size of the copper traces, drill holes, and other features of a PCB.

History of Gerber Formats

The Gerber format was first introduced in the 1960s as a means of controlling photoplotter machines used in the PCB manufacturing process. The format has evolved over the years to keep pace with advancements in PCB design and manufacturing technologies. The current version of the Gerber format is known as Extended Gerber or X2 format.

Importance of Gerber Formats in PCB Design and Manufacturing

Gerber files are essential for the accurate and efficient manufacture of PCBs. They provide a standardized way of communicating PCB design data between designers, manufacturers, and assemblers. Gerber files ensure that the manufactured PCB matches the designer’s intent and meets the required specifications.

Types of Gerber Files

A complete set of Gerber files for a PCB typically includes several files, each representing a different layer or aspect of the board. The most common types of Gerber files are:

Copper Layer Files

These files define the copper traces on each layer of the PCB. They are usually named with the extension .gbr or .cmp for component side copper and .sol for solder side copper.

Solder Mask Files

Solder mask files define the areas on the PCB where solder mask should be applied. They are typically named with the extension .gbs or .stc for solder top mask and .sts or .sbc for solder bottom mask.

Silkscreen Files

Silkscreen files contain the text and graphics that will be printed on the PCB for component identification and assembly instructions. They are usually named with the extension .gbo or .plc for plated component side and .pls for plated solder side.

Drill Files

Drill files contain information about the location, size, and type of holes to be drilled in the PCB. They are typically named with the extension .drl or .txt.

Outline Files

Outline files define the shape and size of the PCB. They are usually named with the extension .gm1 or .out.

Gerber File Structure

A Gerber file consists of a sequence of commands that describe the features of the PCB. Each command is represented by an aperture definition and a set of coordinates that specify where the aperture should be used.

Aperture Definitions

An aperture is a shape used to draw a feature on the PCB. Apertures can be simple shapes like circles, rectangles, or polygons, or they can be complex shapes defined by a macro. Aperture definitions specify the shape, size, and type of each aperture used in the file.

Coordinates

Coordinates in a Gerber file are specified in inches or millimeters and represent the position of the aperture on the PCB. Coordinates can be absolute, meaning they are measured from a fixed point on the PCB, or incremental, meaning they are measured relative to the previous coordinate.

G-Code Commands

G-code commands are used to control the movement of the aperture and specify the type of operation to be performed. Some common G-code commands used in Gerber files include:

  • G01: Linear interpolation (draw a line)
  • G02: Clockwise circular interpolation (draw an arc)
  • G03: Counterclockwise circular interpolation (draw an arc)
  • G04: Comment or pause
  • G36: Start polygon area fill
  • G37: End polygon area fill
  • G54: Select aperture
  • G70: Specify units as inches
  • G71: Specify units as millimeters
  • G74: Disable 360-degree circular interpolation
  • G75: Enable 360-degree circular interpolation

Creating Gerber Files

Gerber files are typically generated by PCB design software as part of the design output process. Most PCB design tools have built-in functionality for exporting Gerber files that comply with the latest Gerber format specifications.

Best Practices for Generating Gerber Files

To ensure that your Gerber files are accurate and can be correctly interpreted by manufacturers, follow these best practices:

  1. Use the latest version of the Gerber format (currently X2)
  2. Include all necessary layers and files in your Gerber output
  3. Use a consistent naming convention for your Gerber files
  4. Specify the correct units (inches or millimeters) in your Gerber files
  5. Use a single zero suppression format (leading or trailing) throughout your files
  6. Include a README file or fabrication drawing with your Gerber files to provide additional instructions or clarifications

Common Mistakes to Avoid

Some common mistakes to avoid when generating Gerber files include:

  1. Omitting necessary layers or files
  2. Using inconsistent naming conventions
  3. Mixing units (inches and millimeters) within the same file
  4. Using unsupported or outdated Gerber format versions
  5. Failing to include a README file or fabrication drawing

Verifying Gerber Files

Before sending Gerber files to a manufacturer, it is important to verify that they are complete, accurate, and free of errors. There are several tools and techniques available for verifying Gerber files.

Visual Inspection

A simple but effective way to verify Gerber files is to visually inspect them using a Gerber viewer. A Gerber viewer is a software tool that allows you to open and view Gerber files layer by layer. By visually inspecting each layer, you can check for obvious errors or discrepancies.

Some popular Gerber viewers include:

  • GerbView (included with KiCad)
  • ViewMate (included with Altium Designer)
  • GC-Prevue
  • Ucamco UcamX

Design Rule Checking (DRC)

Design Rule Checking (DRC) is an automated process that checks Gerber files against a set of predefined design rules. DRC can detect errors such as short circuits, open circuits, insufficient clearances, and missing or incorrect apertures.

Most PCB design software includes built-in DRC functionality that can be used to verify Gerber files before exporting them. Some standalone DRC tools are also available, such as:

  • Ucamco GerberCheck
  • DownStream Technologies GerberPro
  • Wise Software GerberLogix

Netlist Comparison

Netlist comparison is a technique for verifying that the connectivity of a PCB matches the original schematic design. A netlist is a text file that describes the connections between components on a PCB. By comparing the netlist generated from the Gerber files to the netlist generated from the schematic, you can detect any discrepancies or errors in the PCB layout.

Some tools that support netlist comparison include:

  • Ucamco GerberCompare
  • Mentor Graphics Valor NPI
  • Zuken CR-8000

Sending Gerber Files to Manufacturers

Once your Gerber files have been verified and are ready for manufacturing, you need to send them to a PCB manufacturer. Most manufacturers accept Gerber files via email or through an online submission portal.

Compress and Package Files

Before sending your Gerber files, it is a good practice to compress them into a single ZIP or RAR archive. This makes it easier for the manufacturer to download and manage your files. Make sure to include all necessary files in the archive, including the README file or fabrication drawing.

Provide Clear Instructions

When sending Gerber files to a manufacturer, it is important to provide clear instructions and specifications for the PCB. This may include information such as:

  • PCB material and thickness
  • Copper weight and finish
  • Solder mask color and type
  • Silkscreen color and type
  • Surface finish (e.g., HASL, ENIG, OSP)
  • Any special requirements or considerations

Request a Design for Manufacturability (DFM) Check

Many PCB manufacturers offer a free Design for Manufacturability (DFM) check as part of their quoting process. A DFM check is an analysis of your Gerber files to ensure that they are compatible with the manufacturer’s processes and capabilities. The DFM check may identify potential issues or suggest improvements to your design to enhance manufacturability and reduce costs.

Frequently Asked Questions (FAQ)

  1. What is the difference between Gerber RS-274D and RS-274X formats?
    RS-274D is an older Gerber format that uses aperture templates and lacks some of the features of newer formats. RS-274X, also known as Extended Gerber or X1 format, introduces new commands and aperture types that provide more flexibility and precision in PCB design. The latest version of the Gerber format is X2, which adds support for embedded attributes and improves the efficiency of data transfer.

  2. Can I use different CAD tools to design my PCB and generate Gerber files?
    Yes, Gerber is a universal format that can be generated by most PCB design software. As long as your CAD tool can export Gerber files that comply with the latest Gerber format specifications, you can use it to design your PCB and generate Gerber files for manufacturing.

  3. What should I do if my manufacturer reports errors in my Gerber files?
    If your manufacturer reports errors in your Gerber files, the first step is to carefully review their feedback and try to understand the nature of the errors. Common issues include missing layers, incorrect aperture definitions, or design rule violations. Use a Gerber viewer or DRC tool to examine your files and make any necessary corrections. If you are unsure how to resolve the errors, consult with your manufacturer or a PCB design expert for guidance.

  4. How can I ensure that my Gerber files are compatible with my manufacturer’s capabilities?
    To ensure compatibility with your manufacturer’s capabilities, communicate with them early in the design process and provide clear specifications for your PCB. Request a DFM check of your Gerber files before finalizing your design. Follow the manufacturer’s guidelines for minimum feature sizes, clearances, and other design rules. If you have any doubts or questions, don’t hesitate to ask your manufacturer for clarification or advice.

  5. What are some common issues that can arise during PCB manufacturing due to Gerber file errors?
    Common issues that can arise during PCB manufacturing due to Gerber file errors include:

  6. Incorrect board outline or dimensions
  7. Missing or misaligned layers
  8. Incorrect aperture sizes or shapes
  9. Insufficient clearances between features
  10. Unintended short circuits or open circuits
  11. Drill holes that are too small or too close together

These issues can lead to delays in manufacturing, increased costs, or even total rejection of the PCB. To avoid these problems, always verify your Gerber files before sending them to the manufacturer and be responsive to any feedback or questions they may have.

Conclusion

Gerber files are an essential part of the PCB design and manufacturing process. They provide a standardized way of communicating PCB design data between designers, manufacturers, and assemblers. By understanding the different types of Gerber files, their structure, and best practices for creating and verifying them, you can ensure that your PCB designs are accurately and efficiently manufactured.

When working with Gerber files, it is important to use the latest Gerber format version, include all necessary layers and files, and follow a consistent naming convention. Use Gerber viewers, DRC tools, and netlist comparison to verify your files before sending them to the manufacturer. Provide clear instructions and specifications, and request a DFM check to identify any potential issues or improvements.

By following these guidelines and best practices, you can streamline your PCB design and manufacturing process, reduce errors and delays, and ultimately create high-quality PCBs that meet your design intent and specifications.