Motorize inexpensive focussing helicoid

Have questions about the equipment used for macro- or micro- photography? Post those questions in this forum.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

mightimatti
Posts: 31
Joined: Tue Feb 08, 2022 9:03 am
Location: Rome, Italy

Motorize inexpensive focussing helicoid

Post by mightimatti »

Hi,
I am working on a DIY project that involves a consumer camera tethered to a computer and I would like to be able to auto focus said camera in a macro setting ~1:1 reproduction ratio. Adjustments will be extremely minute, I expect no more than a mm of deviation in the distance of the subject.
I understand that the standard way of doing this is usually to set the maginication by controlling the lens to the camera and then placing the entire camera on a slider to focus. I have implemented this multiple times before using stepper motors and linear units I found off ebay. Linear slides, especially the variety of sufficient quality to reliably carry the weigh of a camera+lens without shake and move smoothly are not cheap though and from an engineering POV in a settng where adjustments are minute and you're not focus stacking, it seems kind of silly to do it like this. I further believe, that a huge threshold to people using enlarger/industrial lenses more often is the tedium of manual focus with very thin DOF.

This had me wondering: Couldn't you just motorize an inexpensive focussing helicoid? I don't have enough experience with these in a Macro setting and am trying to figure out whether it would be worth investigating. I have seen this kind of focus frequently in industrial inspection setups but wonder why no one seems to have DIY-ed this yet, to have motorized focus in a studio/tethering configurtation. Here's what I have in mind:
Screenshot from 2024-03-30 13-43-23.png
My questions are the following:

1.) Does the hive mind think this could work?
2.) Do you have any recommendations what Helicoid to get? I think M42 would be a nice and compatible thread interface but I am open to suggestions. I don't want to use something like the UNIFOC cause it's too expensive for an accessible DIY solution and not readily available enough on the used market.
3.) What kind of focussing accuracy do you think one could expect with a regular 200 step/rev NEMA17 stepper motor and a 3D printed focus gear/pulley on the helicoid?

Thank you for any suggestions.

EDIT: The software side of things is not an issue and the system already has the necessary electronics to drive the stepper, so the question is really about the mechanics/optics

bbobby
Posts: 82
Joined: Sat Jan 15, 2022 12:40 pm
Location: Indianapolis, IN

Re: Motorize inexpensive focussing helicoid

Post by bbobby »

1. It will definitely work. And I would buy something like that - if price is right ;-)
2. Cheap M42 helicoids from China are widely available
3. I got one and mine makes 360 degrees turn for ~12.5 mm linear movement. 200 step/rev is 0.0625 mm... on your model you have a gear, so depending on the ratio... better to use 400 step/rev because I think you have to aim for 10 microns or less per step... maybe a design with direct drive instead of belt will be also useful, like these commercially available Modular Follow Focus Units. If you print adapter for the helicoid and implement rack and pinion system...

Lou Jost
Posts: 5987
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Re: Motorize inexpensive focussing helicoid

Post by Lou Jost »

I do this manually with a cine follow-focus attachment, and it works well. A motorized version of this would be very useful!

But I find myself using this not only with helicoids but with regular macro lenses. I'd recommend not making the helicoid part of the system, but rather making your device so that it can deal with any helicoid, including that of a regular lens.

I suppose you have the motor already, but if I were doing this, I would base it on the Micromate motor and WeMacro controller, to use off-the-shelf electronics and software, making it universally accessible to everyone.

Edit: existing gear belts for helicoids are too narrow; it would be nice to find or make wider detachable belts so that as the lens or helicoid extends, the geared portion of the helicoid does not move beyond the drive belt.

mightimatti
Posts: 31
Joined: Tue Feb 08, 2022 9:03 am
Location: Rome, Italy

Re: Motorize inexpensive focussing helicoid

Post by mightimatti »

Hi and thank you for the quick replies
bbobby wrote:
Sat Mar 30, 2024 7:20 am
1. It will definitely work. And I would buy something like that - if price is right ;-)
2. Cheap M42 helicoids from China are widely available
3. I got one and mine makes 360 degrees turn for ~12.5 mm linear movement. 200 step/rev is 0.0625 mm... on your model you have a gear, so depending on the ratio... better to use 400 step/rev because I think you have to aim for 10 microns or less per step... maybe a design with direct drive instead of belt will be also useful, like these commercially available Modular Follow Focus Units. If you print adapter for the helicoid and implement rack and pinion system...
the reason I intend to use a belt is because the Helicoids that I have seen actually have the ring I would attach the gears to move along the optical axis as well(it would appear approx half the change of overall length). This means that the motor either needs to move along (complicated, increases cost) or the mechanism needs a way of "forgiving" this motion. With a timing belt of sufficient length, I feel like the belt itself, possibly with an optional tensioner) could compensate for the displacement.
Lou Jost wrote:
Sat Mar 30, 2024 7:31 am
I do this manually with a cine follow-focus attachment, and it works well. A motorized version of this would be very useful!

