Acoptex.Com

Learn ESP32, ESP8266, Arduino, and Raspberry Pi

How to generate Gerber and drill files from KiCad v5

We will learn how to generate Gerber and drill files from KiCad v5.

Tag: Project 135c How to generate Gerber and drill files from KiCad v5. Acoptex.lt

Project resources

What is KiCad?

KiCad is a free, easy to download software that is used for electronic design automation (EDA) and computer aided design (CAD). While using this program, PCB design schematics can be realized from their electrical circuits. Within, there are tools that allow the creation of a bill of materials (BOM), artwork, 3D view of the PCB + components and gerber files.

What are Gerber files?

Gerber files are the artwork of the layers that will be used to construct the board once it’s being fabricated. The industry standard file type used for manufacturing and assembling PCB’s are Gerber file types. We send these Gerber files and production files of the design to the manufacturers to manufacture a PCB. Manufacturers send this data to plotters and Computer Numerical Controlled (CNC) machines to fabricate a PCB.

Step by Step instruction

We assume that you have the KiCAD already installed, added a component to the schematic, modified the PCB layout, and checked for errors. So we are confident and ready to have our boards made! It’s a time to export the Gerber files.

1.Open KiCad. Go to File -> Open Project… and select the project to open. Click on Open button.

how to generate Gerber and drill files from KiCad
how to generate Gerber and drill files from KiCad

2.Click on PCB Layout Editor button.

how to generate Gerber and drill files from KiCad

3. Go to File -> Plot, or find the plot icon on the main menu. This will bring up the plot window.

how to generate Gerber and drill files from KiCad
how to generate Gerber and drill files from KiCad

4. There are 8x layers you need to have a PCB fabricated:

  • Top Copper (F.Cu)+ Soldermask (F.Mask) + Silkscreen (F.SilkS)
  • Bottom Copper (B.Cu) + Soldermask (B.Mask) + Silkscreen (B.SilkS)
  • Board outline (Edge.Cuts)
  • Drill file

Make sure that in the Plot window you have these settings:

Plot format field set for Gerber;

Included Layers field- select the these layers:

  • ☑ F.Cu
  • ☑ B.Cu
  • ☑ B.SilkS
  • ☑ F.SilkS
  • ☑ B.Mask
  • ☑ F.Mask
  • ☑ Edge.Cuts

If you don’t know which layers, please check all layers, PCBWay will help you to use the right layers. If your boards are single or multi-layered, please select the necessary layers. Please note that all mechanical elements such as cut-outs and v-cuts should be drawn in the Edge.Cuts layer. If you need the paste layers for stencil orders, please check B.Paste and F.Paste as required;

Output directory field – Select output directory for your Gerber Files. Create a new directory so you can create a ZIP archive from it later;

Gerber Options group – make sure that the Use Protel filename extensions and Generate Gerber job file are selected, Use extended X2 format is deselected as this will effectively convert the format of your Gerber files to X2, which not all manufacturers equipment supports;

how to generate Gerber and drill files from KiCad

5. Click on Generate Drill Files… button. Generate Drill Files window will pop-up. Select Suppress leading zeros and Minimal header options. We also suggest you select the option PTH and NPTH holes in single file, otherwise KiCad will separate plated and non-plated holes into two drill files, and if one is missing, there will be holes missing on your boards. Click on Generate Drill File button.

how to generate Gerber and drill files from KiCad

6. Under the messages window will show where the drill files have now been generated. Click on Close button to return to the previous window.

how to generate Gerber and drill files from KiCad

7. Click on Plot button to generate the Gerber files for the layers. Click on Close button.

how to generate Gerber and drill files from KiCad

8. Once your Gerber files have been generated, they can be reviewed to catch any potential errors before being sent to us for a PCB fabrication quote. Return to the main KiCad project window and click on Gerber viewer button.

how to generate Gerber and drill files from KiCad

9. Go to File -> Open Gerber Plot File(s)… Select the Gerber plot files and click on Open button.

how to generate Gerber and drill files from KiCad
how to generate Gerber and drill files from KiCad
how to generate Gerber and drill files from KiCad

10. Go to File -> Open Excellon Drill File(s)… Select the Drill files and click on Open button.

how to generate Gerber and drill files from KiCad
how to generate Gerber and drill files from KiCad
how to generate Gerber and drill files from KiCad

11. Once all of your layers have been imported into GerbView, you can perform all your final checks (you can view each layer one by one and so on). Once you are satisfied that your design is correct, you will be ready to quote and order your boards.

12. Navigate to the directory in your PC where your KiCad project located. Select and zip the following 8x files (You can use 7Zip software for that):

  • *.drl – Drill file
  • *.gbl – Gerber Bottom Layer
  • *.gbs – Gerber Bottom Soldermask
  • *.gbo – Gerber Bottom Silkscreen (Overlay)
  • *.Edge.Cuts.gm1 – Board Outline (Gerber Mechanical 1)
  • *.gtl – Gerber Top Layer
  • *.gts – Gerber Top Soldermask
  • *.gto – Gerber Top Silkscreen (Overlay)
how to generate Gerber and drill files from KiCad

13. You can now use this zip file to place the order on the any PCB manufacturer website.

14. In addition to your gerbers, you’ll need to specify on the PCB vendor’s website various elements of the PCB:

  • What thickness PCB? 1.6mm is standard but 0.8mm is just as rigid and may help with 50 ohm trace impedance matching.
  • What color soldermask? Green is default but red looks awesome.
  • What color silkscreen? White is most common but other colors are available.
  • How many layers? This example is a 2x layer board meaning there is just a top copper and bottom copper. However, some designs need to have 4x, 8x, 10x and even 16x layers to route the board. Additional layers increase the cost significantly.

Wrapping up

We have learnt how to generate Gerber and drill files from KiCad v5.

If you need more information on PCB and design, check out Printed circuit board and terms used in connection with PCB design and manufacturing

Thank you for reading and supporting us.

Check for more DIY projects on Acoptex.lt and Acoptex.com!

If you are looking for high quality PCBs PCBWay is the best choice: