PCB milling

From Makespace
Revision as of 12:35, 26 April 2014 by Harry.braviner (Talk | contribs)

Jump to: navigation, search

This page is intended to contain instructions on milling PCBs using the Roland CNC Mill. It is still a work in progress.

  • The Roland CNC Mill is class red equipment - you MUST NOT use it without specific training.
  • The Roland's communal milling bits will be easily damaged by copper and fiberglass - do NOT use the communal milling bits! I will leave a tin of specific PCB milling bits near the machine, clearly labelled as such.

The toolchain described on this page is as follows:

  • Design the PCB in Kicad, export to Gerber and Excellon drill files.
  • Import the Gerber and Excellon files into CopperCAM.
  • Set up appropriate tool choices in CopperCAM, and export these directly the Roland's printer driver.

It should be easy to substitute Kicad for Eagle in the above. I am using Kicad purely because that is what I am familiar with.

CopperCAM is a very temperamental piece of software as regards importing Gerbers and drill files. Most of this page will be devoted to managing its eccentricities. It does, however, seem to output instructions that the Roland mill understands, with some restrictions that will be discussed below.

Export from Kicad

Download the example Kicad project from FIXME, open "WS2812B_breakout.pro" using Kicad, and then open the PCB editor. You should be faced with a routed board, all ready to be exported. The project on first opening in Kicad. Click on the button "Offset adjust for drill and place files" in the bottom right (circled in the above image). Click on a point somewhere below and to the left of the components in the above image. This origin MUST be placed at least 2.54 mm below and left of all of the components, traces, board outline, etc (though not those blue dimension labels) otherwise CopperCAM will misalign the layers.

Click on File --> Plot.

  • Set "Plot Format" to "Gerber"
  • Set "Plot Origin" to "Auxiliary axis"
  • Make sure the "Back" and "Front" layers are selected.

Now hit the "Plot button" in the lower right. This image below shows the export options I use - I do not know exactly which of these are crucial. Export options to produce a Gerber that CopperCAM is happy with. This should have produced files "WS2812B_breakout-Front.gtl" and "WS2812B_breakout-Back.gbl". Click on the "Generate drill file" button in the bottom right of the "Plot" window. You are now presented with a bewildering array of options. A set that I have found to work are:

  • "Drill Units" to "Inches"
  • "Zeros Format" to "suppress leading zeros"
  • "Precision" to "2:4"
  • "Drill Origin" to "auxiliary axis"

The image below shows the exact options I use. Export options to produce an Excellon drill file that CopperCAM is happy with.

Import into CopperCAM

FIXME - link to download gerbers.

Open CopperCAM. Go to File --> Open --> New circuit and select the "WS2812B_breakout-Front.gtl" file. You'll be given a dialog about with a certain track is a 'card contour'. Click "no", this is just related to routing out the board. Well use a different program for this. Your window should now look like this: The front of the board has been imported.

Go to File --> Open --> Additional layer and select the "WS2812B_breakout-Back.gbl" file. Again say "no" to the card contour dialog. You window should now look like this, with the pads lining up correctly with one another: Both layers of the board have been imported, and the alignment is correct.

Now go to File --> Open --> Drills, make sure the filetype is set to "Excellon, Basic co-ordinates", and select the "WS2812B_breakout.drl" file. You'll be presented with a dialog asking you if the setting are correct, and (hopefully!) the drill holes will be the right size and over the pads. Dialog asking is everything is OK with the drill file import.

If so, click 'yes' on this dialog, and you should now see something like the following: Layers and drills all correctly loaded.

At this point you can use File --> Save to save the file in CopperCAM's native format, for easy re-loading if it crashes.

Setup CopperCAM for milling

We now need to select appropriate tools for milling. I shall denote some communal tools, shown below. These are a 0.25mm 45 degree engraving bit, a 0.9mm drill bit, and a 0.8mm routing bit. From left to right: engraving bit, drill bit, routing bit.

First we need to check that these are actually in the tool library. In CopperCAM go to Parameters --> Tool library and check that the engraving bit is there as tool number 7, and the 0.9mm drill is there as tool number 9.

Now go to Parameters --> Selected tools.

  • In the top left "Engraving Tool" section, select tool number 7. Set the "Depth" to 0.2mm, the "Margin" to 0, and the "Engraving speed" to 10mm/s.
  • Hatching, Cutting and Centering tools are all irrelevant for this example. And I don't fully understand what they do.
  • In "Drilling tools" select "Use for each drills the closest greater tool, without circular boring." Set the first tool in the list to tool number 9, and clear all of the others. Set the drilling depth to 2.0mm.

FIXME - image of these options.

Now go to Parameters --> Output data format. Check that:

  • "Format" is set to "Roland EGX & MDX-40/500/540/650 - 0.01"
  • "Call printer driver" is selected, and the "Roland MDX-40A" driver is chosen from the drop-down men.