Skip to main content

How to Export Production Files in KiCad: IPC-2581 and Gerber

Author Profile img: Pooja Mitra

By Pooja Mitra

September 16, 2024 | 0 Comments

Reviewer Thumbnail

Reviewed for technical accuracy by Abhishek

PCB Design Lead

how-to-export-production-files-in-kicad-ipc-2581-and-gerber.jpg

Contents

webinar image
On-demand webinar

How Good is My Shield? An Introduction to Transfer Impedance and Shielding Effectiveness

by Karen Burnham

Exporting the correct design files is crucial for the smooth production of your PCB. KiCad supports industry-standard formats like IPC-2581 and Gerber. Each of these formats provides detailed information essential for different stages of production.

In this KiCad tutorial, you will learn how to export IPC-2581, Gerber, and other production files.

Production files supported by KiCad

After completing the design, the next step is to export production files in KiCad.

The set of files that are required for the production of PCBs are as mentioned below:

  1. IPC-2581: It is a unified design data format, enabling seamless data exchange between designers and fab houses.
  2. Gerber files: Gerber is a standard file format for exporting PCB designs. Your design will be saved and shared in this format for production.

These are the files containing production information for each layer of a PCB.

    1. Top etch
    2. Bottom etch
    3. Middle layer etch
    4. Top and bottom silkscreen
    5. Top and bottom paste mask
    6. Top and bottom solder mask
    7. Top and bottom assembly
    8. Fab details
    9. Board outline
  1. NC drill: This file gives information about all the holes required in the board. It will serve as an input to the drill machine to drill the required holes on the board.
  2. Component placement file: The machine uses this file to identify the X-Y location of the various components on the board using coordinates.
  3. IPC 356 netlist: It gives information about the connections between various components. Once you create your netlist, ensure it matches your schematic netlist.
  4. PDF: Generate PDFs for the following:
    • Top and bottom assembly
    • Fab details
    • All layers
    • Top and bottom silkscreen
    • Board outline
    • Schematic
    • Stack-up report
    • Top and bottom solder mask (optional)
    • Top and bottom paste mask (optional)
  5. Bill of material: The BOM consists of all the components used in your board and the manufacturer part numbers that will help the PCB manufacturer identify the components.

You need to export these production files using KiCad to manufacture your design. Let’s check how these files are generated in KiCad.

Steps to export production files in KiCad

Exporting the IPC-2581 file in KiCad

Step 1: Go to File –> Fabrication Outputs –> IPC2581 File (.xml). The Export IPC-2581 dialogue box will appear.

ipc-2581-file-export-kicad.jpg
Path to open the Export IPC-2581 dialogue box in KiCAD.

Step 2: Choose the destination folder and enter the output file name.

ipc-2581-export-destination-in-kicad.jpg
IPC-2581 export destination in KiCad.

Step 3: Choose the desired measurement units, precision, and IPC-2581 version.

IPC-2581-export-KiCAD-version.jpg
Details in the Export IPC-2581 window of KiCAD.

Step 4: Click Export to get started with the IPC-2581 file generation.

exporting-ipc-2581-in-kicad.jpg
Exporting IPC-2581 in KiCad.

The unified file is then shared with the fabricators. They import the smart design data file using CAM systems to produce PCBs based on the design data provided by designers.

By using IPC-2581, you eliminate the need to generate separate files for Gerber, drill, and netlist, streamlining the design and manufacturing processes.

For step-by-step guidelines on designing a PCB using KiCad, download our eBook.

KiCad Design Guide - Cover Image

KiCad Design Guide

10 Chapters - 161 Pages - 180 Minute Read
What's Inside:
  • Creating a component symbol library
  • Setting up board parameters and rules
  • How to route differential pairs
  • How to place of components

 

Exporting Gerber files in KiCad

Generating Gerber files in KiCad is a straightforward process. Follow these steps to export your PCB design for manufacturing.

Step 1: Click on Plot in the top toolbar.

