## setting lens focus

9 posts
Interested to compare notes with anyone else who is adjusting lens focus. Before turning the lens I put two white dots, one on lens and one on lens housing, so I could see the rotation angle. Hold lens cell with one set of thin pliers, turn lens with another set. What I find is:

Code: Select all
angle that lens is unscrewed : focal distance
0 degrees: focus at infinity (initial, stock position)
45 degrees: focus at 32 cm
90 degrees: focus at 15 cm
170 degrees: focus at 7 cm

I suspect this is true: to achieve a focal length of "FL", turn the lens CCW by this amount:
Code: Select all
turns = 3.5 cm / FL

For example, if you want FL = 10 cm, unscrew 3.5/10 = 0.35 turns = 126 degrees.
Note: after about one full turn, the lens will be completely unscrewed and fall out, and dust will start accumulating inside the lens housing on the IR filter surface, etc.
Last edited by jbeale on Mon Jun 10, 2013 6:38 am, edited 3 times in total.

Posts: 1592
Joined: Tue Nov 22, 2011 11:51 pm
Wow, did it really make that much diffrence? I'm going to have to try this when my camera board arrives lol
mahjongg wrote:Wishful thinking is a bitch isn't it.
Posts: 568
Joined: Wed Aug 15, 2012 1:05 pm
Hello jbeale,

when you change the focus, does it stop being sharp to infinity?

Cheers
Posts: 19
Joined: Sun May 26, 2013 8:59 pm
smx wrote:when you change the focus, does it stop being sharp to infinity?

The lens is focused at infinity from the factory. Any change you make will change that focus, and it will no longer focus at infinity. The closer you focus it, the more blurry distant objects will be, just like any other camera. There is actually a calculator to tell you exactly what range of things will be "in focus" (for your definition of "acceptably blurry"). Let's say you want to focus at 15 cm, and you'll call it "in focus" with no more than 3 pixels of blur. You also need to know this: R-Pi camera has 1.4 micron wide pixels, f = 3.6 mm and f-stop = 2.9 mm. 3 pixels * 1.4 um = 0.0042 m "Circle of Confusion". Type those numbers into this depth of field calculator.
You will find Near Focus: 13.19cm Far Focus: 17.39cm Depth of Field: 4.21cm

As a specific example, here is an example where I focused the camera at 15 cm. The ruler shows that the horizontal field of view at this distance is also about 15 cm, and items on the far wall (which is about 2 meters away) are blurry.

Posts: 1592
Joined: Tue Nov 22, 2011 11:51 pm
I’m not sure I can answer your question (I made no markings and it is dark now, can’t set infinity properly) but for me the lens slips out of the thread and starts to fall out of the housing when focus is at 4-5cm. That means without further tinkering you can’t use the thread as a focussing helicoid to get closer than about 4cm.

EDIT: actually, make that 3cm.
Posts: 298
Joined: Fri Jan 18, 2013 2:11 pm
Since this simple thread fit is not purposed for precision focus adjustment, some understanding and improvisation is needed to make it work well as such.

I measure the stock lens as having a metric thread, namely M6x0.35. So a fraction of a turn is only a few tenths of a mm at most. There is a lot of "allowance" in these threads relative to tenths of a mm, so you need either some preload force against the lens into the rearward direction of the threads, or some gap filler like PTFE tape. Otherwise the lens will rattle back and forth and throw off your focus adjustment.

("Allowance" in threads is the term for the positive gap between the largest allowed male thread and smallest allowed female thread, in the range of sizes permitted for a given thread standard, so that threads do not interfere.) For M6x0.35, the smallest pitch diameter (female) is 5.793mm versus largest (male) at 5.753mm, so there is at least the difference (0.04mm) in "slop" in a thread fit, and typically much more. This amounts to at least 1/10 turn (typically more) in this thread. These are tiny amounts of looseness but they will affect the focus in cameras and lenses this tiny.

Posts: 68
Joined: Sun Jun 02, 2013 7:19 am
Location: Palm Beach County, Florida USA
My lens seems absolutely tight without any slop, but that may be because I did not remove the three blobs of glue around the edge which (I assume) are supposed to keep it from moving after adjustment to infinity focus at the factory. It does turn anyway using my two-plier technique. On the other hand, I'm not sure if I could detect 40 microns of motion.

Posts: 1592
Joined: Tue Nov 22, 2011 11:51 pm
jbeale wrote:I'm not sure if I could detect 40 microns of motion.

That's a minimum. You'll see it go in and out of focus if you touch the lens. Elastomeric glue blobs might be acting as a preload spring.

Posts: 68
Joined: Sun Jun 02, 2013 7:19 am
Location: Palm Beach County, Florida USA
rkinch wrote:You'll see it go in and out of focus if you touch the lens.

That’s not my experience. It’s a pretty good fit. And the deep DOF works to our advantage.

I’ve found it easiest to pull focus using a rubber bung. Much easier than grabbing the lens using pliers every time. And no chance of scratching it.

Posts: 298
Joined: Fri Jan 18, 2013 2:11 pm