Jonovich
Posts: 18
Joined: Tue May 05, 2015 11:31 am
Location: Sunny Rutland
Contact: Website

Any advice for focusing HQ camera and 6mm CCTV lens please?

Sun May 03, 2020 9:27 am

Hi folks,

Can anyone assist me with some advice for focussing the HQ camera with the 6mm CCTV lens please?

I have it all assembled (without CS-C adapter in place), but can not get anything but a psychedelic blurry image. The only time I can get a clear image is if I unscrew the lens entirely and hold it a few mm away from the camera mounting.

I guess I’m doing something fundamentally wrong here (it was 01h00 today that I got that far, so struggling to think straight).

I’m about to have another go (now I’ve slept a bit), this time directly attached to the Pi since using VNC it locked up every minute or so. I was in direct wotsit mode and using ‘raspistill-t 0’ to get the initial camera basics setup.

Kindest regards,

Jonovich

User avatar
PeterO
Posts: 5701
Joined: Sun Jul 22, 2012 4:14 pm

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Sun May 03, 2020 9:41 am

I had the same experience !

Focusing is achieved by rotating the front parts (1 and 2) relative to the rear part (3)
CamerFocus.png
CamerFocus.png (194.12 KiB) Viewed 1537 times
Initially it will be screewed all the way in, it takes 4 to 5 whole turns to get a room shot in focus.
The silver ring between parts 2 and 3 will appear as you unscrew them.
HTH
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Jonovich
Posts: 18
Joined: Tue May 05, 2015 11:31 am
Location: Sunny Rutland
Contact: Website

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Sun May 03, 2020 10:41 am

I can see clearly now, the ra... erm... fog has gone!

Fantastic - thanks for the quick response and spot on concise details PeterO! I'm in focus now and as happy as can be for someone locked down with new toys to play with!

Kind regards,

Jon.

User avatar
PeterO
Posts: 5701
Joined: Sun Jul 22, 2012 4:14 pm

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Sun May 03, 2020 11:02 am

8-)
I've been mostly using mine as a "web-cam" for zoom running on my Linux PC

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Jonovich
Posts: 18
Joined: Tue May 05, 2015 11:31 am
Location: Sunny Rutland
Contact: Website

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Sun May 03, 2020 11:35 am

Cool, I have a few MotionEyeOS devices around the place and so bought this to see what it offers over those.

Zoom on a Linux PC, is that a Raspberry or something else? If it's something else, how do you connect the PiCamera to it? Curious...

Kind regards,

Jon.

User avatar
PeterO
Posts: 5701
Joined: Sun Jul 22, 2012 4:14 pm

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Sun May 03, 2020 12:30 pm

Jonovich wrote:
Sun May 03, 2020 11:35 am
Cool, I have a few MotionEyeOS devices around the place and so bought this to see what it offers over those.

Zoom on a Linux PC, is that a Raspberry or something else? If it's something else, how do you connect the PiCamera to it? Curious...

Kind regards,

Jon.
See
viewtopic.php?f=43&t=272717
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Jonovich
Posts: 18
Joined: Tue May 05, 2015 11:31 am
Location: Sunny Rutland
Contact: Website

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Sun May 03, 2020 12:37 pm

Thanks again PeterO :D

Kind regards,

Jon.

CharlyDelta
Posts: 156
Joined: Thu Jul 18, 2013 4:04 am
Location: Montreal

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Tue May 05, 2020 6:14 pm

I was going to ask the same question because I just got the new camera and the 6mm lens and I've been trying to focus for a good hour now. I thought...it can't be...what can be wrong with these lenses !!!
I found the answer here. Why what's so simple is actually quite complicated when it's explained on the new camera's web page !!!
Thanks Peter !

User avatar
PeterO
Posts: 5701
Joined: Sun Jul 22, 2012 4:14 pm

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Tue May 05, 2020 6:16 pm

You are not the first one to say the provided instructions are "lacking in clarity!" :roll:
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
DougieLawson
Posts: 38447
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Tue May 05, 2020 6:55 pm