plot-icon-in-kicad-for-exporting-gerber-files.jpg
Plot icon in KiCad version 8 for exporting Gerber files.

Alternatively, you can go to File –> Plot from the menu bar.

navigate-to-plot-for-exporting-gerber-in-kicad.jpg
Navigate to Plot for exporting Gerber in KiCad.

This will open the Plot dialogue window, where you can configure the Gerber file settings.

Step 2: Configure the Gerber settings.

plot-dialog-box-in-kicad-for-exporting-gerber-file.jpg
Plot dialogue box in KiCad for exporting Gerber files.

In the Plot dialogue window, choose the following settings:

  1. Choose Gerber as the output format from the Plot format dropdown menu.
  2. Specify the directory where you want to save the Gerber files. It’s a good idea to create a separate folder named “Gerber” within your project files to keep everything organized.
  3. Under the Include Layers section, select all the layers you need for the Gerber files. For a 4-layer PCB, select all four layers. Additionally, select:
    • F.Paste (front paste)
    • B.Paste (bottom paste)
    • F.Silkscreen (front silkscreen)
    • B.Silkscreen (bottom silkscreen)
    • F.Mask (front soldermask)
    • B.Mask (bottom soldermask)
    • Edge.Cuts (defines the actual boundary of the PCB)
    • F.Fab (front fab)
    • B.Fab (bottom fab)
  1. Select the Edge.Cuts and User.Drawings layers options under Plot on All Layers. This will ensure the board outline and fabrication details are visible on all layers.
  2. Under General Options, make the following selections:
    • Deselect Plot footprint values as component values are typically not plotted on the PCB.
    • Check Plot reference designators, Plot footprint text, Sketch pads on fabrication layers, and Use drill/place file origin.
    • Select Tent vias to cover vias with soldermask.
  3. Enable Subtract soldermask from silkscreen under Gerber Options to automatically remove any overlapping silkscreen from solder mask openings. While fab houses usually handle this, you can also configure it in KiCad.
  4. Check Use extended X2 format if supported by your fabrication house. If your manufacturer doesn’t support X2, uncheck the option to use the standard format.

Step 3: Once all settings are configured, click Plot to generate the Gerber files. The files will be saved in the directory you specified.

After the files are generated, check the Output Messages section in the Plot dialog to confirm that all files were successfully created.

output-message-section-in-kicad.jpg
The Output Messages section gives the path where the generated Gerber files are saved.

Keep the dialog open for any additional steps, such as generating drill files or making final adjustments.

Your Gerber files are now stored in the designated folder, ready to be sent to your manufacturer.

Check the generated files for common problems associated with Gerber files, such as incomplete files, empty Gerber files, unregistered layers, etc.

Checklist for generating Gerber files

Once the routing is completed, you can export the Gerber files. However, ensure your design accurately matches the schematics and layout before generating them.

To ensure that, we have created a checklist below.

1. Bill of materials (BOM)

Ensure that the PCB bill of materials accurately reflects the schematic, confirming that component footprints, values, and other details match the manufacturer’s part numbers.

2. Schematic

Verify that all component values are correct, components are placed properly, and quality markings are accurate within the circuit.

3. Layout

Check whether you have placed all components required for manufacturing as per your design requirements.

Include any necessary details in the fabrication drawing, such as fab, dimensions, and stack-up data.

Generating drill files

Step 1: After generating the Gerber files, in the Plot dialog box click on Generate Drill Files.

settings-to-generate-drill-files-in-kicad.jpg
Settings to generate drill files in KiCad.

A new Generate Drill Files window will appear.

Step 2: Configure the settings in the Generate Drill Files window.

settings-for-generating-drill-file-in-kicad.jpg
Settings for generating drill files in KiCad.
  • Select the Output folder where you want to save the file. Save the drill file in a separate drill folder.
  • Make sure you have selected PTH and NPTH in single file.
  • Choose Gerber X2 as the drill file format only if your fab house supports it.
  • Select the Dill origin as Drill/place file origin.
  • Select the Drill units as Inches.
  • Under Map File Format, choose PostScript.

