How to generate Gerber file from AutoCAD

How to generate Gerber file from AutoCAD

Gerber files are the industry standard file format used for manufacturing printed circuit boards (PCBs). They provide the photoplotter and PCB fabrication house with precise image data of copper layers, solder mask, legend, drill holes etc. in individual files essential for photographically producing intricate multi-layer circuit boards.

Since PCB layouts are designed using CAD software, being able to accurately output manufacturing-ready Gerber files from the native CAD design files is a crucial step in correctly realizing complex multilayer board assemblies. This ability allows designers to hand-off electronic drawings directly to board shops.

While several PCB layout applications contain inbuilt Gerber file generation tools, a majority of designers use more universally adopted CAD platforms like AutoCAD for schematic capture and board geometry authoring. AutoCAD offers extensive drafting functionality however lacks innate support for generating industry-standard Gerber images in the various required layers.

This article provides PCB designers using AutoCAD, detailed step-by-step instructions on reliably creating manufacturing-compliant Gerber files from their board layout drawings correctly prepped with all essential PCB fabrication and assembly information.

Gerber File Format Basics

Before diving into the methodology of constructing PCB fabrication data from AutoCAD, it helps to understand basics of the ubiquitous Gerber file format widely used to convey PCB image information.

What is a Gerber File?

Gerber files are vector image file types developed by a company called Gerber Systems, who pioneered photoplotters for printing PCB conductor images on film sheets for eventually transferring onto circuit boards using chemical etching and plating techniques. Hence Gerber format became the industry norm for representing PCB copper layers and fabrication data.

Key attributes:

  • Vector graphics data encoding image shapes as geometric drawing primitives and commands as opposed to bitmapped pixels
  • Contains 2D Cartesian coordinate drawing instructions like Line, Arc, Circle etc. with or without flashing along with aperture definitions
  • Independent gerber files generated for copper layers, solder mask, silkscreen legend, board perimeter etc.
  • Adheres to rigid specification controlled by Ucamco who own former Gerber Systems

Gerber File Types

There are two distinct gerber file versions - Gerber RS-274X and Extended Gerber RS-274X. The extended format includes additional commands defining regions, netlist attributes etc. beyond just basic imagery. We focus on traditional RS-274X.

RS-274X Defines basic PCB images for fabrication purpose in terms of graphical primitives like line, arc, polygons etc.

Extended Gerber RS-274X Supports netlist metadata through Attribute commands and electrical test instructions via Region statements beyond just graphical shapes of base RS-274X

We focus on ubiquitous RS-274X files - containing all fabrication imagery - that still dominate PCB manufacturing information exchange.

Why Gerber Format?

Gerber files standardized graphical information exchange eliminating ambiguity and content errors to ensure accurate PCB imaging. Even 50 years since its inception, Gerbers survive as de-facto file transfer medium between designers and fabricators due to:

  • Vector graphics avoids image distortion or pixelation associated with bitmap formats when scaling
  • Vast tooling ecosystem availability for generating, viewing and processing files
  • Backward compatibility - allows simple images as well as sophisticated data
  • Cross platform portability - works on any CAD software or manufacturing system
  • Extensive industry adoption across complete PCB production workflow

Attempts to supplant the venerable Gerber such as IPC-2581 or ODB++ have faced challenges getting traction indicating we remain stuck with Gerbers for a long time!

Contents of PCB Gerber Packages

Complete set of gerber files conveying PCB fabrication and assembly data is formally termed a ‘gerber package’. This comprises:

Layer Images

  • Copper layers - Conductor geometry on each copper signal layer. Used for imaging inner layer cores and outer layer traces.
  • Solder mask layers - Solder coating extents determining exposed pad areas for component terminals
  • Silkscreen layers - Component designators and other markup signages to aid human assembly
  • Drill drawing - Locations needing holes drilled for component pins or vias
  • Profile layer - Outline enveloping dimensions of finished board

Attributes Data

  • Net list file - Connectivity matrix mapping traces to corresponding circuit nets
  • Aperture library - Drawing spot sizes used for flashes mapped to reference codes

Documentation

  • Board fabrication drawings with layer specs
  • Panel utilization diagrams
  • Stackup cross sectional profile
  • Material callout
  • Image polarity identification
  • Manufacturing instructions

This aggregate gerber package conveys the layered construction blueprint essential for PCB production process.

Native AutoCAD Limitations

While AutoCAD includes powerful functionality for electrical schematic layout and drafting intricate PCB traces geometries, natively it lacks built-in utilities generating manufacturing formats like Gerbers for fabrication documentation purposes.

Layers structure equipped to recognize conductor layers is also missing. Without additional Gerber processing software, fabrication documentation aspects need to be manually implemented making integration suboptimal. Key gaps are:

Documentation

  • No native utilities to export industry standard Gerber RS-274X photoplotting files
  • Cannot directly output netlist, aperture definitions or other metadata in standard formats

Layers Setup

  • Lack of dedicated PCB workspace environment with substrate viewers
  • Copper, mask, legend layers need manually mapping
  • Custom layer naming required following conventions

Design Rule Checking

  • Copper spacing checks requires manual verification
  • Component clearance oversight during layout

CAM Processing

  • Panelization or coupon patterns not inherently available

This necessitates additional processing outside AutoCAD before design files become manufacturing-ready.

Constructing Gerber Package

Generating Gerber fabrication dataset from AutoCAD PCB drawings involves methodically orchestrating and translating native layer images into multi-file RS-274 photoplotting format throughscripted automation rather than manual procedures.

The workflow encompasses two phases:

  1. Constructing core PCB layer images correctly inside AutoCAD
  2. Postprocessing AutoCAD outputs into Gerber photoplotter files

