Skip to content

Commit e3eeff7

Browse files
committed
Added section 2.7.
Signed-off-by: bert <[email protected]>
1 parent b0eb25b commit e3eeff7

File tree

1 file changed

+177
-0
lines changed

1 file changed

+177
-0
lines changed

2.7_gerber_files_etc.md

Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
# Gerber files, prints and other I/O issues
2+
3+
## Is is possible to produce output without GUI intervention?
4+
5+
Yes, you can tell pcb on the command line to do an export.
6+
All the parameters set in the print dialog can be used in the command
7+
line too.
8+
9+
Some simple examples:
10+
11+
Gerber files:
12+
```
13+
pcb -x gerber --gerberfile BOARD BOARD.pcb
14+
```
15+
Encapsulated Postscript:
16+
```
17+
pcb -x eps --eps-file BOARD.eps
18+
```
19+
Multi page formated Postscript print:
20+
```
21+
pcb -x ps --psfile BOARD.ps BOARD.pcb
22+
```
23+
PNG format:
24+
```
25+
pcb -x png --dpi 300 --only-visible --outfile BOARD.png BOARD.pcb
26+
```
27+
Different output procedures allow for different options.
28+
See the output of pcb --help for details.
29+
30+
## How can I print specific layers only?
31+
32+
In the GUI:
33+
34+
- deactivate all layers you don't want to print
35+
- choose <b><i>File → Export layout… → eps</i></b>
36+
- check <b>as-shown</b>
37+
38+
From the command line:
39+
```
40+
pcb -x eps \
41+
--layer-stack "outline,top,silk" \
42+
--as-shown \
43+
--eps-file "foobar.eps" BOARD.pcb
44+
```
45+
The layer-stack string can contain a comma separated list of the layers
46+
used in the GUI.
47+
You have to give the option “--as-shown”.
48+
Else, a default layer stack file will be used.
49+
In addition there are a number of tokens that are technically no layers
50+
like “pins”, or “invisible”.
51+
If you put an unknown token in the layer-stack string, pcb responds with
52+
a list of known layer names.
53+
54+
##How can I print the bottom side of the board?
55+
56+
From the command line: Add “solderside” to the layer-stack string of the
57+
print command.
58+
59+
Example:
60+
```
61+
pcb -x eps --layer-stack "silk,solderside" \
62+
--as-shown \
63+
--eps-file "/tmp/foobar.eps" BOARD.pcb
64+
```
65+
66+
## How do I make a board outline to go with my gerbers to the board maker?
67+
68+
PCB interprets the lines in a layer called ‘outline’ as the absolute
69+
edge of the pcb.
70+
If no such layer is present, you can either rename a layer
71+
((b><i>Edit → Edit name of → active layer</i></b>).
72+
Or you can add a layer from scratch
73+
(<b><i>File → Preferences… → Layers → Add</i></b>) and rename it
74+
accordingly.
75+
76+
Note, that the name of this layer is case sensitive.
77+
78+
You can enter your outline thru PCB’s GUI.
79+
You just draw the desired outline with the line tool or the arc too.
80+
Most fabs will cut the board at the center of the lines.
81+
You can generate boards of any shape this way.
82+
Arcs, polygons and text in the outline layer also enter the gerber file.
83+
84+
It’s also possible to edit the native .pcb file format of your layout.
85+
86+
I usually use layer 8 for outlines:
87+
```
88+
Layer(8 "outline")
89+
(
90+
Line[x1 y1 x2 y2 1000 2000 0x00000000]
91+
Line[x2 y2 x3 y3 1000 2000 0x00000000]
92+
Line[x3 y3 x4 y4 1000 2000 0x00000000]
93+
Line[x4 y4 x1 y1 1000 2000 0x00000000]
94+
Line[<more points go here for non-square boards> 1000 2000 0x00000000]
95+
)
96+
```
97+
PCB will produce a gerber file called $NAME.outline.gbr that exclusively contains the objects in the outline layer.
98+
99+
## How do I make sure, that the design contains only certain hole sizes?
100+
101+
Some fabs provide lists of standard drill sizes and charge extra if the
102+
design contains additional sizes.
103+
You can put this list in a “vendor resource file”.
104+
This file may also exceptions and specify if the nearest diameter should
105+
be chosen, or rounded up to the next size in the list.
106+
See the section Vendor-drill-mapping in the pcb manual for the syntax of
107+
this file.
108+
109+
Load the file to pcb with <b><i>File → Load vendor resource file</i></b>.
110+
Alternatively, you can use with the command:
111+
```
112+
:LoadVendor(drillfile)
113+
```
114+
Substitute “drillfile” with the name of your file.
115+
116+
On load, pcb will substitute drill sizes so that the layout conforms to
117+
the list.
118+
If you want to apply an already loaded vendor resource file again, you
119+
can do <b><i>Apply vendor drill mapping</i></b> from the <b>Connects</b>
120+
menu.
121+
122+
## How many pads are in my layout?
123+
124+
Some board houses ask for the number of SMD pads to help them with their
125+
quote.
126+
You can use gerbv to extract this pad count from your layout.
127+
128+
1. export the layout to gerbers
129+
2. open the file $NAME.frontpaste.gbr with gerbv
130+
3. choose <b><i>Gerber codes report</i></b> from the <b>Analyze</b> menu
131+
4. The tab “Aperture usage” gives the number of SMD pads.
132+
133+
## I'm done with my layout. How should I check my design?
134+
135+
- Run a check of design rules either through the command interface
136+
(“DRC()”) or from the menu
137+
(<b><i>Connects → Design Rule Checker</i></b>).
138+
You can set the rules in the <b>Sizes</b> section of the
139+
<b>Preferences…</b> dialog.
140+
Results of the check are shown in the log window.
141+
142+
Besides running the DRC checker, it is essential to check your Gerber files. The gEDA Suite includes the program “gerbv” for this task. Here are some things to check/verify:
143+
144+
- Check that all trace widths are the correct size.
145+
Also make sure your trace widths and metal-metal separations are above
146+
the minimum specified by your PCB vendor.
147+
- Check that all hole diameters are called out at the correct size.
148+
- Check that metal annular rings around holes/vias are large enough.
149+
The annular ring is the distance between the hole’s edge and the outer
150+
diameter of the metallization.
151+
The annular ring must be large enough to accommodate drill location +
152+
layer registration + other manufacturing inaccuracy.
153+
This information should be available from your PCB fabrication house;
154+
they normally publish the minimum annular ring requirements in their
155+
manufacturing rules document.
156+
- Check that your antipads (clearance around holes/vias) are large enough.
157+
This information should be available from your PCB fabrication house;
158+
ask them for their manufacturing rules document.
159+
- Verify that no soldermask or silkscreen overlays a copper pad or
160+
through-hole.
161+
- On plane layers, verify that at least some vias connect to it (yes, I
162+
have seen a board where the entire ground plane was floating – not
163+
done in pcb btw)
164+
- On plane layers, verify that at least some vias don’t connect to it.
165+
- Do a visual sanity check of all layers.
166+
Nothing detailed, just does it look approximately like you think it
167+
should.
168+
- Sign it and date it.
169+
At least put a version number on it, so if you have to rev the board,
170+
you can tell the good from the bad.
171+
- Are all layers negative/positive as they should be? Note that some fab
172+
houses want positive layers only.
173+
PCB will automatically create negative Gerbers on outer layer planes
174+
with no tracks.
175+
If you want an all-plane layer to be output as a positive layer, draw
176+
a single track somewhere in an unused part of the plane.
177+
This will trigger PCB to render that layer as a positive layer.

0 commit comments

Comments
 (0)