Our lab uses a Carvera desktop CNC mill for in-house PCB production. The workflow for going from KiCad design files to a milled board uses MakerCAM to generate the toolpaths. The process involves three separate toolpaths: one for the copper traces, one for drilling component holes, and one for cutting the board outline.
Phase 1: Project & Stock Setup
- Open MakerCAM and select New Project.
- On the welcome screen, choose a 3-axis project.
- In the Stock Setup panel, click "Edit" and enter the PCB stock dimensions:
- Material: PCB
- Length (X): 127 mm
- Width (Y): 101 mm
- Height (Z): 1.7 mm
Phase 2: Import Your Design
- Go to File → Import → Import PCB (KiCad Gerber & Drill).
- Import your three files one by one:
- Edge_Cuts file (board outline)
- F.Cu file (copper traces)
- PTH.drl file (drill holes)
Phase 3: Position & Create Trace Toolpath
Your design may appear off-screen after import — zoom out to find it. Select the entire design (it will become dotted), press M to move, set the anchor to the lower-left corner, and position it at X: 6.000, Y: 6.000 to give clearance from the stock edges.
Important tip: A trace is selected when you see a dotted line. If the line is solid, it is not selected.
For the trace toolpath:
- Make only the F.Cu and Edge_Cuts layers visible.
- Hold Shift and click both layers to select them.
- Hold Shift and click the outermost outline to deselect it (it turns solid) — only the traces and inner outline should remain selected (dotted).
- Select the 2D Pocket tool from the toolbar.
- Set cutting depth: Start 0.000 mm, End 0.05 mm.
- Add tools:
- Tool 1: 0.8mm corn end mill
- Tool 2: 0.2mm 30-degree engraving bit (metal)
Make sure the 0.8mm bit is listed first.
- Set path strategy to Parallel.
- Click Calculate.
Phase 4: Drill Holes Toolpath
- Hide everything except the PTH.drl (drill) layers.
- Select the 2D Drilling tool from the toolbar.
- Select all visible drill holes.
- Set cutting depth: Start 0.000 mm, End 1.7 mm (full board thickness).
- Choose the 0.8mm corn bit.
- Click Calculate.
Phase 5: Board Outline Toolpath
- Hide everything except the Edge_Cuts layer.
- Select the 2D Contour tool from the toolbar.
- Click the outside line to deselect it — the inside line must remain dotted.
- Set cutting depth: Start 0.000 mm, End 1.7 mm.
- Choose the 0.8mm corn bit.
- Set strategy to Outside.
- Scroll to Tabs, select Custom, and click Add — place 3–4 tabs on the board edges to hold it in place during the final cut.
- Click Calculate.
Phase 6: Simulate & Export
- Click the Preview Toolpaths icon.
- Check all three toolpaths (Pocket, Drilling, Contour) and click Preview to watch the simulation.
- Close the preview and click the Export icon.
- Select all three toolpaths and export as a .nc g-code file.
Reference