PCB milling
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.
Contents
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. 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. 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.
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:
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:
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.
If so, click 'yes' on this dialog, and you should now see something like the following:
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.
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 menu.
Set up the machine and mill
Switch on the Roland mill and maneuver the bed so that it's at the front of the machine. Do NOT mill a PCB on the communal milling bed. The drills will mark the bed when they pass through the bottom of the PCB. I will make a communal PCB milling bed and leave it near the machine.
To remove the communal bed, unscrew the four screws in the corners. Put the PCB milling bed in its place, and screw this firmly in place. Don't over-tighten the screws!
Insert the PCB blank into the pocket in the milling bed, and tighten the nuts to hold it in place. You must be pushing the PCB blank into the BOTTOM LEFT corner while doing this.
Once the PCB is secured in the bed, switch on the Roland mill and open VPanel. Select 'Machine Coordinate System' from the drop-down menu, move the head to X=97.50, Y=70.00, and click set the XY origin to that point. If you have pushed the PCB firmly into the bottom left of the pocket then (0, 0) of the 'User Coordinate System' is now aligned with the bottom left corner of the PCB.
FIXME - change bed, machine on, set origin, then offset the origin, check circuit will fit!
FIXME - calculate contours
FIXME - drill, set Z0, only one operation, UNcheck "Flip X". Watch machine, wait for spindle to stop before opening lid. Remove swarf.
FIXME - change to engraving tool, re-set Z0
FIXME - flip board left-right, re-secure it. Set XOrigin using machine coords 202.5 - X1. Re-set Z0.
FIXME - layer 2, CHECK "Flip X", and set origin to "South-East corner".
Open Vectric Cut2D. Click on "Create new file."
- Set Z Zero at top, thickness to 1.6mm
- Set the origin in the bottom left.
- Width and height to at least the size of our board (48.8mm x 18.4mm in this example)
FIXME - picture
Read off the bottom left corner of the board outline in CopperCAM (x = 3mm, y = 3mm in this example). Set this as the bottom right corner (with x=-3mm) of a rectangle in Cut2D. Read off the width of the outline from CopperCAM (width = 43mm, height = 13mm in this example) and set rectangle accoridngly.
Select this vector and create a profile toolpath
- Cutting depth 1.8mm
- Outside
- Ramp plunges over 2mm
- Add tabs of length 0.5mm, height 0.5mm
- Select the 0.8mm end mill
Insert this tool, set Z0. Send the profile to the mill using Cut2D.