Designing a printed circuit board in a CAD tool (e.g., KiCad, Eagle, Altium) is a stage that requires design skills and planning of traces, pads, and component layout. The design itself, although important, is not enough to start production.
PCB factories do not read the internal formats of design tools. They need a standard set of Gerber files, a drill file, and correct data on geometry and layers. Only a complete file package makes it possible to properly start the CNC production process and etching.
In this article, we describe in detail how to generate a complete set of production data and how to avoid typical mistakes that can delay production or cause costly manufacturing errors.
What exactly are Gerber files, and why are they the standard?
Designs created in EDA programs have their own closed file formats. They are useful during design, but they are not suitable for direct use in printed circuit board production, because the information they contain cannot be read by production machines. Gerber files are a way of converting a PCB design into a universal vector format, in which every element of a physical layer is saved as a set of precise objects in ASCII format.
The Gerber RS-274X format is an extended version of the standard that allows shapes, holes, and fills to be accurately reproduced on each PCB layer. Each layer of the design is saved as a separate file, and production systems read this data to precisely determine the copper areas, the position of traces, and the places intended for processing in subsequent manufacturing stages.
Gerber files are therefore a universal language for production machines, automated optical inspection (AOI) systems, and CAM software. Their correct structure has a direct impact on the precision and quality of the printed circuit board.
Anatomy of a production package – what must it contain?
A complete set of production files for a standard double-sided board contains files corresponding to the individual layers as well as additional descriptive data. Each file has an assigned function and represents a different physical layer or control data.
Copper layers
The copper layers form the electrical structure of the board and are responsible for routing signals correctly. It is this system of connections that determines what a PCB is used for in a given device. They contain information about the position of traces and solder pads, which allow the individual components of the circuit to be connected.
For a standard double-sided board, two files are needed:
- Top (top layer) – corresponds to the side on which components are mounted; it contains signal traces and pads for surface-mount (SMD) components.
- Bottom (bottom layer) – contains the traces and vias located on the opposite side of the board.
In multilayer designs (e.g., 4, 6, or 8 layers), more files are created to describe the inner power and signal layers. Each of them is prepared separately and then combined with the others in the laminate pressing process.
Solder mask layer
It defines the areas that are to be covered with a protective coating and the places that are to remain exposed (solder pads). Missing or incorrect mask data can result in too much exposed copper or covered soldering areas.
A correctly prepared solder mask layer affects the durability of the board and the appearance of the finished product, so it should always be carefully checked in a Gerber preview before being sent to production.
Legend layer (Silkscreen/Overlay)
It contains printed component identifiers, component outlines, and markings that make assembly and servicing easier. It is intended for the assembler and for quality control. Incorrect data on this layer can cover pads or make component codes hard to read. A properly prepared print also makes it easier to identify faults during testing and service repairs.
The legend layer should be prepared separately for the top side (Top Overlay) and the bottom side (Bottom Overlay), even if no components are planned on the other side of the board.
Board outline (Mechanical/Profile)
The outline file defines the external shape of the PCB and is essential for milling machines. It contains the coordinates of the contour, cutouts, and any mounting holes. Based on it, the manufacturer determines the final dimensions of the board and the panelization method, i.e., how multiple copies are arranged on a larger laminate sheet.
The outline should be unambiguous, i.e., without overlapping lines, double contours, or discrepancies between the format and the actual design. The safest option is to save it in a separate file with the .GKO or .GM1 extension, which makes it easier to identify during production preparation. If the outline file is not included, the manufacturer will not be able to determine the exact boundaries and dimensions of the board.
Drill files (Excellon)
These files are not Gerber files, but a separate standard that describes the coordinates and diameters of holes. They are most often saved in Excellon format, which CNC drilling machines can read. They contain the coordinates of holes to be drilled for THT or for vias. Without them, it is impossible to make mounting holes and connections between layers, and incorrect data can lead to holes not lining up with solder pads or to missing electrical connections.
A complete set of Gerber and Excellon files is the only source of information on the basis of which the production plant prepares tooling and defines the contour, drilling, and the layout of the copper and mask layers. Preparing them correctly is the basis of an error-free PCB manufacturing process.
Standard parameters – a safe starting point
Adopting standard design parameters makes production easier and lowers its cost. PCB factories optimize their processes for the most commonly used values, which in turn affects the availability of materials and tools.
A typical choice of laminate is FR-4 material with a thickness of 1.6 mm. This thickness provides adequate rigidity and is widely accepted in series production.
The standard copper thickness is 35 µm (1 oz). It provides a balance between conductivity and the ability to etch fine traces. Variants with thicker copper or a different laminate thickness can be accommodated, but they must be clearly specified in the production documentation.
Providing standard parameters together with the Gerber files speeds up the quoting and manufacturing process.
The 5 most common mistakes when generating files (and how to avoid them)
Generating a Gerber file package is often automated, but without deliberate checks the designer is exposed to typical mistakes that cause production problems.
- Missing outline file – The machine does not know where to mill the shape of the board. A missing layer leads to dimensional errors or a production stop. In such a situation, the manufacturer often assumes too large a safety margin, so the board dimensions change and may not fit the enclosure.
- Legend on solder pads – If the legend layer overlaps the pads, the solder mask may be peeled off or covered. This causes problems during manual or automatic soldering. In extreme cases, the print on a pad acts as a barrier, completely preventing the solder from flowing and leading to open circuits.
- Insufficient clearance – Designing traces with spacing smaller than the etching process tolerance results in short circuits or trace etching errors. Incorrect spacing can also make visual or automated inspection (AOI) more difficult, extending production time and increasing the risk of quality rejects.
- Outdated ground pours (Zone fills) – Polygons that have not been updated after changes to the design may contain gaps or incorrect connections. Pours should always be refreshed before exporting files. Neglecting this step causes errors in ground connections, which can lead to operational interference or complete failure of the circuit.
- Mirroring – Incorrectly setting the layer orientation during export can cause text and integrated circuits to be saved as a mirror image. This error often occurs when transferring data from the design program to the production format. As a result, the board is made the wrong way around, and the components cannot be mounted correctly. This means the entire batch has to be made again.
Once these mistakes are eliminated, the risk of failure during production drops significantly, and the documentation sent to the factory is fully consistent with the design.
Final step: verification (Gerber Viewer)
Before sending the files to production, it is worth opening them in a Gerber Viewer program and carefully analyzing each layer. This check makes it possible to verify that the drill holes line up correctly, that the pads are in the right position, and that all elements of the design are complete.
TIP
As PCB manufacturing specialists, we recommend using free Gerber file viewers. They let you check whether the trace layout, the mask, and the legend layers match the original design.
Also remember never to send files “blind.” Verification before sending to the factory minimizes the risk of costly rework and delays.
Do you already have finished and verified Gerber files?
Great! Send them to us, and we will take care of the rest – from etching, through drilling, to component assembly.