PeterO wrote:
Tue May 05, 2020 6:16 pm
You are not the first one to say the provided instructions are "lacking in clarity!" :roll:
PeterO
Does that include the instructions at: https://magpi.raspberrypi.org/books/camera-guide/pdf
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

I'll do your homework for you for a suitable fee.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
PeterO
Posts: 5701
Joined: Sun Jul 22, 2012 4:14 pm

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Tue May 05, 2020 7:05 pm

DougieLawson wrote:
Tue May 05, 2020 6:55 pm
PeterO wrote:
Tue May 05, 2020 6:16 pm
You are not the first one to say the provided instructions are "lacking in clarity!" :roll:
PeterO
Does that include the instructions at: https://magpi.raspberrypi.org/books/camera-guide/pdf
Yes, because they are wrong ! I don't think that who ever wrote them had actually tried to focus that lens.

"Turn the camera and the inner ring anti-clockwise relative to the two outer rings to focus on a nearby object." is nonesense. You don't turn the camera to do focusing, you turn the lens :roll: You actually do focusing with the knob labelled "Open/Close". The knob labelled "Near/Far" doesn't ever move (unless doing back plane focus adjustments).

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Aardappeltaart
Posts: 90
Joined: Wed Mar 02, 2016 11:32 am

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Wed May 06, 2020 2:46 pm

DougieLawson wrote:
Tue May 05, 2020 6:55 pm
PeterO wrote:
Tue May 05, 2020 6:16 pm
You are not the first one to say the provided instructions are "lacking in clarity!" :roll:
PeterO
Does that include the instructions at: https://magpi.raspberrypi.org/books/camera-guide/pdf
Yes, I agree with Peter here. It's plain silly.

Code: Select all

04 Focus
To adjust focus, hold the camera 
with the lens facing away from you. Hold the 
outer two rings of the lens; this is easier if the 
aperture is locked as described above. Turn 
the camera and the inner ring anti-clockwise 
relative to the two outer rings to focus on a 
nearby object. Turn them clockwise to focus 
on a distant object. You may find you need to 
adjust the aperture again after this.
So you should rotate the camera (including tripod, RPI, ribbon cable, psu) to focus. :D :o :roll:
You need 8 hands for that.

And it would have been nice if they included a Zero cable, (and IMHO a longer default ribbon cable. It's a bit short for my table tripod)

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 25914
Joined: Sat Jul 30, 2011 7:41 pm

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Wed May 06, 2020 4:32 pm

We are looking in to the instructions on this, in case it needs some rewriting.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“My wife said to me `...you’re not even listening`.
I thought, that’s an odd way to start a conversation.."

jnd
Posts: 16
Joined: Thu Aug 02, 2012 12:32 am

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Wed May 06, 2020 5:25 pm

PeterO wrote:
Sun May 03, 2020 9:41 am
Initially it will be screewed all the way in, it takes 4 to 5 whole turns to get a room shot in focus.
The silver ring between parts 2 and 3 will appear as you unscrew them.
HTH
PeterO
If you are focusing so far that the silver ring is visible then I think you got too far. You shouldn't be exposing internals of the lens. The offical step of having fully screwed in back focusing ring is ok at first but it shouldn't stay there after you mount the lens and set for infinity.

The more I look at the official mechanical drawing the more it looks strange and suspicious. The bare camera itself is CS-mount, with extension tube for C-mount lenses. CS-mount has a flange focal distance of 12.526 millimetres, C-mount has 5 more at 17.526 mm. Now if you look at the drawing you see that the basic CS-mount should 11.4 mm away from the board when screwed in completely. One millimeter missing here and another will be from the fact that the sensor isn't sitting at PCB surface but has some height of its own, now sure how much exactly, so let's assume around one mm extra here. That means for comfortable infinity focus the back focusing ring should be screwed out by these two millimeters. In reality that's what I get after checking with the 16mm lens:
IMAG5745.jpg
6mm with adjusted back focus for 16mm at infinity, alone it could go more far.
IMAG5745.jpg (125.02 KiB) Viewed 1124 times
IMAG5746.jpg
16mm lens with adjusted back focus for infinity at lens mechanical stop
IMAG5746.jpg (137.27 KiB) Viewed 1124 times
Now the CS to C mount extension ring is also not 5mm like it should be but 5.8mm based on the drawing. I can understand it's slightly longer because having both identical and long threads close together would make weak part but it's another strange puzzle piece in the whole system.
When I adjust focus on 16mm lens to mechanical stop at infinity there's still significant need to unscrew the back focus despite now having 11.4 + 5.8 = 17.2 mm flange distance, minus the sensor height (maybe it's 2mm high?).

So depends on how you will use the lens:
- If you have both and want to reach infinity at 16mm with mechanical stop then adjust back focus for it first.
- if you have only 6mm and want to have infinity at mechanical stop then screw lens focus to the end and adjust back focus according to that.

BTW for adjusting focus I use

Code: Select all

raspistill -t 0 -roi 0.4,0.4,0.2,0.2 -vf -hf
That's magnifying the center 20%. Sadly I don't think there is focus peaking function like big cameras have, that would really help with focusing. It wasn't needed with small sensor modules and wide fixed lenses but now with open mount it's important feature.

User avatar
PeterO
Posts: 5701
Joined: Sun Jul 22, 2012 4:14 pm

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Wed May 06, 2020 5:39 pm

This is confusing .....
If you are focusing so far that the silver ring is visible then I think you got too far. You shouldn't be exposing internals of the lens. The offical step of having fully screwed in back focusing ring is ok at first but it shouldn't stay there after you mount the lens and set for infinity.
I don't know what "set for infinity" means as it's photography jargon and I'm not a photographer, I just want to use the camera not take a degree in photography !

From the camera guide
02 Back ring and lock screw
The back focus adjustment ring should be
screwed in fully for the shortest possible back-
focal length.
So it would seem that it is you that has got it wrong with the back ring screwed out that far !
I'm assuming that " the shortest possible back focal length" is the desired situation ? But again it's photography jargon that I don't understand.

I tried setting mine up like your picture shows:
1) The whole lens wobbles about in the mount so much it is hard to get focus right,
2) You need top use the screwdriver to loosen off the lens to adjust the focus which surely can't be the right way ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
jbeale
Posts: 3618
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Wed May 06, 2020 6:17 pm

I assume the official CS-mount flange depth of 12.526 mm is assuming an optical index of n=1.0 all along the imaging path. If there is an IR-cut filter in the way with some non-zero thickness and n>1, the physical distance would have to be reduced by some amount (although probably small) to make the optical distance the same. I have noticed that the distance markings on my lenses didn't match the real distance, I guess I need to extend the adjustable backfocus ring more. I don't think there should be any mystery about a C-CS mount adaptor, AFAIK this is a standard item and they are all supposed to be exactly 5 mm thick.

jnd
Posts: 16
Joined: Thu Aug 02, 2012 12:32 am

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Wed May 06, 2020 6:21 pm

PeterO wrote:
Wed May 06, 2020 5:39 pm
This is confusing .....
If you are focusing so far that the silver ring is visible then I think you got too far. You shouldn't be exposing internals of the lens. The offical step of having fully screwed in back focusing ring is ok at first but it shouldn't stay there after you mount the lens and set for infinity.
I tried setting mine up like your picture shows:
1) The whole lens wobbles about in the mount so much it is hard to get focus right,
2) You need top use the screwdriver to loosen of the lens to adjust the focus which surely can't be the right way ?

PeterO
The lens is fully screwed in the mount so it shouldn't wobble at all. What I moved is the thin ring of back focus adjustment build in to the camera mount. The 6 mm lens from the picture still have more than 360 degree rotation available to travel past infinity as I set it up for 16mm lens and the C-mount adapter isn't 5mm. In theory lens itself should stop at infinity and not focus any further. If it does then I would rather unscrew the solid and fixable back focusing ring than the small inner lens focusing thread.