We examine key steps to achieve both correctly.

1. Prep Design Layers

With inherent software limitations, systematically arranging data intelligently right from layout stage is imperative.

Layer prep

Allocate Layers

Reserve separate drawing layers each mapped to eventual Gerber image role - conductor, solder mask, keepout etc.

Ensure layer names match numbering conventions. We suggest:

1,2 - Signal Layers

15,16 - Solder Mask Layers

17,18 - Silk Layers

3 to 14 - Unused signal layers

19 - Board Edge Layer

20 - Keepout Layer

21 - Drills Layer

Assign Properties

  • Set colors to represent material eventually imaged - copper traces as yellow, solder mask green etc.
  • Ensure contrasts - dark backgrounds for clear visibility
  • Freeze layers when inactive to prevent unintended overwrite
  • Make layers visible when editing

This enables disciplined authoring recognizable images destined for specific photoplots.

Setup Workspace

Select PCB template to instantiate suitable plotting area with predefined substrate envelopes through drawing extents capturing board dimensions.

Create custom template if defaults lack frame sizes corresponding to panel requirements.

Construct Images

With layers provisioned, compiling illustrations involves strategically populating appropriate shapes.

Route Traces

Use LINE / POLYLINE to create conductor paths on designated signal layers following electrical connectivity scheme.

Assign trace widths based on current ratings and controlled impedance needs per constraints.

Define Pads

Use PAD shapes with holes to define surface mount lands and thru-hole drill spots.

Set pad diameters matching component termination sizes per IPC-7351 land patterns standards.

Assign Keepouts

Apply REGION areas on Keepout layer to mandate exclusion zones enveloping tightly packed traces or small components. Adds clearance insulation margins.

Draw Silkscreen

Text and LINE elements on Silk layers to annotate components, logos, board signages for identification post assembly.

Outline Board

RECTANGLE, LINE or POLYGON on Mechanical layer to demarcate extents of board dimensions for fabrication.

Identify Drills

All points necessitating drilling for vias or component holes should use a crosshair marker centered on the PAD hole on Drills layer plotting extent areas needing hole drilling.

This comprehensive set of images furnishes necessary visual construction data.cripts.

2. Export Gerber Data

With intelligent layers setup and vital illustrations in place, exporting AutoCAD drawings into multi-layer Gerber photoplotting files involves:

Plot Drawings

Plot separate PDF printouts from AutoCAD for each relevant layer mapped to eventual PCB fabrication imaging role.

Plot in 1:1 scale matching real world PCB dimensions.

Turn off print borders, annotations, other decorations.

Per Layer Plot

  • Conductor Layers - Contains traces for inner and outer layers
  • Solder Mask Layers - Define solderable land openings
  • Silkscreen Legends - Illustrative identifications
  • Board Profile Layer - Captures board dimensions
  • Drills Layer - Denotes drill sites

Repeat plotting process for every essential layer required for fabrication purpose.

Each plotted PDF sheet then contains graphics shapes destined for a specific Gerber file.

Convert PDF to Gerbers

Next we transform plotted PDF documents into Gerber RS-274X photoplotter files using a CAM tool. This involves:

  1. Load PDF into Gerber converter
  2. Select output layer type - copper, soldermask etc.
  3. Set adequate resolution to cleanly render fine geometries
  4. Map input PDF page to required fabrication layer
  5. Generate coordinates in 2:4 format
  6. Save individual files as industry standard .gbr extensions

The script based processing ensures correct output formatting, precision coordinate data, consistent layer mappings while adding essential fabrication information like date stamps, polarity indication etc.

This effects reliable transformation of native AutoCAD illustrations into manufacturing-compliant Gerber layer files essential for PCB production processes.

Submitting Gerber Package

The generated set of Gerber files constituting images for each necessary fabrication layer along with accompanying documentation like drawings, stackup diagrams, panel layouts, netlists and attributes libraries constitutes the final manufacturing package submittable directly to board production houses for realization of designed PCB without errors or delay.

FQA

How are separate design layers mapped to individual gerber files?

By intelligently assigning different drafting elements like traces, keepouts, drills etc. onto specifically designated and named layers purpose mapped to eventual fabrication imaging requirements, exporting each such layered AutoCAD drawing to Gerber files ensures that the original native illustrations get correctly translated into respective fabrication photoplots through systematic post processing.

What are the key advantages of using Gerber over other formats?

Vector graphics based Gerber files avoid potential image distortions or enlargement artifacts associated with pixelated bitmapped images allowing clean rendering at higher resolutions necessary for producing intricate board geometries. Ubiquitous industry tool support for editing, conversion and processing coupled with extensive backward compatibility also keeps format relevant despite over 5 decades of existence.

How are fine pitch BGAs and 0201 passives correctly plotted?

The ability to set adequate image resolution while transforming PDF files into Gerber formats ensures micron-dimensioned packages and routing can cleanly resolve without jagged contours or stair-stepping issues. Calculated image settings matched to smallest feature sizes allows reliable plotting down to even 12 microns details.

What are common reasons for generation of incorrect gerber files?

Failing to methodically prepare individual layers purpose mapped to fabrication images right from layout stage and lack of transparency into whether source drawings have design rule violations before exporting intermediate files leads to error-prone transformations producing imprecise or mismatching images lacking essential details ultimately causing fabrication failures.

Why is script based processing recommended over manual options?

Manual options for generating gerbers leaves too much opportunity for human errors at each transformation stage besides being extremely tedious and time consuming while standardized scripts process intermediate files error-free everytime to produce manufacturing-ready outputs. Tool calculated image settings also optimally render ultra-fine geometries reliably.

要查看或添加评论,请登录

RayMing PCB的更多文章

社区洞察