Auto-Leveling and Probing for CNC PCB Milling: Copper Surface Mapping for Isolation Routing
Isolation-routed PCBs are cut with an engraving bit at a fixed Z depth, cutting a shallow channel just deep enough to remove copper without gouging into the fiberglass substrate. That works fine in theory, but real copper-clad board is rarely perfectly flat — a few thousandths of warp, sag in the middle of a spoilboard-mounted panel, or an unevenly seated clamp is enough to make a single fixed cutting depth either skip copper entirely in low spots or dig a trench in high spots. Auto-leveling solves this by probing a grid of points across the actual copper surface before cutting and adjusting Z on the fly to follow the real surface rather than an assumed flat plane. This guide covers setting up and running an auto-level probe grid for PCB isolation milling, distinct from the general G-code-to-toolpath conversion process covered elsewhere on this site.
Why PCB Milling Needs Its Own Leveling Approach
General CNC touch-probe workflows (finding work zero, probing a tool length offset) solve a different problem than PCB auto-leveling. A work-zero probe finds a single reference point; PCB auto-leveling builds a height map across the entire cutting area and compensates every single toolpath move against that map. The tolerances involved are also much tighter — a general CNC job might not care about half a millimeter of surface variance, but an isolation-routing bit cutting a 0.1–0.2mm-deep channel in 1oz copper can go from a clean cut to no cut at all, or from a clean cut to cutting through the substrate, within that same half millimeter.
Hardware Requirements
- An electrically conductive touch probe circuit that completes a circuit between the tool (or a probe tip) and the copper surface itself — this is different from probing a workpiece's edges or a fixed tooling plate, since the probe needs to detect the actual conductive copper layer, which is what you're trying to map.
- A rigid, verified-flat spoilboard mount for the PCB blank. Auto-leveling compensates for the board's own surface variance, but it can't compensate for the whole board tilting or rocking on an uneven mount — secure the blank firmly with double-sided tape or clamps on a spoilboard you've already surfaced flat.
- A controller and CAM chain that supports height-map compensation — this is where most of the setup work happens, covered below.
Software Options
ToolRoleNotes FlatCAM / KiCad + FlatCAMGerber-to-toolpath conversion (isolation routing paths, drill files)Generates the base G-code; does not itself run the probe grid or apply compensation — that happens downstream bCNCSender with built-in autolevel probingProbes a configurable grid, builds a height map, and applies Z compensation to G-code on the fly as it streams to the controller Candle / CNCjs with autolevel pluginAlternative senders with grid-probing supportSimilar workflow to bCNC; check plugin compatibility with your specific controller firmware version GRBL / grblHALController firmware executing probe movesNeeds a working G38.2 probe command and a probe input pin wired to the conductive touch circuitSetting Up the Probe Grid
- Wire the probe circuit: typically one lead to the spindle/tool (or a dedicated probe tip if you're not probing through the cutting bit itself) and the other to a wire clipped directly to the copper surface of the PCB blank, completing the circuit when the tool touches copper.
- In your sender's autolevel module, define the probe grid boundaries to match the actual extent of your PCB toolpaths, with a small margin. A denser grid captures more surface detail but takes longer to run — for a typical small board (under 100x100mm), a 5x5 to 8x8 grid is usually a good balance; larger boards benefit from proportionally denser grids since warp tends to compound over distance.
- Set a conservative probe feed rate and a probe retract height that clears the highest expected point on the board comfortably — a probe move that's too fast risks a hard, damaging contact with the board or bit.
- Run the probing sequence before loading the actual cutting G-code. The sender records a Z value at each grid point, building a height map of the real surface.
- Load and run the isolation-routing G-code through the same sender session — the sender interpolates the recorded height map and adjusts each cutting move's Z on the fly, rather than you needing to manually edit the G-code file.
Verifying the Result Before Committing
Before running a full board, especially the first time you're using autolevel on a given machine/board combination, do a dry pass check: jog to a few grid points manually and confirm the compensated Z height at each roughly matches what you'd expect from the probe data. Then run the actual cut at a slightly conservative depth setting for the first attempt — it's easier to run a light cleanup pass afterward on spots that didn't fully clear than to recover a board where compensation cut through traces because of an unexpected probe error or grid density that was too coarse to catch a sharp local dip.
Common Problems
SymptomLikely Cause Compensation looks correct on the map but cut is still unevenGrid too sparse to capture a sharp local warp; increase grid density in that region or overall Probe never triggers, or triggers immediately at the surfaceBad electrical connection to copper (oxidation, tape covering the clip point) or probe polarity wired backward Isolation cuts fine in the center but not at the edges of the boardBoard flexing or lifting slightly at the edges under clamping — secure edges more firmly rather than relying on compensation to fix a mechanically unstable mount First few points probe fine, then readings become erraticCopper dust or debris building up on the probe contact point during the grid pass; clean and re-clip periodically on longer probe sequencesWhen Autolevel Isn't the Right Fix
If a board consistently needs a large compensation range (several tenths of a millimeter or more) across a small board, that's usually a sign the underlying mounting or spoilboard flatness needs attention rather than something to keep compensating around indefinitely. Autolevel is meant to handle the residual few thousandths of real-world board and clamping variance, not substitute for a genuinely flat working surface.
Getting the probe grid dialed in takes a bit of trial and error the first few times, but once the workflow is set up it becomes a routine few-minutes-per-board step that eliminates the single biggest source of failed isolation-routing jobs: a fixed cutting depth meeting a board that isn't actually flat.
Related Guides
- How to Mill PCBs with FlatCAM: Gerber Import to Isolation Routing G-Code
- CNC Router Feeds and Speeds: A Practical Guide for Wood and Soft Materials
- Setting Up Tool Change Macros in UGS for the Wolfpawn
- How to Resume a Failed Print Mid-Layer on the Kobra 3
- LightBurn Setup Guide: First Laser Job from Start to Finish
- CNC Touch Probes for Desktop Routers: Wiring, Tool Length Offset, and Work Zero Setup
- Machining Brass and Copper on a Desktop CNC Router: Feeds, Chip Control, and Finishing
- Z-Mapping and Surface Probing for CNC Routing on Warped or Uneven Stock: Getting Consistent Carve Depth