Update: an improved version of this thing is found here: http://www.thingiverse.com/thing:216821
I recommend using the newer verison...
A simple adapter that holds a Logitech Quickcam Pro for Notebooks at the correct position on a microscope to allow you to record video and still images of objects viewed under the microscope- ANY microscope.
With this particular web cam the lens needs to be held a few mm above the eyepiece lens, so I designed the holder to do just that. The adapter grips the aluminum piece that the eyepiece slides into, not the eyepiece itself, which fits loosely inside the adapter. That makes it easy to adjust the position of the camera/adapter for optimum results. If your print fits the camera a little loose, use a rubber-band to hold the camera more tightly to the adapter. I use GUVCViewer on my laptop (Ubuntu 13.04) to view results and capture video and still images. I am able to get 940x720 video at 15 fps with this setup. Test video can be seen here: https://vimeo.com/80511761
I made an adapter for a gopro camera, but the gopro lens captures such a wide field of view that the image from the microscope occupies only a small portion of the center of the field. An additional lens would be necessary to use a gopro for this purpose.
The outer diameters of microscope eyepiece and the of the tube it slides into (the aluminum part gripped by the adapter) are not standardized, so you may have to tweak the design to fit your microscope. My scope is a B&L Balplan recently picked up on ebay for about $200. I am using Leica 16X WF Kpl eyepieces.
The second photo is a dead bug squished by a cover slip. magnification is 160x.
The procedure for designing something like this is easy:
1) hold your camera up to the eyepiece of the microscope while viewing video on your computer. You'll have to move the camera around a bit to find the best position for it, and then visually estimate the distance from the camera lens (or the end of the lens tube) to the eyepiece lens.
2) measure the eyepiece and the eyepiece tube diameters with a caliper. You must be sure to align the optical centers of the camera and eyepiece lenses, so measure carefully.
3) design a mount to hold your camera with a tube that fits loosely over the eyepiece but grips the eyepiece tube. You'll be able to slide the mount up and down on the eyepiece tube to adjust the exact distance between the camera and eyepiece lenses.
The logitech camera I used has an unusual shape which made designing the adapter a little tricky. There are other cameras that have easier shapes to design around and better video performance, but this is the one I had handy.
I designed the part using Sketchup, exported the .stl file, sliced with slic3r, printed with support material using 1.75mm Coex3d blue ABS (thanks Chris Osborn!), 0.2mm layer thickness, 35% infill on the MegaMax printer at the Milwaukee Makerspace.