Getting Focus Motor Data From Camera to Computer?

Hi there!

I saw a few posts about creating focus motors, etc for cameras, and they look super cool and exciting. I am wondering about the opposite kind of build and if it is possible.

Basically, I have a fancy gimbal (DJI Ronin S) and I am thinking about getting the focus motor to add on to it, but I want to get the data for when it is turning so that I can use that to be able to focus AR objects in Unity or TouchDesigner while using the camera (my existing app is aware of the camera position in relation to both real and virtual spaces, so that's not a problem).

The way I imagine it working is that I can attach a servo motor to the focus motor, and when it turns it will send some data to the arduino, and I can calibrate based on the data sent and create meaning for it on the software side which is more my realm.

Where I am stuck, though, is that I don't know if the servo motor can really send that data or if it can only receive it...it seems a PWM signal tells it how much to move...can the motor give a PWM value or some kind of voltage/value to the arduino to know if/how much it has rotated?

It seems like a fun project to jump into, but I wanted to ask these questions first as I definitely don't consider myself a hardware person.

Thanks to anyone and everyone! :slight_smile:

Servos don't generally provide an output signal of any kind and certainly not when moved by an outside force. Could you attach a rotary encoder to the focus motor and read that ?

Hi Bob, thanks so much for your response! So in the process, a rotary encoder could replace where I had the servo...hmmm...it sounds like a good start. :slight_smile:

Are there any rotary encoders that are small enough to fit into the teeth of a follow focus type of device? Most of the ones I saw were pretty big...

Another random thought came to mind...would it be possible to use something like a gyroscope or accelerometer? Thinking out loud, but maybe it could know its value according to its position on the focus wheel...probably much easier to calibrate using a zoom wheel that has a definite end-point?

Hobby grade accelerometers and gyros are no good enough to give accurate position data.

We can not know what you mean by "small". Can you quantify that? What resolution do you need (pulses per revolution)?

How many degrees do you need to measure? Maybe a pot would work? There are pretty small multi turn pots. A pot will give you absolute position without a "homing" method.

Are there any rotary encoders that are small enough to fit into the teeth of a follow focus type of device? Most of the ones I saw were pretty big...

Bigger than the servo that you were considering using ?

groundFungus:
Hobby grade accelerometers and gyros are no good enough to give accurate position data.

We can not know what you mean by "small". Can you quantify that? What resolution do you need (pulses per revolution)?

How many degrees do you need to measure? Maybe a pot would work? There are pretty small multi turn pots. A pot will give you absolute position without a "homing" method.

Thanks for the response!

Good to know about accelerometers.

Maybe I misunderstood about the pots in general... Is the idea that a servo would turn a pot it is wired to when it moves? Or that the servo would physically rotate the pot?

I was thinking the latter, which is why I asked about size in respect to the size of each notch of a standard cinema lens (fitting inside one of these grooves).

https://bhpho.to/3eB1M53

If we are talking about rotations as the size, and the pot can be controlled by the servo (which turns when the focus wheel turns), then it looks like a multi-turn pot would be a good solution!

Thanks again for all the knowledge and suggestions, still wrapping my mind around everything for this project so this has been really invaluable!