Step 3: Click Generate Drill File to create the drill file.

Step 4: To create a map file that shows the dimensions of the holes in the drill chart, click on Generate Map File. Select Gerber X2 as the preferable map file format before generating the file.

generating-map-file-kicad.jpg
Generating map file in KiCad.

Step 5: Save the map file in the same location as your Gerber files. After saving, you will receive a notification in the Messages box confirming that the files have been saved.

Saving the component placement files

Step 1: Go to File > Fabrication Outputs > Component Placement (.pos, .gbr).

steps-to-save-component-placement-files.jpg
Steps to save component placement files (.pos, .gbr).

Step 2: The Generate Placement Files window will appear. Choose the settings to generate the position file.

generate-position-file-kicad.jpg
Settings in the Generate Placement Files window to export production files in KiCad.
  • Select the Output directory where you want to save the file.
  • Under Format, select CSV, which will generate the position file in an Excel format.
  • Select the Units in Inches.
  • Under Files, if you select Single file for board, all the top and bottom components will be in a single file. To generate two different files for the top and bottom layers, select Separate files for the front, back.

Step 3: Click the Generate Position File to create the component placement file.

click-generate-position-file-kicad.jpg
Export the component placement production file in KiCad.

This saves the placement file in an Excel format in the selected folder.

After the file is saved, you will receive a notification about the saved file location in the Output Messages box.

position-file-in-excel-format-generated-using-kicad.jpg
Component placement file in an Excel format generated using KiCad.

The placement file in KiCad provides the precise X-Y coordinates for each component on the PCB, allowing the assembly machine to accurately place components in their correct positions on the board during manufacturing.

KiCad version 9 introduces enhanced STEP export functionality, allowing you to export a selected subset of components directly from the PCB editor.

Downloading the netlist file from the PCB layout editor

Step 1: Go to File > Fabrication Outputs > IPC-D-356 Netlist File.

downloading-the-ipc-d-356-netlist-file-from-kicad-pcb-editor.jpg
Downloading the IPC-D-356 Netlist File from KiCad PCB editor.

Step 2: Choose the location to save the file. Enter the file name and save it. The netlist file will be exported to this location.

export-ipc-d-356-netlist-file.jpg
Saving the IPC-D-356 netlist file.

Exporting BOM file

Step 1: Go to File –> Fabrication Outputs > Bill of materials.

exporting-the-bom-in-kicad.jpg
Exporting the BOM in KiCad.

Here, we need to follow the steps similar to the ones we used for netlist generation.

 

tool-image

PCB DESIGN TOOL

BOM Checker

Calc TRY TOOL

 

Generating PDFs

Follow these steps to generate PDFs in KiCad.

Step 1: Click on the Plot in the top toolbar.

plot-icon-gerber.jpg
Plot icon in KiCad.

Step 2: In the Plot window, under Plot format, select PDF.

generating-pdfs-in-kicad.jpg
Select PDF as the Plot format to generate PDFs in KICad.

Step 3: Configure the following settings to generate PDF.

settings-for-generating-pdfs-kicad.jpg
Settings for generating PDFs in KiCad.
  1. Select the Output directory where you want to save the file.
  2. Under Include Layers, select F.Fab (front fab) and B.Fab (bottom fab).
  3. Under Plot on All Layers, select Edge.Cuts.
  4. In General Options select:
    • Plot footprint values
    • Plot reference designators
    • Plot footprint text
    • Force plotting of invisible values/refs
    • Sketch pads on fabrication layers
  5. In General Options deselect Check zone fills before plotting.
  6. Deselect Use drill/place file origin.

After selecting the desired options, click on Save.

Step 4: Click on Plot to generate the top and bottom pdf files.

The top section will include your assembly information, showing the placement of your components.

top-layer-details-generated-using-kicad-in-pdf.jpg
Top layer details in PDF.

The bottom of the PDF will display all the outlines and various designators.

bottom-layer-details-in-pdf.jpg
Bottom layer details in PDF.

