MDX-20 PCB milling

From Hackerspace Adelaide
Jump to: navigation, search

We need to get a PNG of the tracks we want to isolate.

To be compatible with the most PCB tools, we use Gerber files as input.

pcb2gcode will generate a PNG out of your Gerber layer, optionally "dilated" to account for your tool width (kerf).

The fabmodules site (which we will use later) can also do this dilation, but pcb2gcode does a better job.

These are the minimal options you will need to get pcb2gcode to run

pcb2gcode --zsafe=1 --zchange=1 --zwork=0 --mill-feed=1 --mill-speed=1 --metric --offset=0 your_gerber_file.GBL

You will want to change the --offset to half of the diameter of your tool.

You can over-specify this distance and it will do the best it can, producing a kind of "voronoi isolation" path.

Execution will output something like this:

$ pcb2gcode --zsafe=1 --zchange=1 --zwork=0 --mill-feed=1 --mill-speed=1 --metric --offset=0.25 your_gerber_file.GBL 
Importing front side... done
Importing back side... not specified
Importing outline... not specified
clearing
Calculated board dimensions: 2.03005in x 2.04in
Current Layer: front, exporting to front.ngc.
No drill file specified.

The files we are interested in are two debug output images, outp0_original_front.png and outp1_traced.png.

The actual GCode file is of no use to us because the MDX only talks "RML"

Next we go to MITs fabmodules.org to generate a tool path.

"input format" -> "image (.png)" -> "outp1_traced.png" -> "output format" -> "Roland mill (.rml)" -> "process" -> "PCB traces (0.010)"

"dpi" -> 1000

"machine" -> MDX-20

"tool diameter" -> 0

"image threshold" -> 0

"calculate"

"save"

Our Arduino Leonardo-based USB-serial interface

Our Arduino Leonardo based USB-Serial interface is very cautious about flow control to avoid overwhelming the unforgiving UART in the MDX. If you need to know what is going on in the Leonardo, it's documented in this Fritzing file: File:Leo2mdx.fzz

cat outp1_traced.rml > /dev/ttyACM0


TODO[edit]

  • Handle drilling holes. Here is my python code for generating the old intermediate "path" format from an Excellon drill file: excellon_path.py
  • How to offset milling jobs? Post-process the RML or process the images *and* the Excellon file?