For PCB fabrication, we require PCB design file in Gerber RS-274X format (most preferred), *.PCB/DDB (Protel, inform your program version) format or *.BRD (Eagle) format.
The Gerber File Format has a rich history dating back to the 1960s. Originally developed by the Gerber Systems Corporation, it has undergone significant evolution to keep pace with the advancing complexity of PCB designs.
RS-274-D: The original Gerber format, also known as Standard Gerber, was based on the RS-274-D standard. This format required a separate aperture file to define the shapes used in the design.
RS-274X: Introduced in the 1990s, RS-274X, or Extended Gerber, is the current industry standard. It incorporates aperture definitions within the file itself, streamlining the PCB manufacturing process.
Gerber files became the go-to format for several reasons:
Gerber files act as a universal language between designers and manufacturers. They contain all the necessary information to produce each layer of a PCB, including:
Each aspect of the board is typically represented in a separate Gerber file, allowing for precise control over the manufacturing process.
While RS-274D is now obsolete, understanding its differences from RS-274X helps in appreciating the format’s evolution:
Feature | RS-274D | RS-274X |
---|---|---|
Aperture definitions | Separate file | Embedded in the Gerber file |
File complexity | Multiple files needed | Self-contained |
Industry support | Phased out | Current standard |
Layer information | Limited | Comprehensive |
The shift to RS-274X significantly simplified the PCB manufacturing process by reducing the potential for errors associated with managing multiple files.
RS-274X, also known as Extended Gerber, represents a significant leap forward in PCB design file formats. Its enhancements over the older RS-274D standard have made it the preferred choice for PCB designers and manufacturers worldwide.
Embedded Apertures: Aperture definitions are included within the Gerber file itself, eliminating the need for separate aperture files.
Layer Information: RS-274X files can contain metadata about the PCB layer they represent, enhancing clarity in the manufacturing process.
Advanced Imaging: Support for negative image polarity and step and repeat operations, allowing for more complex designs.
Improved Precision: RS-274X supports a higher degree of precision in coordinate data.
An RS-274X file generally consists of the following sections:
Here’s a simplified example of what you might find in an RS-274X file:
G04 RS-274X Example File*
%FSLAX36Y36*%
%MOMM*%
%LPD*%
%ADD10C,0.100000*%
%ADD11R,1.000000X2.000000*%
D10*
X0Y0D02*
X10000000Y0D01*
D11*
X5000000Y5000000D03*
M02*
Let’s break down this example:
G04
: Comment line%FSLAX36Y36*%
: Sets the coordinate format (3.6 – 3 integer and 6 decimal places)%MOMM*%
: Sets units to millimeters%LPD*%
: Sets the polarity to “dark”%ADD10C,0.100000*%
: Defines aperture D10 as a circle with a 0.1mm diameter%ADD11R,1.000000X2.000000*%
: Defines aperture D11 as a rectangle 1mm x 2mmD10*
: Selects aperture D10X0Y0D02*
: Moves to coordinate (0,0) without drawingX10000000Y0D01*
: Draws a line to coordinate (10,0)D11*
: Selects aperture D11X5000000Y5000000D03*
: Flashes aperture D11 at coordinate (5,5)M02*
: End of fileUnderstanding this structure is crucial for troubleshooting and verifying Gerber files before sending them to manufacturers.
When working with Gerber files, you’ll encounter various file extensions. Each extension typically corresponds to a specific layer or aspect of the PCB design. Understanding these extensions is crucial for organizing your design files and communicating effectively with manufacturers.
Extension | Description |
---|---|
.gbr | Generic Gerber file |
.gtl | Top copper layer |
.gbl | Bottom copper layer |
.gts | Top solder mask |
.gbs | Bottom solder mask |
.gto | Top silkscreen |
.gbo | Bottom silkscreen |
.gm1 | Mechanical layer 1 (often used for board outline) |
.drl | Drill file (typically in Excellon format) |
Top Copper Layer (.gtl): Contains the copper traces, pads, and planes on the top side of the PCB.
Bottom Copper Layer (.gbl): Similar to the top layer, but for the bottom side of the PCB.
Solder Mask Layers (.gts, .gbs): Define areas where solder mask should be applied or removed, typically covering all areas except pads and vias.
Silkscreen Layers (.gto, .gbo): Contain text, component outlines, and other markings printed on the PCB surface.
Mechanical Layer (.gm1): Often used for the board outline, but can also include assembly notes or dimensions.
Drill File (.drl): While not a Gerber file, the drill file is crucial as it specifies the location and size of all holes in the PCB.
Proper file naming and use of standard extensions are critical for several reasons:
Clarity: Clear naming helps both designers and manufacturers quickly identify each layer’s purpose.
Automation: Many PCB manufacturing processes are automated and rely on standardized file names.
Error Prevention: Correct naming reduces the risk of layer mix-ups during manufacturing.
Efficiency: Standardized naming speeds up the design review and manufacturing preparation processes.
Always check with your PCB manufacturer for their specific file naming requirements, as they may have slight variations in their preferred naming conventions.
While not part of the Gerber format, Excellon drill files are an essential component of PCB manufacturing data. They work in conjunction with Gerber files to provide a complete description of the PCB design.
Excellon drill files, typically with a .drl extension, contain information about the location and size of all holes in a PCB. This includes:
The Excellon format is named after the Excellon Automation Company, a major manufacturer of PCB drilling equipment.
Drill files are kept separate from Gerber files for several reasons:
A typical Excellon drill file consists of three main sections:
Here’s a simplified example of an Excellon drill file:
M48
;DRILL file {KiCad 5.1.5-52549c5~86~ubuntu18.04.1} date 2023-07-15T10:30:52
;FORMAT={-:-/ absolute / inch / decimal}
FMAT,2
INCH
T1C0.0157
T2C0.0394
%
G90
G05
T1
X5.1Y3.2
X5.2Y3.3
T2
X4.9Y3.0
X5.0Y3.1
T0
M30
Let’s break this down:
M48
: Start of the header;DRILL file...
: Comment line with file informationFMAT,2
: File formatINCH
: Units (inches in this case)T1C0.0157
: Define Tool 1 with a diameter of 0.0157 inchesT2C0.0394
: Define Tool 2 with a diameter of 0.0394 inches%
: End of the headerG90
: Use absolute positioningG05
: Drill modeT1
: Select Tool 1X5.1Y3.2
: Drill a hole at coordinates (5.1, 3.2)T0
: End of the programM30
: End of the fileBy understanding and correctly preparing Excellon drill files, you can ensure that your PCB design is accurately translated into a physical board.
While the Gerber File Format remains the industry standard, newer formats have emerged to address some of its limitations. Two notable alternatives are ODB++ and IPC-2581.
ODB++ (Open Database++) is a proprietary PCB design exchange format developed by Mentor Graphics (now part of Siemens). It aims to provide a more comprehensive and intelligent data set compared to traditional Gerber files.
Key features of ODB++:
IPC-2581 is an open, vendor-neutral standard developed by the IPC (Association Connecting Electronics Industries). It aims to streamline the PCB manufacturing process by providing a single, comprehensive data format.
Key aspects of IPC-2581:
Despite the advantages of newer formats, Gerber files continue to dominate the PCB industry for several reasons:
While ODB++ and IPC-2581 offer advantages in terms of data richness and reduced ambiguity, the PCB industry’s reliance on established workflows and tools has slowed their adoption. However, as PCB designs become more complex, these newer formats may see increased use in the future.
While Gerber files are the standard for PCB manufacturing, DXF (Drawing Exchange Format) files play a crucial role in certain aspects of PCB design, particularly in defining board outlines and creating mechanical drawings.
DXF is a CAD data file format developed by Autodesk for enabling data interoperability between AutoCAD and other programs. In PCB design, DXF files are often used for:
Board Outlines: For PCBs with non-standard shapes, designers often create the outline in a mechanical CAD program and import it into their PCB design software as a DXF file.
Mechanical Constraints: DXF files can define keep-out areas, mounting holes, or other mechanical features that the PCB must accommodate.
Documentation: DXF files are useful for creating detailed mechanical drawings of the PCB, including dimensions and annotations.
While many PCB design tools can work directly with DXF files for board outlines, there are situations where conversion to Gerber format is necessary:
Manufacturing requirements: Some PCB manufacturers prefer all data, including the board outline, in Gerber format.
Software limitations: Older or more basic PCB design tools might not support DXF import, requiring conversion to Gerber.
Design verification: Converting DXF to Gerber allows for easier verification of the board outline within PCB design software.
Consistency: Having all PCB data in Gerber format ensures consistency across all layers and simplifies the manufacturing process.
Certainly, I’ll continue from where we left off:
Design verification: Converting DXF to Gerber allows for easier verification of the board outline within PCB design software.
Consistency: Having all PCB data in Gerber format ensures consistency across all layers and simplifies the manufacturing process.
Proper verification of Gerber files is crucial to ensure that your PCB design will be manufactured correctly. There are several tools available for viewing and verifying Gerber files, ranging from free open-source options to professional paid software.
Gerbv: An open-source viewer that’s part of the gEDA project. It’s fast, lightweight, and supports both Gerber and Excellon drill files.
KiCad Gerber Viewer: Included with the open-source KiCad EDA suite, this viewer is user-friendly and supports a wide range of Gerber file formats.
CircuitMaker Gerber Viewer: A free online viewer provided by Altium, allowing you to view Gerber files without installing any software.
Altium Viewer: A powerful tool that can open native Altium Designer files as well as Gerber files.
CAM350: A comprehensive tool for viewing, editing, and analyzing PCB manufacturing data.
GerberLogix: Offers advanced features like netlist comparison and 3D visualization.
Verifying your Gerber files before sending them to manufacturing is crucial for several reasons:
Catch Design Errors: Identify issues like missing layers, incorrect trace widths, or misaligned drill holes.
Ensure Manufacturability: Check that your design meets the manufacturer’s capabilities and design rules.
Prevent Costly Mistakes: Catching errors before manufacturing saves time and money on board respins.
Confirm Design Intent: Ensure that the Gerber files accurately represent your intended design.
When verifying your Gerber files, consider the following:
By thoroughly verifying your Gerber files before submission, you greatly increase the chances of a successful PCB manufacturing process.
Properly generating and exporting Gerber files is crucial for ensuring your PCB design is accurately translated into a physical board. Here are some best practices to follow:
Units: Ensure your export units (inches or millimeters) match your design units.
Precision: Set appropriate precision for coordinates (e.g., 2:5 or 2:6 for inches, meaning 2 digits before the decimal point and 5 or 6 after).
Format: Use RS-274X (Extended Gerber) format.
Layers: Export all necessary layers, including copper, solder mask, silkscreen, and drill files.
Apertures: Use embedded apertures (available in RS-274X) rather than separate aperture files.
Zero Suppression: Choose between leading or trailing zero suppression consistently.
Drill Format: For drill files, specify whether to use Excellon or Gerber format, depending on manufacturer requirements.
Missing Layers: Forgetting to export critical layers like solder mask or silkscreen.
Incorrect Scale: Ensure your design is exported at 1:1 scale.
Mismatched Units: Mixing inches and millimeters across different files.
Insufficient Precision: Using too low precision can lead to rounding errors in fine details.
Ignoring DRC: Failing to run and resolve Design Rule Checks before exporting.
Outdated Formats: Using obsolete formats like RS-274D instead of RS-274X.
Inconsistent Naming: Using non-standard or unclear file naming conventions.
Always check with your PCB manufacturer for their specific requirements, which may include:
File Naming Conventions: Specific prefixes or suffixes for each layer.
Layer Stackup: Specific order of layers in multi-layer boards.
Drill File Format: Preference for Excellon or Gerber format for drill data.
Copper Thieving: Requirements for copper balancing on outer layers.
Panel Size: Specifications for panelizing multiple boards.
Material Requirements: Any specific callouts needed for board material or thickness.
Special Instructions: How to communicate non-standard requirements or features.
By following these best practices and checking manufacturer-specific requirements, you can significantly reduce the chances of errors in the PCB manufacturing process.
To help you better understand the Gerber File Format, we’ve prepared a set of sample Gerber files for a simple two-layer PCB design. These files demonstrate the typical components of a complete Gerber file set for PCB manufacturing.
Our sample package includes the following files:
example_top_copper.gtl
– Top copper layerexample_bottom_copper.gbl
– Bottom copper layerexample_top_solder_mask.gts
– Top solder maskexample_bottom_solder_mask.gbs
– Bottom solder maskexample_top_silkscreen.gto
– Top silkscreenexample_bottom_silkscreen.gbo
– Bottom silkscreenexample_board_outline.gm1
– Board outlineexample_drill_file.drl
– Excellon drill fileYou can download the zipped package of these sample files here: Download Sample Gerber Files
These files can be used for:
Remember, these are simplified examples and may not represent all the complexities of a real-world PCB design. However, they provide a good starting point for understanding the Gerber File Format.
Understanding the Gerber File Format is crucial for anyone involved in PCB design and manufacturing. As we’ve explored in this guide, Gerber files serve as the universal language between designers and manufacturers, ensuring that complex PCB designs are accurately translated into physical boards.
Always double-check your Gerber files before sending them to fabrication. This simple step can save time, money, and frustration by catching errors early in the process.
To deepen your understanding of PCB design and Gerber files, consider exploring these resources:
By mastering the Gerber File Format and staying informed about evolving standards, you’ll be well-equipped to navigate the intricacies of PCB design and manufacturing, ensuring your projects move smoothly from concept to reality.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.