I bought an AmScope trinocular microscope several years back and find it handy (but not a necessity) for the electronics I do.  Another reason I bought it was to entertain the grandkids and perhaps interest them in the natural world.  I like to use it with the eyepieces because of the stereo but the kids can't really get it adjusted correctly and from time to time it would be nice to capture an image or take a video.  A decent microscope camera costs $200 USD and up so here I look at DIY.

AmScope Microscope

I've tried various things like making a holder for my iPhone and playing around with the original Raspberry Pi camera but wasn't satisfied with the results.  Here I present results using the Raspberry Pi High Quality Camera and an adapter lens made for microscopes.

 

3D Printed Parts and Assembly

 

The lens I'm using is the 23.2mm AMA050 adjustable eyepiece adapter which can be obtained for around $50 USD on Amazon.  My microscope uses 30mm eyepieces so an adapter is necessary.  A way to hold the Raspberry Pi in place on the microscope is also necessary so the following pieces were 3D printed in PLA.

3D Printed Parts

The blue part on the left fits over the trinocular tube and is glued to a surplus 3D printed bottom of a Raspberry Pi case.  The blue part on the right is the adapter for the eyepiece lens.  The enlarged collar at the bottom of the adapter holds the lens in place.  The depth of the collar was determined by moving the lens back and forth prior to printing.

 

The following images show the lens and adapter apart and then mated together.

Lens and Adapter

Lens and Adapter Mated

Here we see the Raspberry Pi mounted on its holder.

Raspberry Pi and Mount

After removing one of the eyepieces the camera can be placed on the microscope and is ready for use.  A Raspberry Pi Pico 2040 has been placed on the microscope stage for viewing.  As can be seen, one of the nice things about this microscope is it has good relief between the microscope and stage.  It has been fitted with a LED ring light that gives even flat light.

Microscope Camera Ready for Use

 

Results

 

The image below is quad-ruled graph paper with 4 squares to the inch (each side of a square a bit over 6mm). The microscope has 1:4.7 zoom and is set at the lowest magnification. Raspistill was used to capture the JPEG image and it is straight out of the Raspberry Pi without sharpening or other manipulation.

A couple of observations:

  • The lens does not quite cover the sensor.
  • There is practically no pincushion
  • The image is sharpest in the middle with a visible reduction in the corners
  • There is visible vignetting in the corners

 

The loss of image quality in the corners is to be expected.

 

In the next image, the microscope is zoomed to the highest magnification and is somewhere around 6mm across horizontally.

Below is a shot of an edge of the Raspberry Pi Pico microcontroller chip with greater than 2x zoom.

Raspberry Pi Pico Closeup

These stills are plenty good enough for what I do.  The 1-minute video below demonstrates the quality of the image in real-time on a monitor.  There is minimal delay but I wouldn't use it for soldering given the lack of stereoscopy and I normally stick to larger size SMD anyway.

This is good enough for looking at flowers and bugs with the kids.  I don't expect to use it much for electronics.

 

Summary

 

 

This quick project turned out pretty good and suits my needs.  It is not expensive if a Raspberry Pi HQ Camera and board are readily at hand.  A downside is that it uses one of the eyepieces and not the trinocular tube as the lens is too large in diameter.  Comments and suggestions are always welcome.