poing
Posts: 1131
Joined: Thu Mar 08, 2012 3:32 pm

Re: M12 lens adapter for camera module

Sun Jun 23, 2013 1:08 pm

mmiller wrote: Image
http://wiki.raspberrytorte.com/images/t ... mmF1.2.jpg
There are clear area of the image that are out of focus, some of which shouldn't be, I'll work iwhats wrong later.
I think you have an extreme dose of Scheimpflug going on, which means that the lens is not mounted perpendicular to the sensor.
Image

See http://en.wikipedia.org/wiki/Scheimpflug_principle

User avatar
mmiller
Posts: 22
Joined: Wed Nov 16, 2011 8:38 pm
Contact: Website

Re: M12 lens adapter for camera module

Sun Jun 23, 2013 5:58 pm

After modifcation of the lens module I only lightly placed the sensor on camera board, so this is probably the problem.
Its not a major issue ATM, currently I'm failing to get the OCR working to recognise numberplates. (see attached example). but that a topic for elsewhere.

Great diagram btw.
Attachments
04-20130623173123-00bwsmall.jpg
B&W 'test' image
04-20130623173123-00bwsmall.jpg (23.82 KiB) Viewed 15357 times
  • Slowly spreading the joy the RaspberryPi way!
    http://raspberrytorte.com/ http://wiki.raspberrytorte.com https://github.com/raspberrytorte

User avatar
RichShumaker
Posts: 168
Joined: Tue Jul 31, 2012 4:16 pm
Location: Sunny Southern CA near downtown LA
Contact: Website Facebook Google+ Twitter YouTube

Re: M12 lens adapter for camera module

Fri Jul 19, 2013 5:57 pm

First I love the M12 mount you have for sale.
My main issue is I don't want to strip the stuff off to attach it as I would butter finger my way to slag.
Also for me the cost is a bit high as I need multiple cameras, with mount lens and casing I could go another route with similar results and cost. Oh and if the foundation reads this I am learning every day. I hope to start teaching kids once I get more comfortable myself.

I really like the M12 idea as it opens up the Pi to affordable swappable lenses.
I see some talk about the proto case having the M12 mount possibly in the future.
http://www.raspberrypi.org/phpBB3/viewt ... 12#p379626
I would love that but I already own several cases and would like to find another solution especially since that discussion sounded like 'it could be done' not 'it is done'.

I don't want to hack the camera more than I have too as I want to reduce possible breaks see buttery finger slag comment above.
So in this RasPi update you can remove the lens to make the camera a macro camera.
http://www.raspberrypi.org/archives/4279
Can an M12 mount be added on top of the existing hardware sans lens without further stripping the camera down?
I have followed the links and you can get an inexpensive M12 mount but they probably wont fit as there would be no screw holes like the PS3 camera also the flex attachment near the camera will be in the way requiring a hack around.

Anyone done any research on M12 mounts off the shelf that might work the way I am describing before I start spending cash to get R & D stuff?

Ideally you pull the lens out, attach M12 mount with some type of plate to use existing mount holes, oh and add that camera case from this post as well to allow easy mounting with pan tilt option,
http://www.ebay.com/itm/150916166068

I have a direction to go but wanted to see if any others have already gone there.
Thanks to everyone for all the help.
Rich Shumaker
Rich Shumaker
http://www.instructables.com/id/Pi-Zero-W-NoIR-8MP-Camera-Build-Overview-Introduct/

User avatar
RichShumaker
Posts: 168
Joined: Tue Jul 31, 2012 4:16 pm
Location: Sunny Southern CA near downtown LA
Contact: Website Facebook Google+ Twitter YouTube

Re: M12 lens adapter for camera module

Fri Jul 19, 2013 6:51 pm

Here is a case for the PS3 which is reasonably priced with different mounting methods.
http://peauproductions.com/store/index. ... cts_id=569

It would be cool to have something similar for the RasPiCam with different lens mount options.
Rich Shumaker
http://www.instructables.com/id/Pi-Zero-W-NoIR-8MP-Camera-Build-Overview-Introduct/

User avatar
RichShumaker
Posts: 168
Joined: Tue Jul 31, 2012 4:16 pm
Location: Sunny Southern CA near downtown LA
Contact: Website Facebook Google+ Twitter YouTube

Re: M12 lens adapter for camera module

Fri Jul 19, 2013 8:09 pm

