← All journal entries
Build log / Oct 7, 2026

Building an autofocus prototype

A first software foundation for camera capture, GRBL motion, focus scoring, and reproducible scan records.

microscopeautofocussoftware

The microscope software now has a Python autofocus application that connects the ideas of camera capture, controlled Z movement, focus scoring, and scan logging. The current prototype includes a simulator, a desktop interface, and automated tests. Physical hardware validation is still ahead.

Current statusSimulation tested

The workflow can be exercised without opening a camera or serial connection. The physical microscope, motor, and camera still need calibration and repeatability tests.

The question

Can a controlled series of images identify a reliable focus position, while leaving enough evidence to understand why a scan succeeded or failed?

What the prototype does

The application makes a coarse scan over a bounded interval, refines around a promising peak, returns to the selected position, and verifies the focus score. It records each measured position and the images used to evaluate it. A simulation mode allows the workflow to be developed before connecting hardware.

The current software also includes a USB camera reader, GRBL motor adapter, configurable travel bounds, focus metrics, a desktop preview, and test coverage for motion and scan behavior.

What remains to test

The next journal entries will document calibration, wiring, camera behavior, focus curves, and any design revisions that follow from physical testing.

End of entryMore from the journal →