I need a CCD camera that can be used inside vacuum. Not the flange mounted types used in XUV-X-ray applications, but small compact preferably less than 20 mm dia housing. Does anyone have experience in using standard CCD cameras in vacuum, or can anyone suggest possible sources/references?
Is it possible to set electronic exposure (aka electronic shutter) time, remotely through software, in a USB based CCD camera?
I don't see too many issues using a standard USB camera in a vacuum. Your two largest issues are likely to be heat dissipation, and outgassing from the camera components.
Depending on how high a vacuum you need, you may need to package the camera in a hermetic container. There is almost inevitably going to be at least a small amount of soldering flux/VOCs left on the PCBs from production, and it will outgas when you pump the system down.
If you have sufficient pump capacity, or don't need extremely high vacuum, it shouldn't be too much trouble.
You could also try removing all the plastic from the camera, and baking the PCB assembly at a low temperature to speed up the out-gassing (~100°C?).
Second, at least some of the USB-cameras I have used do dissipate a fair amount of power, so depending on the camera, you may have localized heating issues due to the lack of convection cooling. It should be possible to deal with this using proper heat-strapping, though I think it would probably better to just pick a device with low dissipation.
Lastly, you can certainly buy some pretty interesting USB cameras, which do support all sorts of fun things like variable ISO, and variable shutter time. It mostly depends on your budget.
If you don't mind experimenting, I would say go to your local electronics store, and just buy a webcam, and see what happens (and post pictures!).
The hardest part, I think, is probably going to be hermetically sealing the cable feed-through. You can't just stick the cable in a cable gland, as you will get leakage through the cable, both between the strands, and between the individual wires and the sheath. You will need hermetically rated bulkhead connectors.
I was also looking for a vacuum compatible low cost camera. Then I bumped into a report by S. C. Delaquis of the Albert Einstein Center for Fundamental Physics, Laboratory for High Energy Physics where they used an off the shelf webcam and made a custom housing for it. You can read it here.
However, their application was vacuum + cryogenic. This means that generating heat was more of a problem to them than actually getting rid of heat which is the case in "normal" vacuum. Maybe if you use a low power webcam (~1 W) you can get a way without cooling or connecting some copper braids to a thermal mass.
By just using a standard viewport window flange and a usb flange/9-pin flange combined with a piece of pipe you can made such housing without any metalwork to be performed.
Image courtesy of S.C. Delaquis [source]