What is Gerber File and How to Create a Gerber

Introduction to Gerber Files

A Gerber file is a standard file format used in the printed circuit board (PCB) industry to describe the printed circuit board images: copper layers, solder mask, legend, drill holes, etc. It is the de facto standard used by PCB fabrication houses. The official name of the format is RS-274X.

Gerber files are actually a family of file formats:
– Gerber X2
– Gerber RS-274X
– Standard Gerber (RS-274-D)
– Gerber Netlist Files (IPC-D-356)

Today, Gerber X2, an extension of RS-274X, is the most widely used format. It includes additional information to convey more accurately the designer’s intent.

Why Use Gerber Files?

Gerber files provide a standard way for PCB designers to communicate detailed information to PCB manufacturers. Using a standard format ensures that the PCB manufacturer can correctly interpret and manufacture the PCB as the designer intended.

Some key benefits of using Gerber files:

  1. Industry Standard: Gerber is the most widely used format in the PCB industry. Almost all PCB design software can export Gerber files and all PCB manufacturers can accept them.

  2. Accuracy: Gerber files contain all the necessary information to accurately manufacture a PCB, including precise measurements and layer information.

  3. Simplicity: Despite containing detailed information, Gerber files are relatively simple ASCII text files that are easy to generate, read, and parse.

  4. Reliability: Because of their widespread use and standardization, Gerber files provide a reliable way to transfer PCB design data without errors or misinterpretations.

Anatomy of a Gerber File

A Gerber file is a plain ASCII text file that contains a sequence of commands to describe a PCB layer image. Each command consists of an operation code (like D01, D02, etc.) followed by coordinates or other parameters.

Here’s a simplified example of what a Gerber file might look like:

G04 This is a comment*
%FSLAX26Y26*%
%MOIN*%
%ADD10C,0.010*%
D10*
X0100Y0100D02*
X0200Y0200D01*
X0300Y0100D01*
X0200Y0000D01*
X0100Y0100D01*
M02*

Let’s break this down:
G04 is the code for a comment. Everything after it on the same line is ignored.
%FSLAX26Y26*% sets the format specification – in this case, 2:6 format (2 integer and 6 decimal places).
%MOIN*% sets the units to inches.
%ADD10C,0.010*% defines aperture D10 as a circle with a diameter of 0.010 inches.
D10* selects aperture D10 as the current aperture.
X0100Y0100D02* moves to the coordinates (1.00, 1.00) without drawing.
X0200Y0200D01* draws a line from the current position to (2.00, 2.00).
– The following lines continue to draw a square.
M02* indicates the end of the file.

In reality, Gerber files are much more complex and include many more commands to describe a complete PCB.

Types of Gerber Files

As mentioned earlier, there are several types of Gerber files used in PCB design. Here’s a more detailed look at each:

Gerber X2

Gerber X2 is an extension of the Gerber RS-274X format. It includes additional information to better convey design intent, making it easier for manufacturers to understand and produce the PCB correctly. Some key features of Gerber X2 include:

  • Embedded aperture definitions
  • Netlists
  • Pad and via functions
  • Layer stackup information

Gerber RS-274X

Gerber RS-274X, often referred to simply as “Extended Gerber”, is the predecessor to Gerber X2 and is still widely used. It includes several enhancements over Standard Gerber (RS-274-D), such as:

  • Aperture definitions in the file
  • Unlimited number of apertures
  • Improved support for positive and negative layers

Standard Gerber (RS-274-D)

Standard Gerber, also known as RS-274-D, is an older version of the Gerber format. It has several limitations compared to newer versions, such as:

  • Limited number of apertures (D-codes)
  • Lack of embedded aperture definitions
  • No support for positive and negative layers

Despite its limitations, Standard Gerber is still occasionally used, especially for simpler designs.

Gerber Netlist Files (IPC-D-356)

In addition to the image files, Gerber files can also include netlist information. IPC-D-356 is a standard format for exchanging netlist and test point information. These files are often used for electrical testing of the manufactured PCB.

Creating Gerber Files

Most PCB design software, such as Altium Designer, KiCad, Eagle, and others, can generate Gerber files. The exact process varies between software, but generally involves the following steps:

  1. Complete your PCB design, ensuring that all layers are correctly defined and all design rules are met.

  2. Access the Fabrication Outputs or CAM Processor feature in your software. This is usually found under the File menu or in the Output/Generation section.

  3. Select the Gerber format. If given a choice, prefer Gerber X2 or RS-274X over Standard Gerber.

  4. Select the layers you want to export. At a minimum, you’ll usually need:

  5. Top Copper
  6. Bottom Copper
  7. Top Soldermask
  8. Bottom Soldermask
  9. Top Silkscreen
  10. Bottom Silkscreen
  11. Drill File

  12. Set the output directory and file naming convention as desired.

  13. Generate the files. This will create a set of .gbr or .art files in the specified output directory.

  14. Verify the generated files using a Gerber viewer to ensure they’re correct and complete.

