Pages: [1]   Go Down
Author Topic: Control the focus mechanism of a camera lens  (Read 2841 times)
0 Members and 1 Guest are viewing this topic.
Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I'm new here and I hope, my question fits in this Topic.

I wondered, if it is possible to control the focus mechanism of a camera lens with an arduino.
Theoretically it should be possible, right?

So my other question would be - were it ever done so far?
I guess, I just would need a library to drive the mechanisms, right?
(just for example, this lens here: Tamron.eu - SP 24-70mm F/2.8 Di VC USD

My goal is it to use a zoom lens, to look at a proton beam, which ionize some atoms, so I get a feedback to my photomultiplier.
At least, this would be the perfect case, to focus it remotely.
Logged

0
Offline Offline
Full Member
***
Karma: 3
Posts: 183
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Control of the focus mechanism is probably not a problem if the message protocol is available from Tamron.  Are you looking at automated focus control where the Arduino MCU does the image processing necessary to focus the camera, if this is the path you want to go you will probably find Arduino does not have narly enough processing power.  Controlling the focus as you look at an image generated from the camera say with a potentiometer is doable as your eyes do the image processing.

wade
Logged

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No, I didn't want to use Arduino for processing the autofocus, but use the motor of a lens manually, that has autofocus.
As I tried to mention in the end of my question, I get a signal on a photomultiplier, at which I look. So the processing is actually done by human smiley

So I need the message protocol for the lens (or the mount?).
I guess, that is mostly a secret from the producer of the lenses?  smiley-sad-blue
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24450
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I would guess that the control protocol is not Tamron's, but Canon's or Nikon's,or whichever manufacturer's mount you choose.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I guess so too.

So if two different manufacturers use the same lens, the protocol should be the same or at least mostly the same, right?
Otherwise the lens would need different protocols.

I wonder, if the protocol is always the same, in the different cameras (or camera generations).
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 240
Posts: 24450
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm afraid I don't know; my DSLR is rather old-school, with its focus motor in the body,and the coupling is mechanical.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 29
Posts: 1074
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

So if two different manufacturers use the same lens, the protocol should be the same or at least mostly the same, right?
Otherwise the lens would need different protocols.
Hi,

That would be ideal, however it's not how it works in practice.  Tamron makes a model for Canon EF mount for example, which is specific to only Canon EOS system cameras.  For most of their lens types they offer models specific to 3 or 4 camera systems, typically covering Nikon (models with built-in AF motor), Canon EF, Sony or Pentax.  You don't buy one lens which would operate on all 4 and the systems are dissimilar, which is why you cannot trade in your Canon EOS to move to Nikon without replacing all your glass too.

Before autofocus, Tamron did have an interchangeable lens system (Adaptall) which adapted to each camera manufacturer's physical mount using a manufacturer-specific collar.  The Tamron T or T2 mount is still used for attaching cameras to telescopes, but it doesn't have the connectors for the electronics for the autofocus (and aperture control, etc) in it.

Cheers ! Geoff
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I see, thanks.

I did a little research today and found this one here: http://kzar.net/wiki/Photo/CanonEFProtocol
Pretty neat referance for the protocol, as it seems. At least for the EF mount, which would serve me very well, too.
With this help, can I just use an Arduino (e.g. Uno), to communicate with the lens and remotely control the lens? (of course, if I write the right code with an interface for it)

Or is there even more behind it?
Logged

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 29
Posts: 1074
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi

There is a little more, as is typically the case I find smiley

In order to control the lens you need to be able to interface with it electrically, and of course with the lens on your SLR body, there's no way to get in there.  That means doing something clever, like this guy did http://hackaday.com/2012/02/24/microcontroller-gives-you-more-control-of-your-camera-lens/ and create some kind of interface ring so you can get to those connections.

Anything you put between the focal plane of your camera and the lens will impact the focus capability of the lens, but what you lose is infinity, so in your case that won't matter.  If you want to see the worst case of that, look to macro rings, which are simply spacers between the camera and the lens which cause you to lose infinity focus entirely, but mean you can focus far nearer than normal.

Because I don't speak the native language of that linked article, and the machine translation is hard to read, I've found it hard to follow.  Hope you have more luck.

Cheers ! Geoff
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

alright, thank you for the link! I am lucky enough to know a russian scientist, who works with me and he could translate the summary of the article smiley

I guess it is a little too risky and need too much time for me, to make such a projekt. Because the article says, that it is different from lens to lens, how the protocol works. Some lenses need more or less voltage and they react differently to commands.
But I keep it in mind. smiley

Cheers!
Kari
Logged

Pages: [1]   Go Up
Jump to: