Reinis Veips (fest)'s blog

Posted Wed 14 August 2013

Using pcb2gcode with Marlin/grbl firmwares

Recently, I wrote about building a small CNC machine. I started to modify pcb2gcode, so that it is usable with Marlin/grbl type of CNC controllers (which, admittedly, support only a basic subset of proper G-code commands).

Mainly, my issues were:

Actually fixing these two problems in pcb2gcode source were quite easy- I made it to output G-code in milimeters, and changed the drill cycle command to use discrete G-code commands. The resulting G-code file is a bit more verbose, but I was finally able to engrave and drill a PCB.

Alas, I have not yet got to converting board cutting feature to output milimeters (mainly, because I don't yet use that feature)

My modified version of pcb2gcode is available in this github repo.

I have verified that it works fine with gerbers from KiCad.

An example millproject file, for reference:

# this is an example config file for pcb2gcode.
# place this in the same directory as your gerber files to save typing

metric=1

# You may want to uncomment and change those in local project files
front=diode_tester-F_Cu.gtl
back=diode_tester-B_Cu.gbl
drill=diode_tester.drl

# parameters for isolation routing / engraving / etching
zwork=-0.04
zsafe=0.3
zchange=15
mill-feed=200
mill-speed=30000
drill-front=1

# drilling parameters
zdrill=-2
drill-feed=300
drill-speed=20000

# generate voronoi regions
offset=100
dpi=1000
Category: misc

Comments