Generating a PDF of fabrication details in KiCad

Step 1: Open the Plot dialog by clicking on Plot from the toolbar.

Step 2: Configure the settings for the PDF output. Under Plot format, select PDF from the dropdown. Under the Output directory, choose where you want to save the PDF.

Step 3: In the Plot window, under the Include Layers section, select User.Drawings. Uncheck all the other layer options.

Under Plot on All Layers, select Edge.Cuts. Retain all the other settings in the Plot window.

user-drawing-layer-for-generating-fab-details-kicad.jpg
User.Drawings layer for generating fab details in pdf.

Step 5: Click Plot to generate the PDF for the User.Drawings layer. This PDF will contain all relevant fabrication details, including the board outline, dimensions, characteristics, and stack-up information.

user-drawing-fab-details-in-pdf-kicad.jpg
Fabrication details are generated in PDF using KiCad.

Verifying production files using Gerber Viewer in KiCad

Gerber Viewer is a powerful tool that allows you to view and verify Gerber files, which are used to describe the layers of a printed circuit board.

Step 1: Click on the Gerber Viewer in the KiCad project manager window with various tools listed.

kicads-gerber-viewer-icon.jpg
KiCad’s Gerber Viewer icon.

Step 2: To load Gerber files into Gerber Viewer, click on File –> Open Gerber Plot Files(s).

open-gerber-plot-files.jpg
Load Gerber files into Gerber View

Select all the Gerber files and hit Open.

selection-of-gerber-files-kicads-gerber-viewer.jpg
Selection of Gerber files in KiCad’s Gerber Viewer.

You can load multiple Gerber files at once, each representing different layers of your PCB (e.g., top copper, bottom copper, solder mask, etc.).

Step 3: To load drill files (usually with extensions like .drl) in Gerber Viewer, click File > Open Excellon Drill File(s).

open-excellon-file.jpg
Load drill file in Gerber Viewer.

Then browse and select your drill file from the location where it was saved and click Open.

Step 4: To view and verify the drill map, click on its layer file in the Layer Manager.

drill-map-kicads-gerber-viewer.jpg
Drill map in KiCad’s Gerber Viewer.

The drill map file typically has a .gpr extension. It contains detailed information about all the drill holes in your PCB, including the quantity of each hole size (e.g., 4 holes, 12 holes, 28 holes), their sizes in millimeters and inches, and the shapes assigned to each hole.

To ensure everything matches the drill map, click on both layers (drill file and drill map) in the Layer Manager. Cross-check that all the drills are correctly aligned and overlapped.

alignment-of-drills-in-kicads-gerber-window.jpg
Alignment of drills in KiCad’s Gerber Viewer.

Step 5: View and analyze the Gerber Files on the right side of the Gerber Viewer window. You’ll see a list of loaded layers.

You can select each layer from the Gerber Viewer by checking or unchecking the boxes next to the layer names to check whether all the files in the board follow the layout design. You can also select several layers at a time for an overlapping view.

 power-copper-layer-in-gerber-view.jpg
The power copper layer in Gerber Viewer.

Once your files are verified, you can send the files for manufacturing. Send the files in a single zipped compressed file format. This will ensure that there are no errors during the transmission of the files.

You need to check and verify each of your layers and the edge cuts carefully. If you find errors in Gerber Viewer, you’ll need to go back, fix the errors in your layout, and then re-generate Gerber files using the plot tool. It is easier to fix them at this point as it won’t be easy later on.

If you want to validate the KiCad design files and get a real-time cost estimate, check out our KiCad Quote Plugin. This will enable you to get an instant quote without quitting the KiCad user interface.

Have queries on PCB design, assembly, and manufacturing? Post them on our forum, SierraConnect; our experts will resolve them.

sierra-connect-banner.jpg

post a question
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Talk to a Sierra Circuits PCB Expert today

24 hours a day, 7 days a week.

Call us: +1 (800) 763-7503
Book a Meeting with a Sales Rep
Email us: through our Customer Care form