Exporting Gerbers From KiCad

By Mattyc

1. Open The Board in KiCad

In the main KiCad window open your project. Then, to open the PCB editor, either click the PCB editor button or double click on the pcb file.
 
open board
 

2. Run DRC

Before exporting Gerbers you must always, ALWAYS (mostly), run a Design Rule Check (DRC).  Before you do this, go to the Design Rules Editor (Design Rules->Design Rules) and update the global design rules.
 
open design rules
 
You should only need to change the values labeled in the "Minimum Allowed Values:" section.  Although you should make sure that the "Default Via Type" is set to "Through via" unless you're using a 4+ layer board with blind/burried vias and that "Micro Vias:" is set to "Do not allow micro vias" unless you specifically know your manufacturer allows them.  
If you're sending your gerbers to Breadboard Killer, you can use the values shown in the image below.  If not, the most important ones to enter are "Min track width", "Min via diameter" and "Min via drill dia".
 
design rules editor
 
To run a DRC click Tools->DRC.
open DRC
 
The DRC window opens.
 
DRC control
 
Click "Start DRC" and KiCad will find any locations in your design where design rules have been violated.  
 
DRC control errors
 
Fix any issues that are found and run the DRC again.  Keep checking until you've fixed all the DRC issues or are sure that they won't cause a problem when your board is manufactured.
 

3. Export the Gerber Files

Ok, this is a pretty convoluted and epically difficult process in KiCad so make sure you follow along carefully.  
 
First, click the plot button in the toolbar to open the Plot dialog.
 
open plot
 
Second, in the Plot dialog, make sure that:
 
Plot
 
Third, click "Plot" at the bottom of the dialog.
 
Ok, so I lied, it's actually the simplest gerber export process I've ever used!  In all honesty though there are a few more options you'll want to check out.  
You may want to change the output directory.  It's pretty self-explanatory, just set it to the path where you want your generated gerbers to go.  In addition to that, some of the check boxes in the Options section are interesting to play around with.  Most importantly, ensure that "Mirrored plot" and "Negative plot" are both unchecked.
 
In terms of what layers to export, you'll want at least the following layers:
 
Layer Default KiCad Name
Top Silkscreen F.SilkS
Top Soldermask F.Mask
Top Copper F.Cu
Bottom Copper B.Cu
Bottom Soldermask B.Mask
Bottom Silkscreen B.SilkS
Board Outline Edge.Cuts
 

4. Export The NC Drill Files

Back in the Plot dialog, keep the same settings as above and click the "Generate Drill File" button.  There are a few more options for the drill file export:
 
drill files generation
 
Use the same settings as in the image above for the drill file generation.  The most important options are:
  • the "Drill Map File Format" which should be "PostScript" for NC Drills format,
  • the "Zeros Format" which should be set to "Keep zeros",  and
  • "Mirror y axis" which should be unchecked.  

To export, click the "Drill Fille" button (ignoring the typo by the developers there).

 

5. Check The Generated Files

Almost done!  Before you send you design off to the fab, make sure you check your exported gerbers and drill files in a gerber viewer.  To do this, a good free gerber viewer is gerbv which can be downloaded from here.
Once you've downloaded and installed gerbv, open it and click "File->Open layer(s)...".  Then select the gerber files and drill file you exported from KiCad.
 
gerbv open layers
 
gerbv open dialog
 
This will open the files in the gerbv viewer.  Make sure the layers all line up properly (especially the drill file layer) and that there are no obvious errors.  You can turn layers on or off with the check boxes in the Layers payne on the left.  The example below shows successfully created gerbers with no errors.
 
gerbv loaded
 

6. Zip The Files

Breadboard Killer and most other PCB manufacturers will prefer your files in a single zipped archive.  Gerbers contain a lot of redundant information so zipping them will often reduce the size significantly.  Add all of the files you exported to a zip along with a text file describing which layer is which.  This will ensure that the manufacturer doesn't make any silly errors.
 

7. Profit

And repeat...
 
Hope this tutorial was useful to some of you.
 
And best of luck with your project!