But I find myself using this not only with helicoids but with regular macro lenses. I'd recommend not making the helicoid part of the system, but rather making your device so that it can deal with any helicoid, including that of a regular lens.

I suppose you have the motor already, but if I were doing this, I would base it on the Micromate motor and WeMacro controller, to use off-the-shelf electronics and software, making it universally accessible to everyone.
I am not very familiar with the WeMacro controller, but I got the impression that it's main benefit is in the ability to program sequences of acquisition to the end of focus stitching. With the objective of adding autofocus capabilities, a key aspect missing with the WeMacro (as far as I can tell from a 30 second online research) is the ability to send "focus forward" "focus backward" instructions from a a software that can "see" the camera image. I.e. to search optimal focus, there needs to be a software involved that receives an image, quantifies focus and then instructs the motion system to adjust. You repeat this until the measure converges to some maximum. While I can get the image out of many modern cameras and quantify sharpness, the WeMacro ecosystem doesn't seem to be intended for external software integrations. Correct me if I'm wrong. So in fact it is the WeMacro that isn't "open" enough, no?
Re your edit, I am not sure I follow. Don't you think that for a limited range of focus the variability in the belt could make up for the shift in position along the optical axis?

Lou Jost
Posts: 5987
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Re: Motorize inexpensive focussing helicoid

Post by Lou Jost »

mightimatti wrote:
Sat Mar 30, 2024 8:41 am
Hi and thank you for the quick replies
bbobby wrote:
Sat Mar 30, 2024 7:20 am
1. It will definitely work. And I would buy something like that - if price is right ;-)
2. Cheap M42 helicoids from China are widely available
3. I got one and mine makes 360 degrees turn for ~12.5 mm linear movement. 200 step/rev is 0.0625 mm... on your model you have a gear, so depending on the ratio... better to use 400 step/rev because I think you have to aim for 10 microns or less per step... maybe a design with direct drive instead of belt will be also useful, like these commercially available Modular Follow Focus Units. If you print adapter for the helicoid and implement rack and pinion system...
the reason I intend to use a belt is because the Helicoids that I have seen actually have the ring I would attach the gears to move along the optical axis as well(it would appear approx half the change of overall length). This means that the motor either needs to move along (complicated, increases cost) or the mechanism needs a way of "forgiving" this motion. With a timing belt of sufficient length, I feel like the belt itself, possibly with an optional tensioner) could compensate for the displacement.
Lou Jost wrote:
Sat Mar 30, 2024 7:31 am
I do this manually with a cine follow-focus attachment, and it works well. A motorized version of this would be very useful!

But I find myself using this not only with helicoids but with regular macro lenses. I'd recommend not making the helicoid part of the system, but rather making your device so that it can deal with any helicoid, including that of a regular lens.

I suppose you have the motor already, but if I were doing this, I would base it on the Micromate motor and WeMacro controller, to use off-the-shelf electronics and software, making it universally accessible to everyone.
I am not very familiar with the WeMacro controller, but I got the impression that it's main benefit is in the ability to program sequences of acquisition to the end of focus stitching. With the objective of adding autofocus capabilities, a key aspect missing with the WeMacro (as far as I can tell from a 30 second online research) is the ability to send "focus forward" "focus backward" instructions from a a software that can "see" the camera image. I.e. to search optimal focus, there needs to be a software involved that receives an image, quantifies focus and then instructs the motion system to adjust. You repeat this until the measure converges to some maximum. While I can get the image out of many modern cameras and quantify sharpness, the WeMacro ecosystem doesn't seem to be intended for external software integrations. Correct me if I'm wrong. So in fact it is the WeMacro that isn't "open" enough, no?
Re your edit, I am not sure I follow. Don't you think that for a limited range of focus the variability in the belt could make up for the shift in position along the optical axis?
Autofocusing is way beyond what I was suggesting. You didn't mention that before. I think it is unnecessary and even distracting, for the kinds of applications we usually highlight here, but maybe you have a different use in mind. When stacking, it is easy (and I think preferable) to set the limits manually using WeMacro and then run the stack automatically. It is hard to see what would be gained by the kind of autofocusing you are suggesting, for our normal stacking work.

In any case, making a device which can be attached to ANY helicoid (including that of a lens) would be enormously more useful than one that was wedded to a particular helicoid.

