About PCB milling
One of the most practical and popular ways of producing printed circuit boards (PCBs) at home is to machine them on a small CNC mill such as those sold by sherline.com, or a scratch-built equivalent. Essentially one just engraves the desired traces onto cheaply available copper-clad PCB blanks.
For more information, check out the Wikipedia article on PCB Milling.
pcb2gcode is a command-line program that calculates machine toolpaths from given PCB layouts.
Despite it's name, it does NOT accept unix "pcb" files, but standard gerber RS274-X and Excellon files, and creates fully EMC2-compatible RS274-NGC files.
pcb2gcode is rooted in gerber2gcode, which was almost entirely rewritten by Jeff Prothero aka Cynbe ru Taren in late 2008.
In spring 2009, the project was moved to SourceForge by Patrick Birnzain.
There are a few pictures of stuff made using pcb2gcode on our Pictures page.
- comprehensive, but simple and easy to use command-line interface
- full support for milling and drilling single- and double-sided boards
- automatic mirroring of bottom layers
- supports machines with and without spring loaded end mills or depth stops
pcb2gcode is available via SVN and as a file download.
pcb2gcode requires libgerbv, a part of the gerbv gerber file viewer.
You will need to install a recent version of gerbv (e.g. v2.2.0 is known to work) from source, the Ubuntu gerbv package will not suffice.
IMPORTANT: currently pcb2gcode won't find the libgerbv shared object file if it's installed to /usr/local, which is the default.
To install libgerbv properly, run
./configure --libdir=/usr/lib --includedir=/usr/include
sudo make install
in the gerbv source directory.
pcb2gcode itself does not provide any means of installation yet. You may add a symlink in /usr/bin, as described in the INSTALL file.
type pcb2gcode --help for a complete structured list of all parameters.
command-line example using the current SVN version:
nice -n 20 pcb2gcode --zchange=0.8 --offset=0.010 --zdown=0.04 --zdrill=0.08 --mill-feed=6 --drill-feed=3.6 --max-deviation=0.005 --dpi=2000 board.back.gbr board.front.gbr --drill=board.plated-drill.cnc
command-line example using pcb2gcode 0.4.0:
nice -n 20 pcb2gcode --verbose --zchange=0.8 --offset=0.010 --zdown=0.04 --zdrill=0.08 --mill-feed=6 --drill-feed=3.6 --max-deviation=0.005 board.back.gbr board.front.gbr --drill=board.plated-drill.cnc
How to help
Currently, pcb2gcode needs a lot of testing.
If you find any bugs, please report them to email@example.com or add them to our Bug Tracker.
Also, pcb2gcode has a distinct lack of documentation.
Contributions of all sorts are most welcome.
How to get help