Focus Stacking Stage
Taking photos of small objects (macrophotography) brings up the issue of depth of field: when the subject is very close to the lens, the depth of field in the image becomes tiny, and a lot of the subject's details are lost. However, by combining multiple images where the subject is in focus in different areas, we can create one image that has a much larger depth of field. This process is called focus stacking.
One way of changing where the subject is in focus is by consistently changing the subject's distance from the camera between each shot. This can be made much easier by using a flexure stage, where the user only has to turn a screw to change the subject's distance from the camera just a minuscule amount.
Using an Arduino microcontroller, I automated an existing flexure stage that previously had to be tediously adjusted between each shot (these stacks can be comprised of up to 100 shots).
A singular macro shot of a flower. Notice the small depth of field (only a small portion of the flower is actually in focus).
60 frames, stacked (captured automatically using my device). Here the whole flower is in focus, stem, petals, and all.
With the Arduino system, the user inputs the number of photos that will be taken, the distance that the subject will move (alternatively, how far the screw on the flexure stage turns), and how long the camera should wait between photos (this will have to take the shutter speed into account) with an IR remote. When the user presses start, the device automatically alternates between triggering the camera and moving the subject until enough photos have been taken. The user can also emergency stop the sequence at any point by using the "stop" button.
This project was one of my first using Arduino hardware and software. I learned how to integrate a small stepper motor, IR receiver, LCD display, shutter release cable, and IR remote (which I customized with specialized buttons) into one cohesive and functional system.
Full Arduino Code (PDF):