PC Board milling (Isolation Routing)
KiCAD –> FlatCAM –> Auto-leveling –> Isolation Routing

KiCAD –> FlatCAM –> Auto-leveling –> Isolation Routing PCB

Here is my process for getting from a PC board design in KiCAD to an isolation-routed PC board on my DIC CNC Router. Currently these instructions are for a single-sided board. When I get to my next double-sided board, I’ll document the process there too.

Products used:

In KiCAD:

Starting with a fully-routed and verified PC board design.
Place the origin (e.g. auxiliary axis) KiCAD Set Origin Point. HobbyCNC point (0, 0) for the drill and mill files. I typically put it at the ‘bottom left’ corner of my PC board outline.
This will be the 0, 0 point where milling will start (e.g. the point where you will home your X and Y axis)

Plot the “mill” and “drill” files.

From Pcbnew, “Plot” the Gerber files .

Prepare the Plot page

  • Plot format: Gerber
  • Make sure Output Directory is blank. KiCAD will store the Gerbers in the same directory as the Project files.
  • Check Use auxiliary axis a origin
  • Leave the Format as 4.6 (unit mm)

Define what elements to export as gerber. In the example to the right, it was a single-sided board, with no solder mask and no silk screen.
Typically I’d just Plot the B.Cu and T.Cu for milling. If I plan to add a solder mask, I’d also Plot the F.Mask and B.Mask.

KiCAD Set Gerber Plot for Isolation Routing PC Board. HobbyCNC

Press Plot.  Note the Output messages: for the locations and names of the files created.

If you want PDF files for your records, select PDF under the Plot Format: option and Plot again.

When completed, press Generate Drill Files

Generate Drill Files

Again, leave the Output directory text field empty.

Click the Drill File button to generate the drill file. Note the output in the Messages: box.

Optionally you can Generate Map File this will show you what drill sizes are used where.

I recommend Generate Report File to give you list of what tool number is what drill size.

Then press Close and Close.

KiCAD settings for Isolation Routing PC Board. HobbyCNC

Drill Report

Open the file ”…-drl.rpt” with WordPad. Print. You will need this for tool changes during drilling.

Note: If possible, update your KiCAD footprints to standardize on a limited number of different drill sizes, if possible.

In the example at the right, it was a one-time board, so I didn’t bother to optimize my footprints in KiCAD. Instead I just ‘reduced’ the number of drills during milling. For example, I used a 0.036″ drill for T2, T3, T4 and T5, a 0.050″ drill for T6 and T7. You get the idea.

KiCAD Drill file for PC Board Isolation Routing. HobbyCNC

FlatCAM (flatcam.org)

Open FlatCAM

File, Open Gerber

  • Open Top Copper gerber file
  • Open Bottom Copper gerber

File, Open Excellon

  • Open the drill (.drl) file

Confirm the origin (0,0) is at the lower left of the board (or wherever you set it in the first KiCAD step, above)

KiCAD Open files in FlatCAM for PC Board Isolation Routing. HobbyCNC

Flip bottom CU layer

Tool, Double-Sided PC Tool

Bottom Layer: Select the Gerber that represents the bottom layer of your PC Board

Mirror Axis: Y

Axis Location:  Box

Point/Box: Select the Gerber for the layer you want to flip. Will be the same as the Bottom Layer (above).

Mirror Object

KiCAD Flip Bottom Layer for PC Board Isolation Routing. HobbyCNC

Flip Drill layer

If you plan to drill from the bottom, you will need to repeat this step and select the .drl layer next.

Bottom Layer: Select the file that represents the drill layer

Mirror Axis: Y

Axis Location:  Box

Point/Box: Leave this unchanged.

Mirror Object

KiCAD flip drill layer for PC Board Isolation Routing. HobbyCNC

Return to the Project tab

Select the first copper level

KiCAD for PC Board Isolation Routing. HobbyCNC

Open the Selected tab

Generate Geometry

KiCAD Generate Mill Pattern for PC Board Isolation Routing. HobbyCNC

Some examples of Width and Pass Overlap

KiCAD for PC Board Isolation Routing. HobbyCNC

One pass (overlap is not relevant)

KiCAD for PC Board Isolation Routing. HobbyCNC

KiCAD for PC Board Isolation Routing. HobbyCNC

Pass overlap = 80% overlap. (100% overlap would look exactly like the image above)

KiCAD for PC Board Isolation Routing. HobbyCNC

KiCAD for PC Board Isolation Routing. HobbyCNC

Pass overlap = 20%