So I am answering myself as my experiment didn't work.
I am fairly certain I will need to remove everything down to the sensor leaving IR filer(my choice you could remove it).
http://www.m12lenses.com/ has both CS and M12 stuff with 20mm mount holes for both which if my ruler is correct is the hole spacing on the RasPi but I wonder if the flex cable on the front of the board will interfere.
So if anyone has tested any mounts that might be listed at m12lenses let me know.

I won't be able to do anymore experimenting for a few weeks :( so hopefully when I can do more there are others that have gotten the next batch of cameras and are testing different setups as well.

Rich Shumaker
Rich Shumaker
http://www.instructables.com/id/Pi-Zero-W-NoIR-8MP-Camera-Build-Overview-Introduct/

User avatar
rkinch
Posts: 72
Joined: Sun Jun 02, 2013 7:19 am
Location: Palm Beach County, Florida USA
Contact: Website

Re: M12 lens adapter for camera module

Sat Jul 20, 2013 2:32 pm

RichShumaker wrote:So if anyone has tested any mounts that might be listed at m12lenses let me know.
I have looked at all of them I can find anywhere, and sadly none are a direct fit. The camera provides 21mm hole spacing (why?) while the closest stock mounts are 20mm and 22mm. Even if you found a 21mm mount, it would still require cutting out one side to clear the flex cable. I even bought a sample of the big enclosure you cite (http://www.ebay.com/itm/150916166068), which on receipt I was dismayed to find will not fit the camera board itself, although it is otherwise a nice item.

My M12 adapter fits perfectly and requires no modifications other than removing the stock lens. The only problem is the high cost (http://www.truetex.com/order-rp12.htm) for me to machine them in my own facility.

I will have to get a quote from my favorite offshore machine shop to see if they can't make them cheap. The question then becomes if I can sell 100 or 1000 to make supplying such a hackery component worthwhile in itself. My own initial enthusiasm to hack this camera for instrumentation applications is frozen until shutter control and flash sync become available.

User avatar
RichShumaker
Posts: 168
Joined: Tue Jul 31, 2012 4:16 pm
Location: Sunny Southern CA near downtown LA
Contact: Website Facebook Google+ Twitter YouTube

Re: M12 lens adapter for camera module

Sat Jul 20, 2013 6:21 pm

Perfect and thanks as that saves me testing time and money.
So this 1mm hole difference makes it a world of difference, if it was 20 mm spacing I am sure we could notch one of the mounts for the ribbon cable.
I understand your project being on hold.
If you start a Kickstarter or other crowd sourcing let me know as I am interested.
I am wondering if some type of stand off could be made to make up the .5mm difference on each side, probably not.
I also found it funny that if you put a CS mount on the Pi you could add an SY125 lens for the low low price of $450, hehehe. The SY125 looks like an amazing lens though.

My other question is and I doubt it is possible, Can new holes be drilled in the board? To center the lens you would need to have equal hole spacing from the center so 2 holes instead of one, drats again as I doubt it would work.

Any chance we could glue a mount instead of screwing it down?
Or maybe retap the mounting hole on the mount to the proper spacing? Again you need to fix both sides to keep the center alignment.

Thanks for all the information and help on this.
Rich Shumaker
Rich Shumaker
http://www.instructables.com/id/Pi-Zero-W-NoIR-8MP-Camera-Build-Overview-Introduct/

electronicman
Posts: 30
Joined: Mon Dec 10, 2012 9:31 pm
Location: USA

Re: M12 lens adapter for camera module

Sun Aug 11, 2013 10:24 pm

I have just been playing with my first Camera module and was so impressed a got another. Not that I need another, but just in case I screwed up while removing the existing lens. The existing lens was a bit difficult to remove , and I had to resort to using a pair of small pliers and some tweezers to hold both the lens and the camera module, but after half a turn the lens was then easily unscrewed using my thumb and a pencil eraser.

I bought a couple of different M12 adapters (http://www.m12lenses.com/) with a 22mm hole spacing and was able to enlarge the 21mm holes on the PI module using a needle file. Care was needed as one of the copper traces to the chip was very close to the hole, but it worked and the M12 lens works great.

The next trick is to find a way to support the module/lens arrangement together with the PI in order to use it on a tripod or something.
David

vacuumMarshmallow
Posts: 48
Joined: Sun Jul 07, 2013 3:03 pm

Re: M12 lens adapter for camera module

Sun Aug 25, 2013 3:47 pm

Hey Guys,

Very good information on this thread.

Is there an adapter, for the rPi Camera Board, where I can put the lenses in?

I don't know if to use the M12 lenses, or the CS type ones.
I have a couple of CS lenses lying around (from security cameras), yet I have no problem buying the M12 ones.

What do you suggest?
I have the rPi Camera Board: is there a mounting solution I can buy readily right now?

Thank you!

vacuumMarshmallow
Posts: 48
Joined: Sun Jul 07, 2013 3:03 pm

Re: M12 lens adapter for camera module

Sun Aug 25, 2013 11:19 pm

electronicman wrote:I bought a couple of different M12 adapters (http://www.m12lenses.com/) with a 22mm hole spacing and was able to enlarge the 21mm holes on the PI module using a needle file.
Hello,
Could you provide a link to the M12 adapter you used from that website?
I'd like to order it in order to make some tests.
Thanks!

GMawston
Posts: 19
Joined: Mon Jul 02, 2012 7:11 pm

Re: M12 lens adapter for camera module

Tue Jan 07, 2014 11:09 pm

I have managed to get hold of some lens mounts that fit nicely because they are the 21mm spacing.

http://iboughtthisonline.blogspot.co.uk/

The video showing it is here

http://www.youtube.com/watch?v=jcoIAhQU5Og

Does the trick for me for my nightvision project. :)

Ydo
Posts: 11
Joined: Sun Apr 06, 2014 12:57 pm
Location: Netherlands

Re: M12 lens adapter for camera module

Sun Apr 06, 2014 1:44 pm

I few weeks ago I had the same idee to fit the Raspberry camera with a C-mount socket combined with a 6mm Cosmicar television lens. So I unscrewd the original lens and made a c-mount adapter with aid of a small lathe and milling machine.
The photographic results were disappointing. Lack of contrast and false coulors or flare. The middle of the picture was darker then the edges. This was caused by reflections of projeted light on the threaded inside of the lenseholder in the sensor housing. The only way to get rid of it was to mill down the sensor housing to just above the IR filter about 2 mm above the pcb surface.

To get a strong hold in the milling machine first I removed the sensor with flatcable and micro DIL connector from the pcb and cleaned sensor an pcb from the sticky glue. Then I fixed the sensor again with 2-components epoxy glue. The glue must be at the four sides of the sensor up to 1 mm above te pcb surface to get a strong bond between pcb and sensor. Before glueing I put the flat cable DIL connector in its socket.

Not everyone has a milling machine. I managed to untop an other (broken) and re-glued camera sensor house with a fine teethed jig-saw 2.5 mm above the pcb and did some sand papering.

All surfaces inside the adapter must be matt black painted.

Best regards, Ydo
Attachments
P1010008A_bewerkt-1.jpg
P1010008A_bewerkt-1.jpg (48.34 KiB) Viewed 13387 times
Last edited by Ydo on Sun Apr 06, 2014 3:36 pm, edited 1 time in total.

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

Re: M12 lens adapter for camera module

Sun Apr 06, 2014 6:59 pm

Ydo wrote:I managed to untop an other (broken) and re-glued camera sensor house with a fine teethed jig-saw 2.5 mm above the pcb and did some sand papering.
Impressive. Jigsaw and sandpaper work is not something I usually attempt a few mm away from an optical surface! Were you able to clean all the dust off afterwards? How was the final image?

vacuumMarshmallow
Posts: 48
Joined: Sun Jul 07, 2013 3:03 pm

Re: M12 lens adapter for camera module

Sun Apr 06, 2014 7:05 pm

jbeale wrote:Impressive. Jigsaw and sandpaper work is not something I usually attempt a few mm away from an optical surface! Were you able to clean all the dust off afterwards? How was the final image?
Yes, very impressive!
What you asked is my question too.
Wondering how he did that.

On another note, maybe this will help you guys:
I bought this: http://www.ebay.com/itm/281212355128?ss ... 1497.l2649
It is a Raspberry Pi camera board, yet it has the CS lens mount made out of metal.
I was able to mount my CS lens perfectly.
I did had to Dremel a bit the base so it cleared the sensor's ribbon cable.
And also had to Dremel the screw-holes a little bit on the board itself, as they didn't align perfectly with the metal base.
Yet, all in all, worked like a charm.

I sent a message to the eBay seller, telling him to sell the raspberry pi camera board CS-lens mount base alone... without his camera.
No reply as of yet.

Ydo
Posts: 11
Joined: Sun Apr 06, 2014 12:57 pm
Location: Netherlands

Re: M12 lens adapter for camera module

Wed Apr 09, 2014 12:01 pm

Indead sawing and sandpapering is not a good idee. It was not easy to clean the IR filter of dust.
However the dark central field and light border is caused by somthing else than reflections..

See also "Cyan vignetting after rpi-update" in this forum.
I made 3 pictures of a white test board:
A - the original lens
B - a Cosinar 6mm
C - no lens at all

The original lens produces an even distribution of light, with the Cosinar lens and without lens the inner part is considerable darker (negative vignetting). I think the manufacturer compensates in the firmware for lens transmission characteristics. Anybody with the same problem with other lenses?
Remark: A is not the same Rasberry camera as B and C to keep one camera in the original state.
original_15.JPG
A
original_15.JPG (34.01 KiB) Viewed 13262 times
cosinar_15.JPG
B
cosinar_15.JPG (32.35 KiB) Viewed 13262 times
no_lens_15.JPG
C
no_lens_15.JPG (28.91 KiB) Viewed 13262 times
Last edited by Ydo on Wed Apr 09, 2014 12:22 pm, edited 1 time in total.

Ydo
Posts: 11
Joined: Sun Apr 06, 2014 12:57 pm
Location: Netherlands

Re: M12 lens adapter for camera module

Wed Apr 09, 2014 12:19 pm

I just discovered that the last picture posted by mmiller has the same dark centre.

towolf
Posts: 421
Joined: Fri Jan 18, 2013 2:11 pm

Re: M12 lens adapter for camera module

Thu Apr 10, 2014 9:53 pm

Ydo wrote:I just discovered that the last picture posted by mmiller has the same dark centre.
This problem with replacing the lens has been identified and discussed at length already last year.

Ydo
Posts: 11
Joined: Sun Apr 06, 2014 12:57 pm
Location: Netherlands

Re: M12 lens adapter for camera module

Fri Apr 11, 2014 2:36 pm

towolf,
I am new in the forum. Can you give me a hint where to find the start of the dark center spot discussion.
Thanks, ydo

Ydo
Posts: 11
Joined: Sun Apr 06, 2014 12:57 pm
Location: Netherlands

Re: M12 lens adapter for camera module

Sun Apr 13, 2014 11:08 am

The problem of the shaded centre is now actual and hopefully solved in the thread :
"Cyan vignetting after rpi-update"

User avatar
RichShumaker
Posts: 168
Joined: Tue Jul 31, 2012 4:16 pm
Location: Sunny Southern CA near downtown LA
Contact: Website Facebook Google+ Twitter YouTube

Re: M12 lens adapter for camera module

Thu May 15, 2014 2:21 am

Just found and ordered this, http://www.arducam.com
M12 or CS mounts and the distributor sell lenses too.

Anyone tried this yet?
Rich Shumaker
Rich Shumaker
http://www.instructables.com/id/Pi-Zero-W-NoIR-8MP-Camera-Build-Overview-Introduct/

User avatar
RichShumaker
Posts: 168
Joined: Tue Jul 31, 2012 4:16 pm
Location: Sunny Southern CA near downtown LA
Contact: Website Facebook Google+ Twitter YouTube

Re: M12 lens adapter for camera module

Thu May 15, 2014 2:36 am

Found and I am reading the other threads about this camera module from January, sounds like alignment issues with the mounts and camera flaws in the implementation of the sensor, searched arducam for the threads.

I will update this thread with my results when the camera arrives.

Rich Shumaker
Rich Shumaker
http://www.instructables.com/id/Pi-Zero-W-NoIR-8MP-Camera-Build-Overview-Introduct/

prgiorgio
Posts: 2
Joined: Wed Feb 04, 2015 4:40 pm

Re: M12 lens adapter for camera module

Wed Feb 04, 2015 4:49 pm

Hi everybody.

I need a camera like the raspberry "Raspberry Pi Camera Board"
but with configurable focus distance. I need 11 cm ideal focus, while
the standard camera in the chamera board is much different,
so the problem is to buy lenses or have a camera built with 11 cm focus distance.

I see many of you have resolved the problem.
Could you suggest the extension to buy to adapt the camera board to the 11 cm focus?

Or instead (and maybe bettere) a usb camera with that focus that is compatible with the rasbperry pi?

Thank you in advance.
Giorgio

vacuumMarshmallow
Posts: 48
Joined: Sun Jul 07, 2013 3:03 pm

Re: M12 lens adapter for camera module

Wed Feb 04, 2015 8:03 pm

prgiorgio wrote:Hi everybody.

I need a camera like the raspberry "Raspberry Pi Camera Board"
but with configurable focus distance. I need 11 cm ideal focus, while
the standard camera in the chamera board is much different,
so the problem is to buy lenses or have a camera built with 11 cm focus distance.

I see many of you have resolved the problem.
Could you suggest the extension to buy to adapt the camera board to the 11 cm focus?

Or instead (and maybe bettere) a usb camera with that focus that is compatible with the rasbperry pi?

Thank you in advance.
Giorgio

I hope I can save you time, money, and headaches (and some tears).
I had a LOT of those figuring the following setup out.

1st, the rPi's camera board is fantastic.
Get an extended "CSI" flex cable from adafruit or somewhere... the stock cable is very short.
A longer one (12" or more) will give you more flexibility, and they are cheap.

2nd, buy this adapter from eBay: Vello Nikon F Mount Lens to C Mount Camera Adapter
3rd, buy a Nikon lens from eBay. (Nikon's lenses' brand is "Nikkor"... same company, different name)
4th, buy the adapter the gentleman in this page mentions:
http://www.truetex.com/raspberrypi
He manufactures them and sells them.
The problem is price (150$ish) and time (about 3 weeks for delivery).

Here is the setup:
#1- take the Nikon lens, and open up the iris manually... it has a little mechanical level on the backside.
Hold the iris open with a small glob of hot glue.
#2- Put your Nikon lens into the Vello adapter from eBay
#3- take the Nikon+Vello combo, and screw it into the metal adapter from truetex.
#4- remove the rPi camera board's little plastic lens
#5- use the two screws (included with the truetex adapter) to fix the entire combo (Nikon+Vello+truetex) onto the rPi camera board

The image quality is excellent... perfect.
You can buy polarizers for the Nikon lens.
You buy big Nikon lenses, or small ones... wide angle, or whatever angle.

You mentioned 11 cm focus.... I have no idea what that is.

One thing:
I have bought various Nikon lenses.
They all work awesome... yet the focus distance is kind of off.

For example, a Nikon 18-35 lens, I am unable to get a "sharp" image when set at 18mm-ish.
I have to turn the rings until I am in the 20-24mm range (this measurement is by eye).
Once in that range (and higher), you can then move the "focus" the image to make it "sharp".

As to Nikon vs Canon lenses,... only one reason.
The Nikon lens, to open the iris, you can do it manually as I mentioned above.
The Canon lenses, it is electronic.

I hope this helps you.
I threw thousands of dollars into this problem... with many, many hours invested in figuring the above setup out.

gordon77
Posts: 4297
Joined: Sun Aug 05, 2012 3:12 pm

Re: M12 lens adapter for camera module

Wed Feb 04, 2015 8:36 pm

prgiorgio wrote:Hi everybody.

I need a camera like the raspberry "Raspberry Pi Camera Board"
but with configurable focus distance. I need 11 cm ideal focus, while
the standard camera in the chamera board is much different,
so the problem is to buy lenses or have a camera built with 11 cm focus distance.

I see many of you have resolved the problem.
Could you suggest the extension to buy to adapt the camera board to the 11 cm focus?

Or instead (and maybe bettere) a usb camera with that focus that is compatible with the rasbperry pi?

Thank you in advance.
Giorgio
Can you just try and adjust the focus on the pi camera lens to set 11cm ?

http://www.raspi.today/how-to-focus-the ... mera-lens/

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

Re: M12 lens adapter for camera module

Wed Feb 04, 2015 10:47 pm

The video gordon77 linked shows the same two pairs of pliers technique I have used on several R-Pi camera lenses, and it works. 11 cm focal distance can be achieved, in fact you can go even closer: http://elinux.org/Rpi_Camera_Module#Adj ... Lens_Focus

Be aware you have not changed the angle of view when you change the focus, and this was not designed as a macro lens, so the corners of your frame may get a little blurry.

If you're scared about damaging the camera you can also use standard reading glasses or similar in front of the camera as a close-up addon lens, although 11 cm focal distance would call for about +9 diopter which is pretty strong, more of a magnifying loupe.

You can even stack the lens from a second Pi camera back-to-front on the first Pi camera, and get a microscope (that's a strand of hair across the top)
Image
Image

Return to “Camera board”