- In the 1980s Gerber Systems Corp
developed a file format for providing data
to their photo plotters.
PCB manufacturers picked up this format
because vector photo plotting was very similar
to manufacturing printed circuit boards.
This format is freely available for use
and is known as the Gerber format or just Gerber.
Some board houses like OSH Park will let us
just send them our KiCAD project files
but this isn't always the case.
So it's good practice to know how to generate
a set of Gerber files to send to a PCB manufacturer.
As Gerber files are almost universally accepted.
Most often you'll generate a Gerber file
for each layer on your board.
For example you'll have a Gerber for your top copper,
then you'll have another Gerber file for your soldermask
and one for your silkscreen and so on.
The file showing drill hit locations
isn't technically in Gerber format
but it's normally bundled with all your Gerber files anyway.
From KiCAD, open up your layout file with PCB new.
Select file, plot.
At the top of the pop-up window,
you'll see the folder location for your files, click browse.
Make sure you're in your project directory.
Make a new folder called Gerbers, select it
and click select folder.
Click yes if asked to use a relative path.
On the left side, you'll see which layers from
our board design we want to turn into Gerber files.
If you like to have a good visual checklist,
then head to oshpark.com, scroll down
and select see all docs.
Click on KiCAD under design tool help.
Click on the guide on generating
and submitting Gerbers link.
Scroll down and you'll see a list of layers that
you'll need, it looks like we need the top and bottom
silkscreen layers, front and back copper, and edge cuts,
The In1 and In2 layers are only needed
for four layer boards, which we don't have.
It also gives us which options we need to check.
I'll put the windows side by side,
so you can see where I'm getting this information from.
To start make sure the front and back copper layers
are checked as well as the front and back silkscreen layers.
Check front mask, back mask, and edge cuts.
The mask layers show where soldermask needs to go
and the edge cuts layer is our board outline
with the slot cut out at the top.
Make sure plot sheet reference on all layers
is unchecked and make sure that exclude PCB edge layer
from other layers is checked.
We want the part reference designators to show up
on the board so leave that checked.
But we don't want the values to be printed,
so uncheck plot footprint values.
OSH Park recommends checking use Protel filename extensions
so we'll do that, click plot and the Gerber files
will be generated and saved in the Gerbers folder.
This covers all our board layers but
we still need to make a drill hit locations file.
Click on generate drill file.
According to the OSH Park page, it looks like
we want to keep inches and decimal format.
We'll use postscript and leave everything else default.
Click drill file to create our drill hit locations file
and click close, close out of the plot window as well.
Feel free to save your PCB layout file again just in case.
We're done with PCB new for now,
so you can close that and your browser window.
We're actually done with our layout,
so we could just send our Gerbers off to OSH Park
to be produced, however it's always a good idea
to check your Gerbers to make sure all the layers line up.
Lucky for us, KiCAD has a tool to do that.
Back in the KiCAD project manager,
select tools, run Gerbview.
I usually like to look at the drill file first.
Select file, load excel on drill file.
You should be looking at your project directory
so navigate into the Gerbers folder.
If you view all files, you should see
that our .DRL drill file should be here,
along with our Gerber files.
Select the 555_badge.drl file and click open.
You should see a number of circles appear down
and to the right from the origin.
Zoom in, these are what the through holes
and vias will look like on our board.
Next I like to see how the drill hits line up
with the board outline.
Select file, load Gerber file.
Select the edge cuts file and click open.
You should see our badge outline
surrounding the drill holes, if any drill holes
are outside the board outline, it means something
went wrong and you'll likely need
to check your layout design
and re-export your Gerbers or drill file.
Let's take a look at the top layer.
Click file, load Gerber file.
Select the front silkscreen file and click open.
Do the same thing for the front mask file
and repeat it once more for the front copper file.
This is what the top of your board will look like.
On the right side, uncheck the three top layers
we just added to turn off their visibility.
Click to turn on just the top soldermask.
You should see colored circles appear over your drill hits.
These show the soldermask keep out, meaning soldermask
will be applied everywhere except for over your drill holes.
Click to turn on the top copper layer.
You should see your traces and ground port appear inside
your board outline, turn off the soldermask layer.
The traces should connect the areas around the drill hits.
Finally turn on the silkscreen layer,
which is known as legend in Gerbview.
This is what will be drawn on the top of your board.
Notice that the part reference designators are shown
which will be helpful for putting parts
in their right locations.
Turn off the top layers, leaving the drill and board
outline layers on, repeat this process
with the bottom layers, note that the order
in which you load them matters, layers on the top
of the list will be drawn on top.
So load the back silkscreen first, then
the back soldermask, and finally load the back copper.
Toggle the bottom layers on and off
to make sure everything looks like it lines up.
You can turn on all the layers if you wish,
but I find it's not as helpful as toggling
only a few layers at a time.
When you're convinced that everything looks good,
close out of Gerbview, we don't need to save anything.
This part can be tricky, if you find errors in Gerbview,
you'll need to go back to PCB new, fix the errors
in your layout and then re-generate Gerbers
using the plot tool.
Take your time examining the Gerbers, if you find
any errors now it's way easier to fix them
then it is when you have the boards in hand.
When you're ready, it's time to order.
The first thing we need to do is zip our files.
Navigate to your project directory and go to
the Gerbers folder, use whatever zipping program
you like to compress and bundle your Gerbers and drill file.
I'll name mine 555_Badge_v01_Gerbers.zip.
Navigate to oshpark.com and click on the giant
browse for files button, navigate to your project directory
and select your dot zip file.
Click open, wait a moment and OSH Park
will process the files.
Carefully look at the top and bottom renderings
of how you're board will look.
If you see anything that's off,
you'll want to go back into KiCAD and fix it.
Sometimes I find that if a layer isn't there,
or something looks very wrong,
it probably means you don't have your
board outline completely closed in.
For example even though this board looks correct,
if we zoom in on this corner of the board outline,
you'll see that the lines aren't actually connected.
If this is the case, you'll need to make sure
they are touching, re-do your Gerber files,
and upload them again to OSH Park.
Once you're happy with the way your board looks,
enter the board name, like 555 Badge v01.
Some kind of description, and your email address.
You'll need it to get your receipt
and to make an account.
Click continue, if you've never used OSH Park before,
you'll need to make an account.
You'll get a chance to look at the individual
layers on your board one more time.
Again I recommend carefully inspecting them here,
looking for any flaws.
It's better to find them now before you submit.
When you're ready, click order.
You'll want to keep everything on this page default,
unless you want to order more boards.
Note that you can't order less than three.
Click checkout, on the next page fill out
your shipping address and pick a delivery service.
On the final page choose your preferred payment option
and follow whatever instructions are given there
to complete your order.
You're done, well at least with the PCB.
Now comes the hardest part, you'll need to wait
about two weeks before you get the boards in.
In the meantime we can generate a bill of materials
and order the other electronic components that we'll need.
We'll do that on the next episode, so stay tuned.