Today (Hackaday, April 23), I've invested the bigger part of the day into a quick hack, to demonstrate the potential use of my optical spectroscopy software SPEKWIN32 together with webcam-based DIY spectrometers. It is not perfect, but it works:-)

What it does:

Optical setup of spectrometer:

For diffraction of light + focusing I used a concave reflective grating. The slit image is much bigger than the little CMOS chip inside the USB camera. Therefore I used the grating for spectrum projection onto a white piece of paper within the slit plane beneath the entry slit. Used the USB camera with lens to image the projected spectrum image. Works astonishingly well:-)


Application example: measuring absorbance of coloured decals:

  1. yellow coloured:
  2. red coloured:
  3. green coloured:

  4. blue coloured:


Limitations of the current version => to be improved:


What annoyed me most:

The webcam had a habit, which is normally useful, but very annoying for spectroscopy: the automated auto-exposure always makes sure to get images with medium intensity. Which means that spectral measurements are severly hampered. It tends to produce partly overexposed data, at least for some of the three color channels. For measuring transmittance or absorbance spectra, it is crucial that the reference spectrum is still applicable when measuring the sample. Which is only the case, if a) the light intensity is still the same and b) the exposure time didn't change. However, as soon as you put the (light-absorbing) sample into the light path, the cam does increase the exposure time, in order to compensate the decreased light level. Which basically means, that only the first one or two frames after putting the sample into the light path give something near to the real sample absorbance. Due to this behaviour, I had to do the above screenshots for presenting results.
I am curious to learn about other's experiences with this common webcam feature!

UPDATE May 07 2016: introduced access to webcam settings, this should allow to control exposure time & white balance. Could not try, features were inactive with the used webcam.