Gerber File Ultimate Guide-A Beginner’s Guide to Gerber

Posted by

What is a Gerber File?

A Gerber file is a standard file format used in the electronic design automation (EDA) industry to describe the printed circuit board (PCB) images. It is a 2D binary vector image file format that was originally developed by the Gerber Systems Corp., a division of Ucamco.

Gerber files are used to describe the copper layers, solder mask, legend, and drilling data for a PCB. Each file represents one layer of the board, so a complete set of Gerber files is needed to manufacture a PCB.

The Gerber file format is an open ASCII vector format for 2D binary images. It is the de facto standard used by PCB Fabrication houses around the world to exchange PCB design information.

Key Features of Gerber Files

  • 2D vector image file format
  • Describes copper layers, solder mask, legend, and drilling data for PCBs
  • Used to transfer PCB design data between PCB design software and manufacturing
  • Open ASCII format allows easy parsing and processing
  • Supported by all major PCB design software packages
  • De facto standard for PCB fabrication data exchange worldwide

Anatomy of a Gerber File

A Gerber file consists of a sequence of commands that describe the image in terms of shapes and apertures. Let’s break down the key components:

Commands

Gerber files use a set of standard commands to describe the image. Some key commands include:

Command Description
D01 Draws a line or arc
D02 Moves the plotter without drawing
D03 Flashes an aperture at the current position
G01 Sets interpolation mode to linear
G02/G03 Sets interpolation mode to clockwise/counterclockwise circular
G04 Comment (ignored by plotter)
G36/G37 Begin/End of contour fill area
G74 Sets Quadrant mode for circular interpolation
G75 Sets Multi-quadrant mode for circular interpolation
M02 End of file

Apertures

Apertures define the shape that is flashed (exposed) onto the film at a given location. Apertures are defined using the “AD” command followed by the aperture definition. For example:

%ADD100C,0.1*%

This defines aperture D100 as a circle with 0.1 units diameter.

Common aperture types include:

Aperture Description
C Circle
R Rectangle
O Obround (Rounded rectangle)
P Regular polygon

Coordinates

Gerber files use a 2D coordinate system to specify locations on the board. Coordinates are always integers and are either absolute (measured from the origin) or incremental (relative to the last position).

The coordinate format command “%FSLAX25Y25*%” sets the coordinate system to 2.5 digits of precision for both X and Y axes.

Creating Gerber Files

Most PCB design software packages can generate Gerber files from the board design. The exact process varies between tools, but generally involves:

  1. Completing the PCB layout and routing
  2. Running design rule checks (DRC) to verify the design
  3. Generate Gerber files for each copper layer, solder mask, legend, etc.
  4. Generate the drill file (Excellon format)
  5. Review Gerber and drill files to check for errors
  6. Send Gerber files to the PCB fabricator

Some tips for creating quality Gerber files:

  • Use the latest Gerber X2 format if supported by your fab house
  • Adhere to your fab house’s design rules and specifications
  • Clearly label files and use file extensions that identify the layer
  • Panelize boards if needed to reduce cost
  • Verify files with a Gerber viewer before sending out for manufacture

Gerber File Versions

The Gerber format has evolved over time to add new capabilities. There are currently three versions in use:

Standard Gerber RS-274-D

  • Original Gerber format first released in the 1980s
  • Uses a 2.3 or 2.4 coordinate format
  • No support for apertures larger than 24 mil
  • Limited ability to embed metadata in files

Extended Gerber RS-274X

  • Updated format released in 1998
  • Added support for polygonal apertures and G36/G37 contour fill
  • Can embed more metadata like part number, date, etc.
  • Most commonly used format today

Gerber X2

  • Latest revision first introduced in 2014
  • Adds support for embedding rich metadata like layer types, materials, PCB Stackup, etc.
  • Not yet widely supported by PCB Design Tools and fabrication houses
  • Backward compatible with RS-274X

Unless your fab house requests otherwise, Extended Gerber RS-274X is usually the best choice for most designs.

Gerber File Extensions

Gerber filenames use extensions to identify the board layer. Although not standardized, most designers use a consistent set of extensions:

Extension Layer
.GTL Top (component side) copper
.GBL Bottom (solder side) copper
.G1 – .G100 Inner copper layers (1 to 100)
.GTO Top overlay (silkscreen)
.GBO Bottom overlay (silkscreen)
.GTP Top paste (solder paste stencil)
.GBP Bottom paste
.GTS Top solder mask (negative)
.GBS Bottom solder mask (negative)
.GM1 Board outline (milling)
.GKO Circuit keepout areas
.GPT Top pad master
.GPB Bottom pad master
.GD1 Drill drawing
.GG1 Drill guide

Using clear, standard extensions helps avoid confusion and mistakes when working with fabricators.

Viewing and Inspecting Gerber Files

Before sending Gerber files out for manufacture, it’s important to review them for errors. This can be done with a Gerber viewer application.

Some popular Gerber viewers include:

When inspecting Gerbers, look out for:

  • Missing or incorrect layers
  • Misaligned layers or drill holes
  • Apertures too small for fab house capabilities
  • Clearance and creepage violations
  • Acid Traps and starved thermals
  • Labeling errors or missing designators

Catching errors at this stage can save a lot of time and cost later when boards are being built.

FAQ

What is the difference between Gerber files and NC Drill files?

Gerber files describe the copper layers, masks, and legends, while NC drill files (usually Excellon format) describe the locations and sizes of drill holes and slots.

A complete manufacturing package needs both Gerber and drill files.

What is step and repeat?

Step and repeat is a process where a PCB design is panelized into an array for more efficient manufacturing. The design is repeated multiple times on a larger panel.

Gerber files can describe step and repeat layouts using the SR parameter for the G04 command. However, many designers leave the panelization to the fabrication house.

How do I choose the right Gerber file version?

Unless your fabrication house specifies otherwise, Extended Gerber RS-274X is the best choice for most designs. It is well supported by design tools and fabricators.

If your design needs to convey a lot of metadata to the fabricator, consider using the new Gerber X2 format if supported.

How can I check my Gerber files for errors?

Always review your Gerber files in a Gerber viewer before sending them out for manufacture. Look for missing layers, misalignments, small apertures, and design rule violations.

It’s also a good idea to run a Design for Manufacturability (DFM) check using your fabricator’s DFM software or guidelines. This will flag any issues that could affect the manufacturability of your design.

What else do I need to send to my PCB fabricator?

In addition to the Gerber files, you’ll need to send:

  • NC drill files (usually Excellon format)
  • A drill map or drawing
  • PCB stackup information
  • Bill of Materials (BOM) for any additional parts
  • Special instructions for materials, surface finishes, testing, etc.

Work closely with your fabricator and make sure to follow their data submission guidelines for the smoothest possible manufacturing process.

Leave a Reply

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

Categories

Tag Cloud

There’s no content to show here yet.