Raspberry Picroscope, Summer Intern Project 2013


During late August I had a summer intern student working for me for a week. Arun Silva worked on a project we call the Raspberry Picroscope.

We have a very nice Leica MZ16A stereo microscope that has an original digital camera from the time we purchased it. Although the microscope is still very good the camera board in the PC failed some time ago and in technological terms is ancient (>7 years old). We looked into a direct replacement from Leica but the board is now obsolete and the cost a new camera was approaching that of a high-end DSLR.

Our Solution

We dismantled the old camera from it’s housing as we wanted the
C-mount plate that connects the camera to the microscope optics. Using a Raspberry Pi camera module we carefully unscrewed the lens from the Pi camera exposing the CCD. Now using simple double sided carbon tape we built up a sticky pad around the old CCD hole and carefully stuck the Pi camera module to the C-mount.


Having drilled four holes in a Pi case to accept bolts to our C-mount plate we attached the top of the case to the plate. We also cut out the small piece of plastic from the case that runs directly above the network socket as this allows our ribbon cable to run to the camera. Now we simply snapped the case together containing a model b Pi and our hardware was complete.


To test it we took a C-mount lens from an old electron microscope chamber camera. This lens has a focal range of about 10 - 20cm. Also as our Pi camera has a smaller CCD than the original camera we automatically get a magnification gain.


Here you can see the Pi and camera imaging the old CCD from the original Leica camera.


Using this lens we have a made a very nice macro camera and envisage it will be used in this configuration frequently in the lab. Here is a sample image.


However, our main aim was to install it on the Leica. Here it is in place, and here are a couple of sample images.


A fly


Here is the original lens from the Pi camera


Having a conventional C-mount we can also fit it to other microscopes. Here it is on a Leica DM 2500P And some images from this microscope.


A low magnification image of the old CCD chip from the Leica with the glass cover removed.


A high magnification image of the same chip. Note the RGB pixels. Each one is 3 micrometres wide, and the image field of view is about 25 micrometres.


Finally, because we can, we have put the same old CCD chip shown in the last image into one of our SEMs. Here is an imaging showing individual pixels with simple re-flowed polymer lens. This shows they are about 3 micrometres per pixel.


Future work

Arun has produced a command-line Python program that captures images, or video, offering file naming and saving, resolution, contrast and brightness and image rotation options for each save. Our immediate plan is to network the Pi so that images and videos are automatically stored off the SD card, and we will produce a GUI for the camera operation. We will also work a bit on the colour balance to optimise it for the microscope lighting.

I plan to measure up the C-mount flange and produce some part drawings so we can make some copies. If anyone is interested in obtaining a copy of these let me know. We also have a very good 3D printer here and I might have a go at printing some replicas.