Two lens or not two lens? That is the question

Hi all,

!! Please note this is a shameless cross post from expereiment.com I just want more input if possible!!

As I prototype the field dissection microscope I am facing some lens related questions, and more importantly lens related design decisions.

I have started off with things I had around the workshop from previous Openflexure prototyping:
image

In the first version I simply unscrewed the PiCamera2 lens until it almost fell out. Then took an image.

I think the magnification is about 0.25 between the woodlouse, and the image on the camera sensor. Now there are a few of problems here:

  1. Very hard to repeatable set the lens in the same position
  2. May need a bit more magnification in some systems
  3. Working distance is super short (~1cm or so), which is really annoying

One thought is to make a system with a second lens. For this I make a modified super short lens spacer for the picamera lens, and a separate holder for another lens, these can be held apart by a little frame
image

The plan was to make a system with two lenses. As the camera sensor is smaller than the bug, we need to demaginfy the bug somewhat, to make a virtual image, that we then image with the picamera lens:

The eventual plan was to get “pancratic magnification” or adjustable zoom, my eventually modifying the system so that the picamera lens can be moved a few mm. I decided to start with the picamera lens about 6mm from the sensor giving it about a magnification of 1

Starting with the 50mm tube lens from the OpenFlexure microscope I ended making a tube that spaced this lens about 75mm away from the pi lens. This gives a magnification of about 0.33, and a working distance of about 180mm. This working distance is huge, making the microscope super unwieldly (which we can’t have, we must be able to wield with ease!). I was able to see my woodlouse (well an new woodlouse, Woody the Second we shall call them). Though it was awkward enough I didn’t save a snapshot.

In desperation I also tried the 6mm focal length plastic lens from the OFM illumination. The lens to lens distance here needed to be really accurate, and without an adjusting mechanism I couldn’t really get a focus, but the lens is clearly awful so I didn’t proceed.

Where next?

Well this is the question!

First of all, I think the next stage for me should be to design a stand, tweak the mechanics some more, and write some docs. This way others can build something an have a play.

As for what is next for the optics, I would love some feedback. I am much more of an mechanics person than I am an optics person. So I am just assuming everything is a perfect thin lens. Which will only get me so far. I have some ideas, but there is a trade off on cost/openness/quality/availability. I am not sure which is most interesting for the community.

What do people think of these options:

  1. Find a plain lens with about 20mm focal length and try again. Both as a 1-lens and 2-lens system. My back of the envelope calculations tell me should give me a more sensible size and working distance.
  2. Get M12 lenses perhaps this kit. These are easier to adjust. However there is lots to think about here:
    1. The kit above seem to be six lens groups. If they are optimised for imaging long distance, will this make a rubbish microscope. How easy are these lenses to get, and can we get identical ones in a few years?
    2. I think single lenses are available in an M12 housing, but they are fairly expensive, and might perform even worse!?
    3. M12 mounts are available for lots of cameras. Allowing experimentation with PiCamera2, PiCameraHQ, and lots of other cameras
  3. Just get a cheap C-mount adjustable microscope lens and put in on a picamera HQ. The downside is the lens is now a black box, and this lens might be hard to buy in some locations. The up side is it should give me time to concentrate on nice mechanics.

All comments welcome!

Any thoughts @WilliamW @r.w.bowman @biodotpe

This does all depend on the quality of the lenses, as well as the configuration. Which is where I get a bit lost. The Pi camera lens is an excellent lens for its design use: object a long way away, image close to the focal distance. Unscrewing the lens so that it is further from the image plane and the object is closer moves you away from the design, but the image you get is still good as it is not so far from the design. In addition to the issue with the working distance, this is also not really that robust against future availability - many channels have stopped stocking Pi Camera v2.1 since Pi Camera Module 3 came out, even though Pi Camera V2.1 is not discontinued.

The second version is even further from the design spec of the Pi camera lens, although not so far that it makes sense to reverse the lens (as for the main microscope). The other apparent issue with the second version is the position and size of the entrance pupil of the Pi camera lens. The virtual bug image is not a real object reflecting light in all directions from each point, it is formed from light going through the first lens, so light forming the top of the image is mainly heading upwards and will not go into the Pi camera lens. I think I expect strong vignetting, but you did see something reasonable? I am not exactly clear on what you have written, but did you mean a magnification of 1:1 rather than 1mm? In that case why not just use the 50mm lens to image the bug directly sensor? Then you can only get changes in magnification by changes in working distance: leaving the camera-bug distance about fixed and moving the lens. This seems to be what is done in many hand-held USB-microscopes. As for the 50mm lens, a simple achromatic lens is not that great in imaging terms, but it is being used at a small aperture so will probably be fine. A shorter focal length to get an acceptable working distance should be OK, as long as the aperture remains small and there is enough light to cope with a small aperture.

@r.w.bowman will probably spot the misconceptions here.

option 3 in your final list is actually not so bad for reproducibility, and is similar to ‘get an M12 lens’. You cannot get exactly the same lens everywhere maybe and there will be variable quality. However if you specify the mount type and focal length then the basic optical performance is specified, in the same way that you could specify a microscope objective x40 infinity corrected.

Thanks William, this is really helpful

100% correct. It was pretty awful, very dark and vignetted. I was tempted to turn the lens around as it was equidistant from the virtual image and the sensor so there isn’t much need for something different. Everything was made worse because I have ran out of black filament, and the spacer didn’t completely obscure excess light. It was very much a “is this worth further work test.”

Ooops, yes

I was thinking that by moving the pi-lens I had less distance to move it. But yes, you are right that leaving the camera-bug distance fixed is more important.

I plan to get some neopixel or other LED rings so light should be pretty bright. I can always add an aperture.

This is true. I suppose the M12 lenses I have found are a bit better at giving me specs than the very cheap c-mount microscope lens. But then this can be worked out on post. I’ll have to talk to Andy about what he can get in panama.

This bit is wrong, oops. The overall camera-object distance has to change as well as the lens object distance. Both move over quite a large range for a useful range of magnification.

Did seem too good to be true. Yeah. I think it is likely that you need to do two adjustments to zoom.

1 Like