Here’s an example of what the layer selection might look like in a typical CAM Processor:

Layer Include File Extension
Top Copper Yes .gtl
Bottom Copper Yes .gbl
Top Soldermask Yes .gts
Bottom Soldermask Yes .gbs
Top Silkscreen Yes .gto
Bottom Silkscreen Yes .gbo
Drill File Yes .drl
Milling Layer No
Paste Mask Top No
Paste Mask Bottom No

Always consult with your PCB manufacturer for their specific Gerber file requirements. They may have specific naming conventions or additional layers they require.

Best Practices for Creating Gerber Files

To ensure your Gerber files are correctly interpreted by the manufacturer and your PCB is produced as intended, follow these best practices:

  1. Use the latest Gerber format: Whenever possible, use Gerber X2 or at least RS-274X. These newer formats include more information and are less prone to misinterpretation.

  2. Include all necessary layers: Make sure to include all layers required for manufacturing, including copper layers, soldermask, silkscreen, and drill files.

  3. Use a consistent naming convention: Use clear and consistent file names for each layer. Many manufacturers have specific naming conventions they prefer.

  4. Verify your files: Always check your Gerber files with a Gerber viewer before sending them to the manufacturer. This allows you to catch any errors or omissions early.

  5. Communicate with your manufacturer: If you have any unique requirements or are unsure about any aspect of your Gerber files, communicate with your PCB manufacturer. They can provide guidance on their specific requirements.

FAQ

What software can I use to view Gerber files?

There are several free and paid Gerber viewer software options available. Some popular ones include:

  • Gerbv (free, open-source)
  • ViewMate (free)
  • CAM350 (paid)
  • GC-Prevue (paid)

Most PCB design software also includes built-in Gerber viewing capabilities.

Can I edit Gerber files?

Gerber files are not designed to be edited directly. If you need to make changes to your PCB design, it’s best to make those changes in your PCB design software and then regenerate the Gerber files.

However, some advanced PCB CAM software, like CAM350, does allow for limited editing of Gerber data. This is typically only used for very minor changes and should be done with caution.

What if my PCB manufacturer asks for additional files?

Some PCB manufacturers may request additional files beyond the standard Gerber files. This could include:

  • Bill of Materials (BOM)
  • Pick and Place files
  • Assembly drawings
  • IPC-D-356 netlist files

If requested, these files can usually also be generated from your PCB design software. Consult your software’s documentation or support resources for specifics on how to generate these files.

Can I use Gerber files for PCB assembly?

Gerber files are primarily used for PCB fabrication, not assembly. For assembly, additional files like the Bill of Materials (BOM) and Pick and Place files are typically required.

However, the Gerber files can be useful for the assembly process as they provide a visual reference of the PCB and can be used to generate assembly drawings.

What should I do if my manufacturer reports issues with my Gerber files?

If your PCB manufacturer reports issues with your Gerber files, first try to get specific details about the issue. Common problems could include:

  • Missing layers
  • Incorrect file format
  • Aperture or D-Code errors
  • Design rule violations

Once you understand the issue, make the necessary corrections in your PCB design software and regenerate the Gerber files. Always verify the new files in a Gerber viewer before resending to the manufacturer.

If you’re unsure how to resolve the issue, consult your PCB design software’s support resources or community forums. Your PCB manufacturer may also be able to provide guidance.

Conclusion

Gerber files are an essential part of the PCB design and manufacturing process. They provide a standardized way to convey complex PCB design information to manufacturers, ensuring that PCBs are produced accurately and to the designer’s specifications.

By understanding the different types of Gerber files, how to create them correctly, and following best practices, you can ensure a smooth transition from PCB design to manufacturing. Always work closely with your PCB manufacturer and don’t hesitate to ask for guidance if needed.

With the rise of more advanced formats like Gerber X2, the future of PCB design and manufacturing looks promising. As these formats continue to evolve and include more design information, we can expect even smoother and more efficient collaboration between PCB designers and manufacturers.

CATEGORIES:

Uncategorized

Tags:

No responses yet

Leave a Reply

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

Latest Comments

No comments to show.