This website requires JavaScript.

How to generate Gerber and Drill files in KiCAD 8?

How to generate Gerber and Drill files in KiCAD 8?

After finishing your PCB design in KiCAD 8, the last step before ordering PCB is to prepare and generate files required for manufacturing. This step is called generating Gerber and Drill files. PCB fabrication company will use these files to manufacture your boards. In this step, 3 type of files is being generated:


-Gerber files

-Drill files

-Drill map files


For the purpose of this tutorial, we're using the example "6LoWPAN Gateway" demo project.


All the steps are tested on the latest 8.04 version, if you are using a slightly different version, there might be minor differences.



Manufacturing Capabilities


Before starting the process of generating Gerber files, make sure to check the manufacturing capabilities of your choosen manufacturer. It is recommended to adjust design rules in your project per manufacturer specification even before you begin routing the PCB. This will prevent having to re-design parts of the board that are out of the specification. The most critical are minimum trace width and spacing, minimum clearance, minimum drill/hole size…


Setting your design rules correctly will also affect the DRC check and reduce the possibility for the problems to the lowest.


JLCPCB Manufacturing Capabilities can be checked here - PCB Capabilities



Generating Gerbers


IMPORTANT - make sure to run DRC check once again before generating the files.


While using PCB editor window open File → Fabrication Outputs → Gerbers (.gbr).




(Figure 1. PCB Editor Menu)


To order PCB's from JLCPCB, the default settings from KiCAD can't be used, few settings changes are required.



Output folder selection


After selecting to generate the Gerber files through the Fabrication Outputs, the Plot menu will open. First, make sure to select the output folder location. You can click the browse icon to select/create the target directory or just type the folder name you want. When generating the files, KiCAD will create the folder automatically.



   

(Figure 2. Output folder selection)



Layer selection



On the left side of the Plot window, you can select which layers from your board design are going to be converted and included in the Gerber files.


List of layers that should be selected:


-F.Cu  

-B.Cu

-F.Paste

-B.Paste

-F.Silkscreen

-B.Silkscreen

-F.Mask

-B.Mask

-Edge.Cuts - (contain the board outline/cutouts.)





IMPORTANT - if 4 or more layer PCB design is used, don’t forget to select inner copper layers too.

             

-In1.Cu, In2.Cu … - (needed for 4/6 layer designs.)


In KiCAD, layers are named as front and back. Layers with F. (for Front) and B. (for Back), but please note copper layer names can be changed in File → Board Setup.



General and Gerber Options



After selecting the required layers, jump to General Options and check these:



-Select Plot reference designators, otherwise designators will not appear on silkscreen layers;

-Select Plot footprint text;

-Select Check zone fills before plotting;

-Select Tent vias;

-Select Use Protel filename extensions, this is recommended as JLCPCB prefers Protel filename extensions;

-Select Subtract soldermask from silkscreen, this ensures no silkscreen on pads;




(Figure 3. Layers and General Options selection)



Now, click the Plot button at the bottom of the window.


All generated Gerbers will be put in the target folder you specified before. If the zone fills are out of date and you forgot to refill them, when Check zone fills before plotting is ticked, KiCAD will ask you to confirm, just click Refill, then the file generation will continue.


To order PCBs, the Drill files are also required.



Generate Drill files


After generating the Gerber files with the pressing of the blue "Plot" button in the bottom right corner, the Plot window will still remain open.


Now press the "Generate Drill files..." button.

Output folder automatically remains the same as for the gerber files. Check these options:


-Check Use alternate drill mode for "Oval Holes Drill Mode";

-Check Absolute for "Drill Origin";

-Check Millimeters for "Drill Units";

-Check Decimal format for "Zeros Format";




(Figure 4. Drill Files selection)



Click the Generate Drill File button, the drill files will be generated and stored in the output folder.



Generate Drill Map file


Generating the Drill Map file is optional, but highly recommended.

This can be done in the same window as for the drill files. Just press the "Generate Map File" button and everything is going to be done automatically.


The Drill Map file provides additional information for drill holes, it is for human reading, it indicates which holes are plated and which are not, it also indicates total slotted holes. More information, less probability of error.




(Figure 5. The Drill Map File)



File Verification



Before uploading your Gerber files to JLCPCB for production, it's highly recommended to cross-check the generated files with a 3rd-party Gerber viewer.


When you are checking the file, please pay attention to the following items.


1. Does the board outline exist?

2. Is the board outline watertight(continuous/no gaps)?

3. Do all inner cutouts, unplated slots, V-cut lines show in the GM1 layer correctly?

4. Do all drilling holes shown and are aligned with other layers correctly?

5. Are vias covered or exposed as per your design?

6. And the Silkscreen, do they look good?

7. etc.


If you find any issues, fix them and export the Gerber/Drill files and check them in the Gerber viewer again.

There are some nice Gerber viewers here and there, just use the one you feel handy.


If everything is OK, now you can zip the out folder and place the order.


Last updated on July 22, 2024