Matlab/Arduino controlled Macro Rail for Macrophotography

Version 1.0.0 (8.27 KB) by Chris Hager
Graphical user interface to control a DIY Macro Rail through Arduino UNO / Motorshield


Updated 17 Sep 2019

View License

This setup allows me to automate the process of taking several pictures of tiny things that we can not get in focus with a single shot. Many solutions exist for a “problem” like this and here is my DIY approach. Using this simple GUI, I control a stepper motor and remotely trigger the camera shutter through Arduino UNO / Motorshield.
Once done, I use Zerene Stacker ( to create a single stacked image of the frames.

***** DISCLAIMER *****
This setup works fine for me but be aware that we are dealing with electronics remotely triggering the camera. While the setup in theory is almost fail safe, I can not be held responsible for any damage to your camera equipment or harm to yourself. Please educate yourself about the workings of the circuits and possible consequences of incorrect setup.

Cite As

Chris Hager (2023). Matlab/Arduino controlled Macro Rail for Macrophotography (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Find more on ROS Toolbox in Help Center and MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes