I went a bit off the deep end after building my first OFM, trying to see how I could modify the optics a bit. I wanted to answer these questions:
- Does an achromatic doublet make a good tube lens? If not, is there an affordable tube lens that works well?
- How do images from the RPi HQ camera compare to the camera module v2 (assuming the same objective and optics)?
- The condenser lenses used in OFM are cheap but can be a pain to source. Can we build a nice condenser with a good NA that’s not too expensive?
Anyway, this effort took me pretty far afield of the OFM, but maybe some of it will be useful information.
The setup: I wanted a basic upright brightfield microscope that would use infinite-conjugate objectives to evaluate different tube lenses, sensors, and illumination conditions. I ended up building a simple setup that slides along a vertical “2020” aluminum extrusion. Alignment and vibration are problems with this “minimal viable microscope” consisting of illuminator, condenser, stage, objective, tube lens, and sensor, but it works and makes some nice images when I can get everything lined up and not shaking. I didn’t use OpenSCAD for modeling this but I can share models as STL or STEP if any are interesting.
Two achromatic doublets (50 mm FL and 19 mm FL) to create a condenser with an approximate NA of .57 - This is hugely overkill for the objective I’m using but I plan to reuse this later since it appears to work well. In the future I think an Abbe style condenser would be a better and cheaper choice but it’s not easy to find large ball lenses like they tend to use. Anyway, using achromats here seems like overkill and I could definitely have gotten away with singlet lenses. There’s also a bayonet mount on the bottom of the condenser that I can mount aperture stops to. I haven’t tested that yet so all these images are with the condenser “wide open”
Just a (reasonably) flat surface that goes up and down. I’m using a bolt and captive nut to raise and lower it, and I built a simple double-paralellogram flexure to hold it in place. I also put some captive nuts in the stage that hold screws to adjust a platform above the stage, if I need a really flat field. This only sort of worked and probably isn’t worth the trouble.
Objective: I tested a used Olympus 10X Plan achromat from Ebay. These have field numbers of 22 with their native tube lens focal length (180 mm) and are pretty easy to find used for cheap. I use similar objectives on commerical scopes and the quality is fine for a low-power objective. Most importantly, the field is quite flat across the whole field of view.
Tube lens configurations:
- One lens (2 elements) 75 mm achromatic doublet. This produces an image circle of 22*(75/180) = 9.1 mm which more than covers both camera sensors here.
- Two lenses (5 elements, 64 mm FL) Raynox DCR-150 macro-converter lens combined with the above 75mm achromatic doublet as a focal reducer: The Raynox lens is a relatively inexpensive 3 element lens (60-70 USD new) that is very popular as a tube lens with photographers who strap microscope objectives to their DSLRs. It has a focal length of 208mm so it’s pretty close to most “native” microscope tube lenses, but using it alone would produce a hilariously tiny field of view with the raspberry pi cameras. I placed the Raynox next to the objective and then spaced the doublet at a distance calculated to get a combined focal length of 64.5 mm. This produces an image circle of 7.88mm which covers both v2 and HQ camera sensors.
- Raspberry Pi HQ Camera Module (C/CS mount)
- Raspberry Pi Camera module v2.1: I created a small case for this camera that has a C-mount thread and sensor spacing, that way I could just swap it out for the HQ camera 1:1. I also glued the camera down to the camera board since it had a peice of flexible foam backing on it that was causing sensor tilt. I would not do it this way again, instead I would just redesign the case to compress the foam down the same way the OFM does.
- Target reticle
- NPM1 mutant AML blood smear
- Appendix with a pinworm
Because I was using the HQ camera, I didn’t use the OFM software and couldn’t leverage its automatic exposure, white balance, and flat fielding. I used RaspiCam, which worked quite well otherwise.
Raspberry Pi Camera v2 with two-lens tube lens (I manually flat-fielded these images with varying degrees of success)
Raspberry Pi HQ camera with two-lens tube lens (no postprocessing)
Raspberry Pi HQ camera with 75 mm achromatic doublet tube lens (no postprocessing)
The Thor labs achromatic doublets don’t seem to have flat fields and the lens I used produced a pretty noticable field curvature when used alone. I think this is actual field curvature and not a tilted slide based on focusing up and down and seeing a pronouced circumferential difference in focus. It’s probably not an aberration, per se, since I could focus the edges of the image nicely, just not the center and the edges at the same time. I guess this is expected as these lenses aren’t really meant for imaging. Interestingly, when combined with the Raynox (which is intended for photography) the issue was not really noticable. I think this is due to the distance between the achromatic doublet and the detector. Longer distance = more noticeable curvature.
- In the combined 208mm/75mm system where the doublet mostly works like a focal reducer, the back focal length from the achromatic doublet to the detector is relatively short (about 30 mm) and the field curvature is minor.
- the back focal length is more than double the distance (~70 mm) when the achromatic doublet is used by itself, and the field curvature is more perceptible.
- If this is true then I expect that in the standard OFM high resolution optics with finite conjugate objectives (I think BFL 45-50 mm?), the effect of the added field curvature might be somewhere in between these extremes. I also wonder if this issue Support for HQ Pi camera - #7 by Ryan is actually a field curvature problem, rather than coma aberration
The HQ cam is a very substantial increase in quality. The issue isn’t the detector size, resolution, or the mounting hardware (which is nice to have), but the CRA mismatch between the bayer filter/microlens array designed for webcam/cellphone lenses and the lenses used in microscopy really compromises the quality achievable from the standard camera. Some of this can be post-processed out, but the images I took today were saturated in one or more channels in part of the image, which makes correction not worth it.
As for the condenser, it looks good but with such a low-NA objective it’s hard to tell if it’s actually doing a good job. Once I get a higher NA objective to test it with, we’ll see how it performs.
The OFM software is really doing a tremendous job improving the camera’s output as I found it nearly impossible to work with the unprocessed output from the standard raspberry pi camera. That said, the photos from the HQ camera looked really good without post processing beyond a simple white balance.