In the picture above you can see the righthand side of my real desktop :-) the webcams that I have now started using are in the tiny boxes mounted on the microscope bodies, and there are three fluorescent reading lamps to illuminate my specimens.
Each webcam is a 'QuickCam Pro 3000', but the original cameras came in a spherical housing on a stand with an internal microphone and a button on top. I removed the case and unplugged the mic and button from the circuit board, unscrewed the lens, and then mounted the board in a small plastic box with holes cut for the wire, which is a USB lead, and the CCD housing. The CCD is what the picture is focused on, it has a glass window on top which must be spotlessly clean and without fingerprints, anything on this window will cast a shadow on your picture. I also cut the front off the CCD housing of one webcam to allow the lens to get closer so I could focus on larger objects.
These cameras have a resolution of 480 x 640 pixels and cost me about 80 pounds each, I imagine if you shop around you should be able to find a cheaper one with less frills to throw away. The pictures they produce need a little sharpening, and if the lighting is poor, or you're working at high magnification, they may be a bit 'snowy' or 'grainy' you can get around this by averaging a few pictures taken at the same time. If you do use one of these cameras the software that comes with it is good for taking pictures but the preview window is only 320 x 240 pixels, I downloaded a later version which will allow two cameras to be connected at the same time without crashing my system.
I used to take 35mm pictures with cameras that had Pentax thread lenses and attachments so I have cannibalized various parts from these.
First the microscope, you'll notice that I have removed the eyepiece tube and eyepiece. The microscope came with a black plastic piece that fitted in the hole where this tube assembly goes, when it's in the hole you tighten a thumb screw to hold it in place. I cut a large round hole in the center of this plastic and attached the back of an old camera lens to it using a couple of screws. Then I fastened the part of the old camera where the lens screwed onto the front of the webcam box. The reason for this arrangement is so I can use extension tubes between the camera and microscope.
Using this arrangement a x4 objective gives a full picture width of 3mm without extension tubes but the specimen must be very low on the stage or you can't focus on it. A x10 objective is still usable and gives a full picture width of just under 1mm. By the time you get to a x40 objective you must use great care or have the specimen mounted on a slide.
In my other setup I didn't have another camera front so I glued a short extension ring into the front of my webcam box, it's the same thread as before so the two cameras are interchangeable but this one is fastened to a stereo microscope stand with all the lenses etc. removed. I have even made an extension rod for the stand so I can lift the camera even higher for larger objects. The lens was from an old camera but I have removed some of the lens elements to leave me with a focal length of approximately 35mm. When the lens front is about 30mm away from the specimen, which needs an extension tube to focus, I get a 3 mm wide picture again, which is where the other setup starts. You'll also notice the mirror from a 'toy' microscope mounted in it's gimble in one of the stage clip holes on the microscope base I use the concave side to focus light back on the specimen.
That's it, all home brew, but it works :-). You'll probably be able to think of other ways of doing it, Good Luck!!!
By the way I will be releasing another version of my picture processing program soon, it's like the old one with new bits and some of the interface has changed a bit.