Modifying a Raspberry Pi Camera

The $25 HD camera sold for use with the Raspberry Pi computer is set to focus from about 1 m to infinity, but can be modified to be a close-up camera or a sensor for the focal plane of a microscope or telescope.

An Excellent Reference

The web page at written by Richard J. Kinch provides an excellent technical discussion of the camera construction, capabilities, and modification considerations. It also offers two adapters for sale, one to mount 12 mm lenses instead of the stock 6 mm lens ($85), and the other able mount either a 12 mm lens or a standard C-mount lens ($155). Both are out of my price range, but the discussion is very informative.

Lens Removal

The 6 mm diameter lens is held in a 7.92-mm square black plastic mount by three small dabs of glue, but since the mount is only weakly held to the camera PC board, the lens must be unscrewed while using a tool to hole the square mount. Also, the camera lens outside edge has 3 shallow notches for a tool to grip it. Accordingly, I fashioned both tools from 0.1" thick scrap plastic, making a square hole in one and a 5 mm dia. hole with 3 larger-diameter spots to match the lens outside edge in the other piece of scrap plastic.

I was prepared to use a sharp razor blade to cut the spots of glue, but that turned out to be unnecessary. When I gently twisted the lens (counter-clockwise when looking at its front) using my pair of tools, it moved fairly easily, and I simply continued to unscrew it several turns and then cleaned the specks of glue from the lens and mount.

Use as a Close-up Camera

Upon screwing the lens back in for only about 1 turn, it became a camera with a focal point a few cm in front of the lens and did an excellent job of presenting a magnified image of a test object. There was no sign of any problems caused by the lens surgery.

Use Without Any Lens

Without any lens, the camera's CCD can be used at the focal plane of a microscope or telescope. I had a digital microscope which I burned out by accidentally connecting it to the wrong power adapter. Fortunately the mounting arrangement for its original CCD PC board nearly matched that of the Raspberry Pi camera, and with a slight modification I mounted the Pi camera and once again had a digital microscope. In fact, I now had one with much greater processing and networking flexibility.

The original CCD however, was about 60% larger and had fewer and therefore larger pixels. As a result, the new arrangement had a smaller field of view and more pixels than necessary given the optical resolution of the microscope lens. Those were not serious problems as I simply would not use the highest magnification lens of the microscope.

A interesting problem did show up. There were some spots in the microscope image about 5 pixels in size that were connected with the camera, not the microscope lens system. These spots were not present when the lens was being used or when the CCD without a lens was illuminated by unfocused light. The spots did not change position when I gently directed dry-blow into the camera. I think the spots are from particles that have been on the inside of the infrared filter all along, but did not show up in normal use because their effect was spread out by the converging light from the lens. When used with light from the microscope that had a very small angle of convergence, those spots produced significant blockage of light to a few pixels.

It appears that the Raspberry Pi camera is much more sensitive than the original microscope CCD so it may be practical to reduce the aperature at the objective lens of the microscope to gain a greater depth of focus. Doing so, however, would increase the blurring caused by the diffraction limit. Still, it seems like an interesting additional possibility to examine.

I have not yet used it at the focal plane of a telescope, but that should produce a similar result as with the microscope.

Last updated: November 23, 2014

Valid CSS! Valid XHTML 1.0 Strict

Support Wikipedia

Contact Craig Van Degrift if you have problems or questions with this web site.