Aligning UV laser PCB cuts to fiducials with the laser's camera
NotePart of Laser-isolated PCBs
To cut 0.3 mm isolation around 0.6 mm via pads, the laser has to know where the board is to a few tens of microns. xTool's camera positioning for the F2 Ultra UV is advertised at 0.2 mm and has no fiducial correction. This is how I align the cuts on my laser-isolated PCBs instead, with every alignment measurement I took on the way. By the Lens Driver v2, the test marks landed within 5–67 µm of their aim before any correction.
Getting the photos
The camera photos come straight off the machine, over the same TLS WebSocket protocol my tools use to upload jobs: GET /v1/camera/snap on stream 0 for the main camera or stream 1 for the close-up one. The machine makes the JPEG itself (4000 × 3000). The two fill lights are set over the same protocol, which matters because the light direction moves things (below). In the very first tests I read the rectified photo xTool Studio caches on disk instead.
Via-grid fit: why it failed
The first idea was to find the board from its own via grid in the camera photo (about 0.1 mm/px): the four M3 holes for a rough pose, then centroids of the faint vias for an affine fit.
| Vias found | 933 of 991 on an L blank |
|---|---|
| Random | About 80 µm per via, but averaged over ~930 vias the centre was stable to ±2 µm and the corners to ±8 µm |
| Systematic | Up to ±80 µm in y and ±30 µm in x, in a smooth pattern across the board |
| Scale | x and y 0.22 % apart (10.013 vs 9.991 px/mm) |
| Holes | Up to 0.3 mm off the via fit, probably parallax through a 1.6 mm deep hole |
| Orientation | Can't be read from the grid: all four rotations and a flip fit within ±10 vias |
The killer was glare. The fill light reflects off the glossy mask in a band across the board, and in that band the vias show up as bright highlights shifted off their centres, which drags the fit 0.1–0.2 mm. Later tests found the via fit also moves with light direction: back light only shifted the board frame up to 144 µm in y against both lights on, and other splits moved it 20–70 µm. Flat copper marks don't move with the light.
Burn marks, then measure them
The fix is to let the laser mark where it actually fires and measure each mark against board features right next to it in the same photo, so camera scale and distortion mostly cancel. First test: four 1 mm copper dots, one near each corner of an L blank, placed by the camera alone.
| A, bottom right | −111 / −123 µm (x / y from target) |
|---|---|
| B, bottom left | −264 / −138 µm |
| C, top left | −202 / −344 µm |
| D, top right | −64 / −461 µm |
| Repeatability | Three images agree to 14 µm on average, 30 µm worst. Each dot-to-via reading ±7–17 µm |
| Fit | Canvas to board scale 0.9955 (x) and 0.9958 (y), so the laser field is about 0.43 % small. Rotation 0.27°. Residual 33 µm per mark |
A validation job then put nine dots through that correction. Clear of the glare they landed 16–78 µm from target (median 65), against 130–450 µm uncorrected. The four in the glare band couldn't be measured.
| V1 · V2 · V3 | 65 · 16 · 48 µm |
|---|---|
| V4 · V5 · V6 | 167 (glare) · 232 (edge of glare) · 78 µm |
| V7 · V8 · V9 | 147 (glare) · 72 (glare) · 71 µm |
X-corner fiducials
The marks got better as X-corners: two diagonal copper squares with the mask removed, read by correlating the photo against a template of the exact pattern. Rev 2 of my blanks also has a copper/FR4 X-corner fiducial printed in each corner pocket. The crossing point is found from edges, so glare that brightens the copper doesn't move it, and copper is registered to the drill data (PCBWay holds holes to ±0.075 mm) where silkscreen is only ±0.1–0.2 mm. Measured under the microscope, the Rev 2 fiducials sit within 10 µm of where the vias say they should, ±25 µm at any one corner.

Where the burned X-corners landed against their targets, and the correction fitted from them:
| SN02 front · 11-14 | TL +196/+83, BL +360/+114, TR +241/−13, BR +293/+62 µm. Similarity: scale 1.0028, rotation −0.169°, residuals 72 / 60 / 32 / 23 µm |
|---|---|
| SN02 back · 11-14 | TL +208/+11, TR +122/+83, BL +272/+72, BR +222/+50 µm. Scale 0.9980, rotation −0.116°, residuals 60 / 24 / 62 / 78 µm |
| L run 1 · 11-15 | TL +104/+196, TR −81/+262, BR −26/+99, BL +28/+106 µm. Scale 0.99951, rotation 1.275° (the board's own tilt), residuals 3 / 47 / 67 / 46 µm. Template correlation 0.87–0.89 |
| L run 2 · 11-16 | Marks 12–177 µm from target. Scale 1.0019, rotation 1.73°, residuals 32–40 µm |
| L run 4 · 11-17 | Scale 1.00188, rotation 3.214°, residuals 11–38 µm |
| L run 5 · 11-18 | Residuals 11–16 µm over 74 mm, similarity fit |
| Lens Driver · 11-18 | An affine fit found a real stretch, x +0.28 % and y −0.35 %, residuals 10–15 µm. The similarity fit had left 40–75 µm |
| Lens Driver v2 · 11-23 | Before correction: 5–26 µm in x and 21–67 µm in y (LT2 −26/+67, LT3 −13/+39 µm) |
The Rev 1 boards (SN02 and the L coupons) have no printed fiducials, so the board pose there came from the via fit (49–114 µm rms) and the marks were burned into free GND cells. On SN02 the laser landed about 0.1–0.36 mm right of where the camera said, on both sides, so that part is the machine, not the board. On Rev 2 every burn uses the same loop: find the board from its four fiducials, burn two X-corners on a diagonal pair of laser targets, photograph them, and correct the job by where they landed.
My own camera calibration
I also built my own camera-to-laser mapping, independent of the factory one: a 7 × 7 grid of large X-corners at 12.7 mm pitch, burned on a blank and mapped from raw camera pixels to laser G-code millimetres for both cameras, with no vias and no factory offsets.
| Laser scale | Writes about 0.19 % large: 1 mm of G-code makes 1.0019 mm |
|---|---|
| Target | The 42 burned marks' true positions saved to 5–7 µm each, so the board works as a calibration target |
| Two-camera rig | 33 views, 2231 points. A 111.00 mm spacer measured 111.04 mm from the cameras alone. No backlash from Z 5 to 30 (under 5 µm) |
| Z axis | Travels about 0.1–0.2 % more than its readout |
| Per-height maps | Good to 19–29 µm (main camera) and 11–14 µm (close-up) |
| Glass plate model | Refitted on a glass calibration plate (3 mm dots, 20 mm pitch): residuals 0.052 px (about 6 µm) main and 0.28 px (about 10 µm) close-up. The plate and the via grid disagree by about 0.045 % |
| Full workflow test | Four fiducials aimed at via centres: rms 30 µm against the reference (44 µm including the corner one) |
Focus moves the marks
Focus itself is forgiving. Position is not.
| Best focus | Z ≈ 7.8–8.1 on a 1.6 mm board: 8.07 from a single-pulse ladder; 7.81 ± 0.12, 7.84 ± 0.08 and 8.03 ± 0.12 at 100 / 60 / 40 % power |
|---|---|
| Spot | About 37 µm at best, 40 µm at ±1 mm, 60 µm at +3 mm: about 14 µm per mm |
| Mark shift | −75 ± 5 µm per mm of Z in x, −128 ± 11 µm/mm in y (plus 2.5 µm/mm per mm of board y). Up to 0.75 mm over 6 mm of Z |
| Laser scale vs Z | 1.00004 at Z 7.05, 1.00225 at 8.05, 1.00450 at 9.05: +0.23 % per mm |
| 1 mm off | Calibrating at one height and working 1 mm away costs about 0.2 mm (main) or 0.3 mm (close-up), nearly all a plain y shift |
| Head tilt | The whole head tilts about 7.5 arcmin between Z 5 and Z 9, then holds to Z 50. Coming down doesn't retrace it: −252 against −346 arcsec at Z 8, about 0.13 mm of view and 40 µm of Z |

So a calibration or a fiducial measurement only holds at the Z it was made at, the fiducials get re-burned for every job, and every photo and every burn happens at a Z reached from below, with at least 0.5 mm of upward travel. The upload tool refuses anything else. Above Z 9.5 the tilt is stable.
Two machine quirks cost me runs. Jobs uploaded with auto-start run the motion but never fire the laser, so every job waits for the button. And Z moves placed between burn blocks don't sync with the marking; the Z step has to go inside each block, the way xTool's own files do it.