In my experience some helicoids move quite a lot along the lens axis as they are turned, and my system has often "derailed" from the gear on the lens.

mightimatti
Posts: 31
Joined: Tue Feb 08, 2022 9:03 am
Location: Rome, Italy

Re: Motorize inexpensive focussing helicoid

Post by mightimatti »

Lou Jost wrote:
Sat Mar 30, 2024 10:00 am
mightimatti wrote:
Sat Mar 30, 2024 8:41 am
Hi and thank you for the quick replies
bbobby wrote:
Sat Mar 30, 2024 7:20 am
1. It will definitely work. And I would buy something like that - if price is right ;-)
2. Cheap M42 helicoids from China are widely available
3. I got one and mine makes 360 degrees turn for ~12.5 mm linear movement. 200 step/rev is 0.0625 mm... on your model you have a gear, so depending on the ratio... better to use 400 step/rev because I think you have to aim for 10 microns or less per step... maybe a design with direct drive instead of belt will be also useful, like these commercially available Modular Follow Focus Units. If you print adapter for the helicoid and implement rack and pinion system...
the reason I intend to use a belt is because the Helicoids that I have seen actually have the ring I would attach the gears to move along the optical axis as well(it would appear approx half the change of overall length). This means that the motor either needs to move along (complicated, increases cost) or the mechanism needs a way of "forgiving" this motion. With a timing belt of sufficient length, I feel like the belt itself, possibly with an optional tensioner) could compensate for the displacement.
Lou Jost wrote:
Sat Mar 30, 2024 7:31 am
I do this manually with a cine follow-focus attachment, and it works well. A motorized version of this would be very useful!

But I find myself using this not only with helicoids but with regular macro lenses. I'd recommend not making the helicoid part of the system, but rather making your device so that it can deal with any helicoid, including that of a regular lens.

I suppose you have the motor already, but if I were doing this, I would base it on the Micromate motor and WeMacro controller, to use off-the-shelf electronics and software, making it universally accessible to everyone.
I am not very familiar with the WeMacro controller, but I got the impression that it's main benefit is in the ability to program sequences of acquisition to the end of focus stitching. With the objective of adding autofocus capabilities, a key aspect missing with the WeMacro (as far as I can tell from a 30 second online research) is the ability to send "focus forward" "focus backward" instructions from a a software that can "see" the camera image. I.e. to search optimal focus, there needs to be a software involved that receives an image, quantifies focus and then instructs the motion system to adjust. You repeat this until the measure converges to some maximum. While I can get the image out of many modern cameras and quantify sharpness, the WeMacro ecosystem doesn't seem to be intended for external software integrations. Correct me if I'm wrong. So in fact it is the WeMacro that isn't "open" enough, no?
Re your edit, I am not sure I follow. Don't you think that for a limited range of focus the variability in the belt could make up for the shift in position along the optical axis?
Autofocusing is way beyond what I was suggesting. You didn't mention that before. I think it is unnecessary and even distracting, for the kinds of applications we usually highlight here, but maybe you have a different use in mind. When stacking, it is easy (and I think preferable) to set the limits manually using WeMacro and then run the stack automatically. It is hard to see what would be gained by the kind of autofocusing you are suggesting, for our normal stacking work.

In any case, making a device which can be attached to ANY helicoid (including that of a lens) would be enormously more useful than one that was wedded to a particular helicoid.

In my experience some helicoids move quite a lot along the lens axis as they are turned, and my system has often "derailed" from the gear on the lens.
Hi Lou,

my initial post states that I am looking to automate focus. "The applications usually highlighted here" are specifically what I am trying to depart from. In said cases, as when you're focus stacking for instance, my understanding is that there are reasons not to use a helicoid or even the focus on the lens barrel. My understanding is that you change the reproduction ratio and hence, especially for "deep" stitches the images don't align properly.

My application doesn't need the reproduction ratio to be set like that and I am generally just trying to collect ideas on how one could implement such motorized focus in a budget-friendly way. Even if it's not required by your workflow, I am sure that there are photographers who would appreciate being able to use their high performance industrial/scanner/repro lenses WITH the convenience of auto focus or at the very least the ability to manipulate focus without having to touch/shake their macro rig. It's just an extra option and happens to be part of my driving motivation.

I share your sentiment of wanting solutions to be open and accessible, which is why I am working on this project to begin with. I'm just pointing out that aspiring towards "open" solutions and basing this endeavor on some third parties proprietary hardware/software is a bit contradictory. In any case, most stepper motors have an interface which can be driven by diverse hardware, so any design I arrive at doesn't preclude the products you mention. However if you're looking to motorize a manual lens like this and you already have the WeMacro controller, I think the task boils down to 20$ in off-the-shelf GT2 belt, a motor and a pulley, and some time in CAD spent designing the pulley that fits your specific lens. If this is something you're interested in and don't have the CAD skills, I'm happy to help you with a design you can 3D print.

