This project provides a way to use a Raspberry Pi camera to take microscope/macro pictures. The design may not be as elegant as some other public lab microscope kits (https://publiclab.org/notes/partsandcrafts/11-26-2017/building-a-raspberry-pi-microscope) but provides an alternate approach that may be useful for a given project.
Key aspects of the design:
--Lens mount convertor/adapter rings that permit a variety of lenses/microscope objectives to be used with the Raspberry Pi camera array. Modular lens approach is very useful since microscope objectives, close-up or wide field of view lenses can be easily swapped for different measurements.
--A .5 meter flex cable for the Raspberry Pi camera. The flex cable permits greater camera/computer separation distances than the 15cm cable that comes with the camera.
--Mount/stage system. A basic setup using labjacks and an LED light. Nothing fancy but easy to set up and is essential to hold lens and focus image. --Python image capture software. Software permits real time video adjustments followed by jpg image capture.
Major lens system parts list (with supplier/cost): --Lens Mount: M12 lens mount (male metric thread with 0.5 mm pitch) with mounting screws. Designed for Raspberry Pi camera v2.1 with 21mm hole spacing. Mounts lens holder to camera/array board. http://www.m12lenses.com/CNC-Machined-Raspberry-Pi-M12-Lens-Holder-Metal-p/pt-lh024rpm.htm/%20, $8.50. -- Adapter Ring: attaches onto the M12 lens mount and enables a C Lens to be mounted, https://www.amazon.com/Pixco-Mount-Lens-All-metal-Adapter/dp/B01E536ZZ6, $6.59. -- C mount to RMS adapter: This ring has both an inside and outside thread that enables most microscope objectives (RMS mount) to connect to the C mount holder. https://www.ebay.com/itm/RMS-to-C-mount-adapter-NEW-/140499913861 , $8.75. --Flex cable: 1 meter flex cable for the Raspberry Pi camera. https://www.adafruit.com/product/2143, $ 3.95
Attached pictures provide assembly instructions:
Remove lens from Raspberry Pi camera board. Note that lens removal voids the warranty. --Option1 is to unscrew the lens. This can be done by a special 3 D printed lens removal tool or a pair of pliers and a very steady hand. https://publiclab.org/notes/partsandcrafts/02-15-2018/2-attaching-your-raspberry-pi-camera-to-a-microscope-objective-lens –Option 2 is to ‘decap’ the lens holder (and lens) from the board. One decap method is to cut into the epoxy between the board and lens holder with end cutting pliers. The technique chews into the epoxy until the holder pops off.
Align camera board holes w/M12 lens mount and screw together.
–Thread the C adapter ring to the M12 lens mount --Thread the C mount to RMS adapter on the microscope objective --Thread the objective to the C adapter ring
Most applications will require an adjustable height camera/objective holder. One option is to use two lab jacks with the camera resting on two rulers. This is a good option for quick tests but other designs should be considered for reliable results.
Start taking pictures! I prefer to use a python program that provides 30 seconds to optimize the focus and then automatically records a jpg picture. Code is available at:[https://github.com/MargaretAN9/Camera-Test]10.
In order to compare different lens options, pictures of Raspberry Pi camera shipping box were taken with a standard Raspberry lens (3.04mm), M12 2.8mm lens, 10X and 20X objective. Each of the images have a different camera to object distance and show how the lens system can provide different fields of view and magnification. Images are recorded and shown with the same digital format.