I don't know where the CS-mount lens should be infinity, if at the mechanical stop or somewhere between, so I don't know the proper way to have the camera mount adjusted to infinity. In my picture I set it according to the 16mm lens for easy changing. All I know is that the distance when fully screwed in is too short leading to your unscrewing of the lens itself. Sure it's usable but not ideal.

jnd
Posts: 16
Joined: Thu Aug 02, 2012 12:32 am

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Wed May 06, 2020 6:28 pm

jbeale wrote:
Wed May 06, 2020 6:17 pm
I assume the official CS-mount flange depth of 12.526 mm is assuming an optical index of n=1.0 all along the imaging path. If there is an IR-cut filter in the way with some non-zero thickness and n>1, the physical distance would have to be reduced by some amount (although probably small) to make the optical distance the same. I have noticed that the distance markings on my lenses didn't match the real distance, I guess I need to extend the adjustable backfocus ring more. I don't think there should be any mystery about a C-CS mount adaptor, AFAIK this is a standard item and they are all supposed to be exactly 5 mm thick.
Good point. The filter should make really small difference and it's usually included in the path anyway. Regular cameras have filters on sensor which doesn't affect the mount distance, it only affects correct infinity settings for lenses which should stay the same for one system.

I just checked the official C adaptor, it's 5.8mm just as the drawing says.

User avatar
PeterO
Posts: 5701
Joined: Sun Jul 22, 2012 4:14 pm

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Wed May 06, 2020 6:36 pm

jnd wrote:
Wed May 06, 2020 6:21 pm
The lens is fully screwed in the mount so it shouldn't wobble at all.
Eh ? What have you unscrewed then ?
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
PeterO
Posts: 5701
Joined: Sun Jul 22, 2012 4:14 pm

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Wed May 06, 2020 6:42 pm

jamesh wrote:
Wed May 06, 2020 4:32 pm
We are looking in to the instructions on this, in case it needs some rewriting.
See viewtopic.php?f=43&t=272658&start=50#p1656092

Other confusion about how this is supposed to be set up !

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
Prutsky
Posts: 5
Joined: Thu Jul 09, 2015 1:18 pm

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Wed May 06, 2020 8:44 pm

Is it correct that when I screw the back focus adjustment ring in fully for the shortest possible back- focal length and I try to focus, I unscrew the lens from the mount?
Isn't it better to let the lens be screwed int fully and adjust the focus by turning the back focus adjustment ring?

User avatar
PeterO
Posts: 5701
Joined: Sun Jul 22, 2012 4:14 pm

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Wed May 06, 2020 9:54 pm

It seems both methods work, one is certainly more fiddly than then other as it requires the use of the tiny screw driver, and a mix of the two might be best.

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

rudelicious
Posts: 2
Joined: Thu May 07, 2020 5:37 am

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Thu May 07, 2020 5:50 am

Hi,

So about that back focus adjustment ring... I can't seem to be able to turn it - CW or CCW... Should I apply more force when turning the ring?! I don't want to end up breaking the thing...

Thanks,

Rudi

User avatar
PeterO
Posts: 5701
Joined: Sun Jul 22, 2012 4:14 pm

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Thu May 07, 2020 6:07 am

rudelicious wrote:
Thu May 07, 2020 5:50 am
Hi,
So about that back focus adjustment ring... I can't seem to be able to turn it - CW or CCW... Should I apply more force when turning the ring?! I don't want to end up breaking the thing...
Thanks,
Rudi
Have you loosened off the locking screw in the clamp ?
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

rudelicious
Posts: 2
Joined: Thu May 07, 2020 5:37 am

Re: Any advice for focusing HQ camera and 6mm CCTV lens please?

Thu May 07, 2020 6:30 am

Affirmative. Have actually completely removed it - to no avail...

(I have contacted the shop I where I bought the camera but as of yet no reply. Curious to hear what they have to say... Thought I'd also check to see if others are having this issue... Apparently not?)

Update:
Applying just a bit more force did the trick... (as suggested by 'the shop's support desk').
Feeling a bit silly now... O well.
Anyway.
(Thanks for trying to help, PeterO).

Return to “Camera board”