Espresso
Posts: 21
Joined: Sun Feb 04, 2024 6:18 am
Location: Sweden

Re: Motorize inexpensive focussing helicoid

Post by Espresso »

There are at least two different areas where rotation and longitudinal movement are combined.
One is in older flatbed scanners that uses thin steel cables and small wheels to change the
direction of the cable(s). The other is in the "drive train" of clocks where a cable runs
in a spiral groove around a cylinder (conical to get constant force when spring runs down).
A cable around a cylinder will take up sideways movement better than a toothed belt me thinks.

An axle with splines will have friction or be sloppy and variants with steel balls in groves
will not be cheap (linear ball bearings).

This is my testbed for driving stepper motors of all sorts.
Open source libraries for most parts.
6_Arduino.jpg

Lou Jost
Posts: 5987
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Re: Motorize inexpensive focussing helicoid

Post by Lou Jost »

Maybe I am misunderstanding what you mean by "autofocus". Do you want the lens to focus autonomously without human intervention? Or do you just want to be able to motorize the focus, which would be controlled by you through the motor?

"In said cases, as when you're focus stacking for instance, my understanding is that there are reasons not to use a helicoid or even the focus on the lens barrel. My understanding is that you change the reproduction ratio and hence, especially for "deep" stitches the images don't align properly."

I don't think that is true. For low magnifications especially, focus by helicoid is generally accepted as potentially superior than focus by rail, if the entrance pupil does not change position relative to the subject. Moving the entrance pupil during stacking can cause perspective distortions, and these truly cannot be fixed by stacking software (unlike pure scale differences or "reproduction ratio" differences, which can easily be taken into account by stacking software). Many of us regularly use autofocus lenses that automatically generate a stack of photos by moving the helicoid; we have nothing against this, and I do it manually when I have to. I would love a motor for that. But what I can't figure out is why you would want to fully automate the focus during the stack (if that is what you really want to do). Where to start and end the stack is a creative decision that is easy to do manually (without touching the camera, if there is a motor) but tremendously difficult to do automatically. Frankly I do not believe that an automatically generated starting and ending point would be as good as manually set ones. Again, maybe I am misunderstanding what you mean.

"I'm just pointing out that aspiring towards "open" solutions and basing this endeavor on some third parties proprietary hardware/software is a bit contradictory."

I see your point. My own bias is towards solutions that are easy and fast, and that means using components that are readily available, if possible. I don't have the skills or time to re-invent this stuff.

"I think the task boils down to 20$ in off-the-shelf GT2 belt, a motor and a pulley, and some time in CAD spent designing the pulley that fits your specific lens. If this is something you're interested in and don't have the CAD skills, I'm happy to help you with a design you can 3D print."

Thank you, that's very kind. I have so many lenses that I would need to invent a design that can clip onto any lens or helicoid....but I think this is possible.

Espresso
Posts: 21
Joined: Sun Feb 04, 2024 6:18 am
Location: Sweden

Re: Motorize inexpensive focussing helicoid

Post by Espresso »

If the idea is a full servo system that has built-in time delays it will not be easy.
If the delays change and the mechanics has backlash and/or components that act like
springs combined with friction you may get oscillations or an unstable system.

dabateman
Posts: 1
Joined: Wed Apr 03, 2024 7:48 pm
Location: Virgina, USA

Re: Motorize inexpensive focussing helicoid

Post by dabateman »

Not only will this work but it also exists.
You can buy the Cam Fi system:
https://www.cam-fi.com/en/product/camfi_zf.html

Although I don't know if it would be cheap as you might need their controller.

But building one your self using all their parts, but switch out the motor control and adapter your own cable to a MJKZZ IR controller maybe possible. Then you could program in the micro stepping needed for very fine lens rotation.

Lou Jost
Posts: 5987
Joined: Fri Sep 04, 2015 7:03 am
Location: Ecuador
Contact:

Re: Motorize inexpensive focussing helicoid

Post by Lou Jost »

For many applications, the main reason to make stacks by "ring" rather than rail is because it gives the option to keep the entrance pupil stationary during the stack. This avoids the perspective shifts that confuse stacking software. To do this, you need to attach the front of the lens to the tripod or support, and let the camera slide backwards on some kind of track as the helicoid extends. That's what I use my follow-focus attachment for. You might consider incorporating a device that does this. The existing cine follow-focus devices (like mine) need extensive modification for this use.

Post Reply Previous topicNext topic