DIY Optical spectrometer / spectrograph

The apparatus allows to take spectra of light sources in range from ~400 to ~1000 nm

Public Chat
Similar projects worth following
The device is made from cardboard and glue, retractable knife blades forming a slit, holographic diffraction grating film and modified p&s camera (removed ir-block filter).

There are two main parts for this spectrograph: the hand-made optics and means of capturing spectra, in this case a photo camera. Also there is little addon for calibrating by wavelength -- the neon glow lamp.

The optics is just a box lined with black cardboard, and several apertures inside, made of the same black cardboard. The apertures are made for reducing stray light. Entrance slit is made from two blades used for retractable knife. The dispersive element is 600 lines/mm Chinese transmission diffraction grating on PET substrate. There is no collimating optics inside, so light incoming on the grating is slightly divergent, angle of divergence is ~5 degrees from center line. This is probably the cause of slight distortion of the spectrum. In the end, this geometric distortion is readily dealt with software.

Here is spectrum of Neon, captured with this spectrograph:

It took 512 seconds of exposure, and there are many lines visible. Almost all lines in the left half are infrared.

The camera I use is modified Canon A490, bought second-hand for just about 10 USD. The modification - removing the IR-blocking filter - was made by me after buying it. The camera is loaded with CHDK "alternative firmware" which allows to shoot raw and have total manual control. Also through the use of related software chdkptp one can remotely control the camera from PC. 

After capturing, raw files are "developed" with dcraw so that resulting tiff has 16 bits per channel, bad pixels are removed and pixel values are not distorted by gamma transformation, so these values are linearly scaled with the number of photons captured. Afterwards, the tiffs are further processed with Fiji software, by the use of unwarping plugin. The same software has another plugin which enables one to make graphs from pixel values. For rectangle selection it averages values of pixel column, which comes handy for capturing spectra - it makes one photo to have some thousand samples of the spectrum.

Above is the spectrum of Mercury lamp (aka germicide lamp) as captured by the spectrometer. At the bottom is the light of little Neon glow lamp which is an etalon of spectral calibration.

And this is the same spectrum but straightened, so averaging along vertical axis is possible.

The resulting data was exported to Excel, pixel coordinates correlated to wavelength, and presented as graph:

Vertical scale is arbitrary units, relative vertical scale varies with wavelength as camera sensor has not been calibrated for brightness vs wavelength. The highest peaks at 405 and 437 nm are also oversaturated, their real height should be several times bigger. The horizontal scale is nanometers.

An interactive model of spectrometer.

x-zip-compressed - 7.21 MB - 12/17/2020 at 09:20


  • The computational model

    Pavel12/17/2020 at 09:18 0 comments

    Recently, I have my interest in spectrometry relighted, and started to think about improving the spectrometer.

    Now I plan to build a new version using plastic sheets instead of cardboard, and do it with better precision. Also collimating lens would be added so the spectrum can be focused sharp over wider wavelength range.

    To better plan the layout the new version of spectrometer, and simply to better understand peculiarities of its operation, I created an interactive model, where many parameters can be adjusted, and results are seen right away.

    The model is written in Javascript/html/css, works in web browser. Just download it to your desktop, unzip, and open included html file; best to view it at 50% scale.

    It shows positions of main elements, and traces rays coming through slit, and also diffracted ones. It also shows the spectrum focused on camera sensor.

    Here is the screenshot:

    On the bottom is the image of spectrum. It is modelled as a series of spectral lines at regular intervals, ranging from 350 to 1050 nm, maximal range of camera sensor sensitivity.

    For camera lens focal distance, the 21.6mm is used as it stated maximum zoom focal distance for Canon A490 camera.

    In this model, to see how spectrum is formed without collimating lens, one should move it to the left of grating, so it has no effect on rays hitting it. This way one can see how my cardboard spectrometer works.

    I hope to build actual new version in less than a month, and post progress here in further logs.

View project log

Enjoy this project?



Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates