HomeElectronics NewsAutomated Robot Simplifies Precision Focus Stacking for Macro Photography

Automated Robot Simplifies Precision Focus Stacking for Macro Photography

A custom-built robotic platform automates focus stacking, producing highly detailed macro photographs while reducing manual effort and improving consistency for close-up imaging tasks.

Robot Makes Focus Stacking Easy
Robot Makes Focus Stacking Easy

A custom robot built by Alan of MandicReally automates microscope focus stacking, making it easier to capture exceptionally detailed close-up photographs. Developed to photograph 3D printer nozzles, the system replaces the tedious manual process of adjusting focus repeatedly and produces consistently sharp composite images.

Macro photography presents a significant challenge because close-up lenses create a very shallow depth of field, leaving only a small portion of an object in focus. Focus stacking overcomes this limitation by capturing numerous photographs at slightly different focal distances before combining the sharpest areas from each image into a single, fully focused photograph. Performing this process manually, however, requires extremely precise and repeatable movement.

To solve the problem, the robot moves the entire microscope along a vertical rail rather than relying on the microscope’s imprecise focusing mechanism. A horizontal rail enables accurate positioning of the subject, while the structure is built using aluminium extrusion mounted on a laser-cut transparent acrylic base. Addressable RGB LEDs provide illumination for both aesthetics and practical object backlighting.

Motion is controlled by stepper motors driven by a controller salvaged from an old Creality Ender 3, while lighting is managed through a custom driver board based on an ESP32 running WLED firmware. Users simply define the total travel distance and the interval between image captures before allowing the robot to complete the sequence automatically.

The resulting images reveal details that would otherwise remain hidden, clearly distinguishing between new and worn components. Such precision can be valuable for inspecting small mechanical parts, documenting wear patterns or producing high-quality technical images.

By automating focus stacking with affordable, readily available components, the project demonstrates how robotics can significantly improve the speed, accuracy and accessibility of macro photography for enthusiasts, makers and engineers alike.

SHARE YOUR THOUGHTS & COMMENTS

EFY Prime

Unique DIY Projects

Electronics News

Truly Innovative Electronics

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics