August 27, 2022

My rail and step size for stacking

The first order of business is remembering (and verifying) the step resolution of my rail. It is 16,000 steps per inch.

This has been verified using a dial indicator and experiment, but here is how and why it is how it is. First the stepper motor does 200 steps per rotation. Each step is 1.8 degrees. My stepper controller is configured for 8x microstepping, so it takes 1600 steps to get one full motor rotation. My drive has 2:1 gearing via a belt, so 2 full motor rotations (3200 steps) are needed to get one full rotation of the drive screw. The screw has a 0.2 inch pitch, so we need 5 full turns to get 1 inch. So 3200 * 5 = 16,000 steps yields an inch of motion.

Now let's think about microns, since most macro shooters talk about focus steps in microns (or mm). There are 1000 microns per mm and 25.4 mm per inch.

My stage requires 16000 / 25.4 steps to move 1mm = 630 steps per mm.
A single step moves 0.63 microns (0.0000625 inches)
To move 10 microns, I need 6.3 steps. This is 0.000375 inches

Step size for stacking

One fellow posted a process to photograph a fly using the MPE-65 lens set at 3x and f/4.0. He used 0.09 mm steps (90 microns), and took 57 images, so he covered a focus range of 56 * 0.09 = 5mm.

The best online resource for this kind of thing is photomacrography.net. The search feature built into the forums doesn't work all that well, but using google with the "site:" option to restrict a search to that site works nicely. There is always lots to learn just doing searches and reading things.

I discovered this gold mine of a posting on "focus stacking steps":

The following were recommended as settings to get started with the MPE-65
1X f/11 0.66 mm
2X f/8 0.18 mm
3X f/5.6 0.075 mm
4X f/4 0.037 mm
5X f/4 0.028 mm
Compare the 75 micron step given here for 3x and f/5.6 with the 90 micron recommendation above for 3x and f/4.0

Rick Littlefield gives the formula:

s = 2cn(m+1)/(m*m),
Here s = step size in microns, c = circle of confusion (in microns), n = nominal f/number, m = magnification. He uses c = 15 microns as his circle of confusion.

He talks about nominal f/number as the number marked on the lens. Be aware that the effective f/number is given by f = n(m+1). So at 5x, a nominal f/4 becomes f/24. A rule of thumb that some use is to avoid a nominal f/number greater than 16 in order to avoid diffraction limited resolution.

Many people say that the MPE-65 performs best using f/2.8 at 5x, but this statement is often tempered by saying that individual lenses (and photographers) may differ and you should run your own tests comparing f/4 and f/2.8.

I also read that the MPE-65 has an NA of 0.149 at 5x, wide open at f/2.8. Consider the Mitutoyo 10x Apo with an NA of 0.28 and remember that a bigger NA means more resolution.

Figuring step size for the Mitutoyo 10x has to factor in what focal length of relay lens is being used and thus what actual magnification is being achieved. I see someone claiming a 9 micron depth of field for a 10x objective with an NA of 0.25 (but the Mitutoyo has an NA of 0.28) I see another person with a 10x Mitutoyo on a Raynox 140 using a 7 micron stack increment.

Here is a simple table of effective f/numbers

1x f/2.8 -> f/5.6 ; f/4 -> f/8 ; f/5.6 -> f/11 ; f/8 -> f/16 ; f/11 -> f/22
2x f/2.8 -> f/8.0 ; f/4 -> f/12 ; f/5.6 -> f/16 ; f/8 -> f/24 ; f/11 -> f/33
3x f/2.8 -> f/11  ; f/4 -> f/16 ; f/5.6 -> f/22 ; f/8 -> f/32
4x f/2.8 -> f/14  ; f/4 -> f/20 ; f/5.6 -> f/28
5x f/2.8 -> f/16  ; f/4 -> f/24 ; f/5.6 -> f/33
You can use the above to decide on an f/stop to use for a given magnification setting. Here is the table Mr. Littlefield gave, but opening up a stop at each magnification setting, and recalculating the recommended step size.
1X f/11  0.480 mm
2X f/5.6 0.126 mm
3X f/4.0 0.053 mm
4X f/2.8 0.026 mm
5X f/2.8 0.020 mm
I have seen images shot with the MPE at 5x and f/2.8 that were stacked with a 15 micron step.

These are all starting values, and experimentation should lead to final selections. Note also that different subjects are more "fussy" about what stacks make them look good.


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org