Figure 1. Photoplotter concept diagram – https://www.eurocircuits.com/gerber-past-present-and-future/
The main components of the photoplotter are:
Optical head – contains a light source.
Aperture wheel – a circular wheel that can be rotated to select different apertures. Apertures are 2D plane figures that can be simple shapes like circles or rectangles, but they can also be pretty complex.
Shutter – to enable or disable a path for light to reach a film.
X-Y Table – a holder for the film.
The usual workflow of a photoplotter was to move an optical head to the correct location with the shutter being closed. The next step was to select a proper aperture by rotating the aperture wheel. From here, the two most common cases were either to briefly open and close the shutter, so-called flash mode, to expose a pad on the film or to move the optical head in a line while the shutter is opened to expose a trace on the film. Given the proper commands for table motion, aperture selection, and shutter operations, one can construct just about any image on the film.
Standard Gerber was a fairly simple ASCII format consisting of commands and XY coordinates. To show what the format looks like here are a few lines from a gerber file:
G01*
X003920Y006991D02*
D16*
X004304Y006832D01*
M01*
From the file, a few things can be noticed:
Asterisk is used to define the end of the line of each command.
A command can be an instruction starting with letters M, G or D or it can be a coordinate expressed with X and Y values.
G-Codes or general function codes are initialization commands used to prepare the machine’s state before drawing. They can specify how the coordinate data should be interpolated if the polygon area fills feature should be on or off, as well as the unit of measurement (millimeters or inches).
The most frequently used G-Codes are:
– G01 – Sets linear/circular mode to linear.
– G02 – Sets linear/circular mode to clockwise circular.
– G03 – Sets linear/circular mode to counterclockwise circular.
– G04 – A human-readable comment.
– G90 – Set the Coordinate format to Absolute notation.
– G91 – Set the Coordinate format to Incremental notation.
D-Codes or draft codes are instructions to the gerber plotter. Commands D01, D02 and D03 are used to move the optical head to the specified x-y location with the shutter being in different modes. More specifically:
– D01- move to the x-y location specified with the shutter open.
– D02 – move to the x-y location specified with the shutter closed.
– D03 – move to the x-y location specified with the shutter closed, then open and close the shutter – known as flashing the exposure.
– D-Codes with values 10-999 are not commands, but data. They represent apertures or positions on the photoplotter wheel.
M-Codes or miscellaneous codes are used to identify the end of a file. The most commonly used are M00, M01, and M02 which are different types of program stop commands.
Gerber file is alone not enough to expose the film correctly. Another file called aperture or wheel file was needed to specify apertures on the aperture wheel. After that, an operator had to manually operate the photoplotter with the two sets of data and that process was prone to human errors during the operation. Since the RS-274-D gerber format was intended for a manual workflow and could not be automated, it was eventually declared obsolete in June 2014.
RS-274-X
Also called the Extended Gerber format was released in 1998. It is a superset of RS-274-D Standard Gerber. Extended Gerber includes the aperture list in the header of the Gerber data file. G-codes and D-codes from the Standard Gerber format are supported as well as codes referred to as mass parameters. Mass parameters are plot parameters that can affect an entire plot, or only specific parts of the plot, called layers. Their presence makes the Gerber data X data. The Extended Gerber is a clear, powerful, and complete standard to describe PCB layers and is well-suited for automated workflows which is the main reason it superseded RS-274-D. Extender Gerber’s main advantages are that it is supported by all PCB CAD and CAM systems and is thoroughly field-tested and debugged.
RS-274-X and RS-274-D files can be easily distinguished by inspecting the text files in a text editor. RS-274-X gerber file will have mass parameters after which the standard RS-274-D data will follow. A few examples of mass parameters are:
– %MOIN*%
sets units to inches
– %LNBOXES*%
name layer boxes
– %ADD10C,0.010*%
Define aperture D-code 10 – 10 mil circle
As can be observed, mass parameters start and finish with a percentage symbol and have an asterisk (same as RS-274-D data).
When gerber files are exported from a CAD tool (i.e. Altium Designer) in an RS-274-X format, each layer is exported to a separate file and has its own extension. As an example, a standard two-layer board designed in Altium Designer would have the following layers included:
.GTL – Top Copper.
.GTP – Top Paste.
.GTS – Top Solder.
.GTO – Top Overlay.
.BTL – Bottom Copper.
.BTP – Bottom Paste.
.BTS – Bottom Solder.
.BTO – Bottom Overlay.
.GMXY – X and Y being digits to indicate a mechanical layer; mechanical layers can be used to specify board outline and some additional information like board stack-up and board specifications.
However, gerber files are not sufficient to produce the PCB, because the drill data is not included. To transfer drilling information to the factory, Drill data in excellon format is needed as supplementary data aside from the gerber files.
RS-274-X format is widely used in the industry since it is practical, free, and simple. Although the format specifies the layers precisely, there is still a possibility of human errors in PCB production because some information regarding the PCB is not standardized. Critical board information that is not standardized includes layer ordering, layer representation, and differentiation between objects like SMD pads, via pads and component pads. The drawback of this information not being standardized is a potential loss of time in communication between designers and manufacturers.
To address those issues, Gerber X2 format was created.
Gerber X2
Also called Extend Extended Gerber is another extension of the RS-274-D standard released in February 2014. X2 adds attributes on top of the RS-274-X format. Attributes are standardized labels and can be applicable to whole files or just to specific objects. They can be used to define:
Gerber file’s function
Object’s function
PCB profile
Drill tolerances
And more…
It is important to note that Gerber X2 is backward compatible with the RS-274-X standard. This means that the systems that use the older standard will still generate the correct outputs. The added manufacturing data greatly reduces the chance of errors during PCB fabrication. In the case of Altium Designer, all layers exported in X2 format have the same extension (including the drill data).
Gerber X2 plus
Gerber X2 plus was released in April 2018. It expands the Gerber X2 standard by adding of Gerber Job file. The Gerber Job file enables the designer to specify additional board information that was previously not standardized and had to be communicated by means of separate documentation.
The Gerber Job file is in a human-readable format and can be extended by custom information.
It contains information about PCB characteristics like:
Header – information about the files, such as creation date.
General Specifications – overall board characteristics like surface finish, the board size, board thickness…
Material Stack up – specification of the stack up and materials used.
Design Rules – rules used in the CAD software while doing the layout of the board.
Files Attributes – polarity (positive/negative) and function of all Gerber files.
Gerber X3
With the release of the Gerber X2 plus standard, everything was precisely and well defined for the bare board in the gerber files. What was missing were component information and assembly documentation.
Gerber X3 was released in 2020 to address those points. X3 gerber format includes both the PCB layout data as well as the Bill of Materials (BOM) and Component Placement List (CPL). Combining the bare board and component data allows easier review and quicker import of the information to both the PCB factories and assembly houses, thus saving time and money.
X3 is backward compatible with all previous versions.
The owner of the Gerber standards is the company Ucamco. A quick summary of all gerber standards published so far can be seen in their brochure shown in Figure 2.