KiCAD for PC Board Isolation Routing. HobbyCNC

Look for incomplete passes

You will need to:
a) Increase the Pass overlap AND/OR
b) Decrease tool diameter

KiCAD for PC Board Isolation Routing. HobbyCNC
Go back to Project Tab, select the .drl file KiCAD for PC Board Isolation Routing. HobbyCNC

Go to the Selected tab

Tools – just be sure all the tools are selected (number highlighted in blue). This is the default. Any tool unselected will not be drilled.

Cut Z – how deep below the surface of the copper you will drill. This needs to be a bit deeper than the thickness of your PC board stock.

Travel Z – how far up the tool will retract when moving between cuts.

Feed Rate – Cutting speed of the tool.

Tool Change – check this and set the Z retract height to allow space to change the drills.

Generate

KiCAD for PC Board Isolation Routing. HobbyCNC

Generate the Gcode

Go to the Project tab

Select the newly created .gbr_iso file

You’ll need to do this twice, once for top, again for bottom

KiCAD for PC Board Isolation Routing. HobbyCNC

Go to the Selected tab

Confirm settings

Cut Z: this is how deep the tool will cut into the copper.
For reference: 1 oz Cu = 1.37mils (thousandths of an inch), 0.00137in
The example to the right will cut in 5 thou (5mils), way more than necessary for a 1oz board.

 

Generate

KiCAD for PC Board Isolation Routing. HobbyCNC

Back to Project Tab

Select the newly created _iso_cnc file

KiCAD for PC Board Isolation Routing. HobbyCNC

Back to Selected Tab

Export G-Code

Repeat for other copper side and for the .drl file

Notes:

  • I use the extension .ngc for my gcode files for use with LinuxCNC
  • M02 = End of Program
KiCAD for PC Board Isolation Routing. HobbyCNC

Remember to save the project.

Suggest naming it to indicate it’s a FlatCAM project file, like: BoardName_Project_FlatCAM

Since FlatCAM has no file extension for the project file, this is the best way I’ve found to keep it distinct from the rest of the files.

Verify Gcode

Open the gcode files in a viewer (I use CamBam) to verify.

KiCAD view in CamBam for PC Board Isolation Routing. HobbyCNC

Verify drill file in gcode viewer

KiCAD view drill file in CamBam for PC Board Isolation Routing. HobbyCNC

Autoleveller

Per the instructions, for probing, I use the same tool that I plan to mill the PC Board with. This avoids the need to change the tool and the potential to introduce some new problems.

Note: Since the autoleveller depends on a probe signal (e.g. electrical current flow between the probe and the PC board), you must use a new pc board with no holes or traces to interfere with the continuity of the probe signal during probing.

Open the Autoleveller software

Load OGF (Original Gcode File) and select the top or bottom gcode files (ending in _Bottom_Mill.ngc and Top_Mill_ngc”.

Check the XY Feed and Z Feed to be consistent with your system.

Probe Depth is the ‘fail safe’ maximum distance below Z=zero that the probe will go if no probe signal is received. This prevents damage to your PC Board and tooling (been there, done that).

Probe Clearance is how high above the copper level the tool will rise between probe points. Smaller = better.

Point Spacing is the distance between probe points. I have settled on 1/4″ with good results. More probe points = more time required to probe the board.

Probe Safe Height the retract distance before-and-after probing for tool changes (I don’t change tools between probing and milling)

KiCAD autolevelling for PC Board Isolation Routing. HobbyCNC

Preparation for isolation routing

  1. prepare a flat sacrificial board. I use a small piece of MDF.
  2. Add three levelling screws in a ‘tripod’ formation (two of these can be seen in the image – red arrows).
  3. Mount your PC Board to the sacrificial board. My new approach is to weight-down the board and put a glob of hot-glue at each corner (no glue goes under the board).
  4. Using a dial indicator attached to your z-axis, adjust the three leveling screws to level the PC board as well as you can. Within one-or-two thousandths is my target.
KiCAD for PC Board Isolation Routing. HobbyCNC

Probing

Here’s what probing looks like. Pretty boring, but all inconsistencies in the surface of the PC Board are being recorded. These probe points will be used to ‘adjust’ the Z axis during milling.

You need to ensure that you have your CAM software set to have a probe input. You need to ensure that you have electrical continuity between your probe and the PC board surface.

The white plastic pipe in the right-background is weighted and a sewing needle provides the electrical connection to the PC board copper. The probe is grounded through the body of the spindle (although this approach is not recommended, it’s been working well for me)

Pin It on Pinterest

Share This