17
\$\begingroup\$

I have built a custom optical device that uses a standard C-mount lens as found on CCTV cameras.

Wikipedia states that the flange-to-film distance of a C-mount lens is 17.526 millimetres.

I have built my device with roughly the same distance (about 18 millimeters) between the flange and the optical plane.

When playing around with the focus, I can focus objects as close as 30 centimeters, but not further than 2 meters, rendering the device effectively near-sighted.

My question is threefold:

  1. If I have built my device with the correct distance between the flange and the optical plane, does this mean the (inexpensive) lens I am using is bad?
  2. If not, is there a way to determine the right distance that I should use?
  3. If not, do I move the lens away or closer to the optical plane to fix the problem?
\$\endgroup\$
5
  • 26
    \$\begingroup\$ Flange to film/sensor distance generally needs to be a little more precisely implemented than "roughly the same distance"... There's a reason it's quoted to to micro-meter precision. \$\endgroup\$
    – twalberg
    Oct 22, 2019 at 16:56
  • 2
    \$\begingroup\$ A bag of c mount lenses is a bag of surprises regarding tolerances.... \$\endgroup\$ Oct 22, 2019 at 20:03
  • \$\begingroup\$ @twalberg That makes sense. I will try to make a more precise mount, I remember rounding to 18mm. I didn't know that it was important to be that accurate. \$\endgroup\$ Oct 22, 2019 at 20:21
  • \$\begingroup\$ @rackandboneman Would not suprise me. But I don't need superior optical quality, I just need as much light as I can get, so at f/1.4 the C-mount lens I bought is best bang for the buck. \$\endgroup\$ Oct 22, 2019 at 20:23
  • 2
    \$\begingroup\$ Yes, but 0.1mm of register tolerance is going to make that lens worthless at anything but macro, especially at f/1.4, on a non-compliant camera :) \$\endgroup\$ Oct 22, 2019 at 20:27

5 Answers 5

40
\$\begingroup\$

If I have built my device with the correct distance between the flange and the optical plane, does this mean the (inexpensive) lens I am using is bad?

If you had built your device using the proper specified flange distance of 17.526mm instead of rounding it off to 18mm you probably would not be asking this question. 0.474mm doesn't seem like much, but it is huge when your lens is that much too far from the sensor. Until you get the flange of the lens the proper distance from the imaging sensor, there's no way to know if the lens can focus to infinity as it should or not.

If not, is there a way to determine the right distance that I should use?

The specified registration distance for C-mount is 17.526mm. There is a reason the standard is spelled out to three significant digits past the decimal. Anything more than 17.526mm will not allow your lens to focus at infinity unless the lens is made to move past the infinity focus point when at the proper registration distance of 17.526mm.

If not, do I move the lens away or closer to the optical plane to fix the problem?

You need to move the flange closer - from 18mm in front of the sensor to 17.526mm in front of the sensor. It won't hurt much if you miss by being a little bit short (say 0.1mm), you'll just lose a bit of minimum focus distance. But being 0.1mm too far will almost certainly not allow your lens to focus at infinity.

\$\endgroup\$
7
  • 1
    \$\begingroup\$ Thanks for this complete answer. \$\endgroup\$ Oct 23, 2019 at 10:35
  • 13
    \$\begingroup\$ It would be helpful if you explained how the 0.47 mm can make such a big difference. You could note that a single lens would focus 2 m at 18 mm if its focal length is 1/(1/2000 + 1/18) = 17.839 mm. Essentially, the issue is that those reciprocals become extremely sensitive to small length-differences in the close vicinity of the focal length. \$\endgroup\$ Oct 23, 2019 at 14:14
  • 3
    \$\begingroup\$ 17.526 mm is exactly 0.69 inches. Not "about 0.7 inches" but exactly 0.69. That 0.01 of an inch is important! The reason why the standard was set at 0.69 not 0.70 is a different question, but it is what it is, and you have to follow it exactly. \$\endgroup\$
    – alephzero
    Oct 24, 2019 at 14:54
  • \$\begingroup\$ If you just push on your eyeball slightly, your vision can go quite blurry. \$\endgroup\$
    – Kaz
    Oct 24, 2019 at 23:33
  • 1
    \$\begingroup\$ @Kaz That's probably more to do with distortion of the lens and cornea? \$\endgroup\$
    – Michael C
    Oct 25, 2019 at 5:21
10
\$\begingroup\$
  1. If not, do I move the lens away or closer to the optical plane to fix the problem?

If the lens will focus on near subjects, but not on a subject at "infinity," then that means that the lens is too far from the sensor. You need to move it closer.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ This in combination with the comment of @twalberg actually helped me identify that rounding to 18mm (slightly too far) might have been the problem. This answer only answers question 3, so I am still a little hesitant to accept it. +1 though. \$\endgroup\$ Oct 22, 2019 at 20:25
  • 3
    \$\begingroup\$ If you happen to move it too near, you will be able to focus 'beyond infinity' which is useless, and you'll lose a little bit in the macro distance, so very little risk. \$\endgroup\$
    – Aganju
    Oct 22, 2019 at 23:53
5
\$\begingroup\$
  1. Potentially. It could also be that your measurements are slightly off.
  2. To find the perfect distance, you can focus on infinity, and then slowly move the lens nearer, until the picture is sharp. That is the correct distance; however, you should give it an extra tenth of a millimeter or two, to avoid issues with temperature changes or slight movement when tightening screws, etc. All you are losing is some millimeters of minimum distance at the macro end.
  3. As said, you need to move it nearer to the sensor - until it just gets sharp when set to infinity.moving it further away will give you less and less range on the farsighted end (but smaller and smaller minimum distance at the macro end)
\$\endgroup\$
2
\$\begingroup\$

If an ideal simple lens with focal length f is pointed at a subject at distance s, it will produce a focused image at distance 1/(1/f-1/s). For a subject at infinity, 1/s will be zero, so the distance will be 1/(1/f), i.e. distance f. For a subject which is at distance 2f, 1/s will be 1/2f, so the distance will be 1/(1/f-1/2f), i.e. 1/(1/2f), or 2f.

Focusing on distant objects requires the ability to reduce the focusing distance down to f. Focusing on objects at a distance between 2f and f requires the ability to extend the focusing distance beyond 2f. Focusing on objects closer than the focal length of a lens isn't possible.

\$\endgroup\$
0
\$\begingroup\$

I calculated some values for a lens with a focal length of 25 mm.

To focus to infinity, the sensor should be 25 mm away from the reference plane of the lens.

A mounting error of + 0.001 mm shifts the infinity point to 625 m. An error of 0.01 mm to 62.5 m, 0.1 mm to 6.27 m and 1 mm to only 0.65 m. An error of + 0.5 mm shifts the infinity point to 1,27 m.

I used the formula 1/f = 1/a + 1/b. f is the focal length, a the distance from object to lens and b the distance from sensor to lens.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.