Anyone know what the highest possible accuracy sensor is at short ranges? I am designing an autofocus mechanism for a Large Format camera and I decided I need two range finder sensors- a long one and a short one. The long one will be to measure the distance from the lens to the subject and the short will be measure the distance from the lens to the film plane (to measure lens focus). The long one shouldn't be a problem, but the sensor for the lens to the film plane is a tough one. It is going to need something like 1mm accuracy but only from a range of about 50mm-300mm. Anyone know what kind of sensor would be good for that accuracy? If it helps it's not a problem to do a transmitter-receiver configuration.
You're probably going to want some kind of laser distance sensor for the subject sensor (it won't be cheap if you want any kind of accuracy, but if you can't afford what professionals us, you may be able to modify/hack a laser-based tape measure); I would stay away from ultrasonics, they might not be accurate enough for the distances you are looking for (I would imagine - you didn't say what your subjects were). Plus, with ultrasonics there are absorption/reflection issues that may make things difficult in actual usage.
Now, as you noted, the lens sensor is an entirely different beast; you may want to look into what is used by SLR/auto-focus cameras to get some ideas on how to actually do this (most use optical/IR with split cube prisms or such, plus special optical sensors, IIRC). You didn't say how you were moving the lens or what the camera looks like?
If the camera is what I am thinking of (large format, glass/solid plates, bellows sheild with pantograph-style workings), then you are probably planning on moving the lens in/out with a screw drive motor, perhaps? You could count rotations of the motor to get a travel distance of the linkage carriage on the screw drive. You could also potentially mount a potentiometer in some way to the pantograph supports so that as they rotated, the potentiometer did as well, and the angle translated into a varying resistance/voltage level could be read by the Arduino and interpreted as a distance...
Hope these ideas help!
You're probably going to want some kind of laser distance sensor for the subject sensor (it won't be cheap if you want any kind of accuracy, but if you can't afford what professionals us, you may be able to modify/hack a laser-based tape measure);
Ya I pretty much assumed I would need a laser sensor which is pretty pricey but hopefully accurate enough. Distance ranges would probably need to be about 5ft-inifinity (300ft?) to be useful. Accuracy would need to be more at the lower end of the range then in the high (DoF increases with focused distance) which is probably how most sensors work.
If the camera is what I am thinking of (large format, glass/solid plates, bellows sheild with pantograph-style workings), then you are probably planning on moving the lens in/out with a screw drive motor, perhaps? You could count rotations of the motor to get a travel distance of the linkage carriage on the screw drive.
I want to modify the camera (Speed Graphic or similar) as little as possible so mechanical linkages and mirrors that are normally used for analog rangefinders are out. I was hoping for a "magical" sensor that could attach in two points on the camera and provide the distance between those two points (with 1mm accuracy). It looks like there may be no such sensor though- unless I use laser for that too?
Oh and I do not plan on using a motor to move the focusing mechanism- too complicated. I just want the Arduino to watch the lens-film plane distance as I manually move the focusing mechanism back and forth. It will light up LEDs to tell me if I need to focus in or out, and light up a green LED when focus is achieved.
I am sorry to say that this is an considerable undertaking.
Autofocus systems are inherently complex systems.
look at wikipedia:
There is a reason why cameras use fuzzy-logic.
David
It's not actually a autofocus system I want. Basically what I want is a digital rangefinder system not a full-fledged Autofocus system. Basically all I want is something to measure lens to subject distance (laser rangefinder). Then a rangefinder to measure the much smaller lens to film plane distance with great accuracy. The long rangefinder determines subject distance which then can be used to calculate lens to film plane distance (using the lens known focal length). Once you have that measurement all the user has to do is adjust the lens to that calculated distance. The short rangefinder will aid the user in adjusting the lens to the calculated distance by measuring the distance as they move the lens back and forth until the calculated distance is hit.
This should be fairly straightforward. Many old cameras were focused in a similar way using an analog rangefinder (used mirrors and parallax I think) which was linked to the lens focusing mechanism.
This should be fairly straightforward. Many old cameras were focused in a similar way using an analog rangefinder (used mirrors and parallax I think) which was linked to the lens focusing mechanism.
IIRC, from my research (for homebrew LIDAR), these kinds of analog systems used a couple of mirrors and/or prisms, one fixed, and the other free to rotate - you would point the device at the object you wanted range for, then you would align the other mirror so that the object and its "ghost" overlapped (there may have been a alignment markers on the lenses/mirrors/prisms as well). Then, since the immovable mirror was at a 45 degree angle, and the movable was set at an arbitrary angle, and you knew the distance between the two, some simple geometry calcs would get you the range.
Unfortunately, the computer involved was your brain (to know when things were accurately aligned). It is possible to do with with a computer (or microcontroller) and a linear CMOS sensor...
I am not sure that what you are asking to be able to do (at least with the short range sensor) is possible to the accuracy you are needing, at least in a homebrew manner, without modifying the camera somewhat (and I can understand why you don't want to do that, too).
Something that might be possible (and I can only give you a rough sketch of what to do):
-
Two tubes nested inside each other, so they can slide. Both tubes painted inside and out flat black. A cap is on each end (with a mount on each end to connect to the lens movement system).
-
The inner tube has a slot cut down the side.
-
A linear CMOS sensor array (like used in flatbed scanners, but not as long) is put inside the tube, with the optical elements facing outside the slit.
-
As the tube is slid out, more of the array is exposed to light. Clock the data out of the sensor, counting the pixels that are lit. The unlit ones are inside the tube.
Basically it would be a high-resolution optical slide rule.
Oooh - another possibility (probably easier!) - go to Harbor Freight and get an el-cheapo digital caliper:
From what I understand, they use some kind of capacitance sensing, and are fairly accurate - maybe you could hack something like that?
I think you are right there is no way to do this without modifying the camera in some way. Good idea with the capactive measurement- I will look into that. I am also thinking maybe a rotary encoder rigged to rotate with the camera's focusing rail might work. As the rail moved the rotary encoder would turn and that would act as a distance calculator (5 turns = 1mm or whatever). Distance only has to be relative as well- if I always start the focusing rail in one fixed point the Arduino only has to know your are X mm or -X mm away from that fixed point.