February 5, 2026

Automated Board Alignment with YOLO

yolo alignment automation

PCB assembly is incredibly automated steps with tedious manual configuration.

I just ran a small job of 15 boards recently- pretty simple boards, but each board needs to be aligned EXACTLY, well under a 0.1mm.

I have an alignment jig, but it's never quite right. There's some tiny offset or rotation that makes a difference. So I have to jog around manually to recalculate the offset for every single board.

For a small job- say 15 boards without alignment fiducials- this adds about 30 minutes of clicking around. That's a lot of margin gone for a job that might only take an 10 minutes to actually run. Here's an example of the offset when placed into the jig:

We automated this step using YOLO- "You Only Look Once" - a SOTA model for rapid bounding box detection.

Collecting Data

First, we littered the board with poorly rotated PCBs.

Then, did a grid scan to capture an image every 1cm/sq.

Bounding Box Annotations

Next, we used a custom bounding-box annotator system. For every images in the captures (1189), we drew bounding boxes around every component- resistors, capacitors, ICs- grouped together to get their full set of pads.

The results from this annotation was used for a fine-tuning pass on the YOLO11 OBB model, which can detect rotations.

Integrating with OpenPnP

OpenPnP has great scripting capabilities, which we've taken advantage of fully. Our process:

  • Dumps the list of components for the board
  • Runs an image capture at every location
  • Runs YOLO, finding the offset/rotation from the most central bounding box to the center of the image
  • Translate to mm, and averages
  • Updates the board location in OpenPnP

Dead on- the board is aligned better than I would in under a minute.

What This Means

This saves HOURS of tedious, error-prone configuration for an assembly job. We're getting closer to the goal of an operator placing in a board, pressing "go", and walking away. And the same system can be used for placement analysis, detecting offset and automatically correcting.

Best of all, the entire system took under a day to develop.