What does it do?
At its heart a spectrometer does the very same thing than a prism: it splits an incoming beam of light into its spectral components. So for example for pure white light we observe a rainbow, as white light contains all wavelengths ("colours"). In general, though, what we're looking at isn't pure white, but some combination of wavelengths, and how much of each there is can be detected with the spectrometer. All this is used for example by chemists to find out what elements are inside a compound material, or astronomers to get info on the composition of distant starts. Or maybe you just want to know what wavelength your LED/laser diode/lamp emits.
How does it work?
We shine light through a thin slit onto a diffraction grating. Here, the grating is a reflective one, but transmission gratings work along the same lines. When the light hits the grating each little slit (the lines where info will be written onto the DVD in our case) acts as a new secondary circular wavefront. All those waves will interfere with each other giving rise to several orders of diffraction. For more information on the physics of interference and diffraction check this link.
The equation that tells us everything we need to know is this one:n is the diffraction order, lambda the wavelength, d the line spacing on the grating, and alpha and beta are incident and diffracted angle.
OK, so why are we spinning the grating? Of course we could use a stationary grating and record the spectrum by placing an array of photo-sensors at the correct angle from the incoming light.
I have instead chosen to use just one photodiode and change the angle of the incident light by rotating the grating. With a bit of maths and special attention to the sign convention of angles the equation above can be re-arranged to show that there is a nearly linear relationship between the incident angle and the wavelength.
A few more details
Coming back to the Spinning Spectrometer the last bit above means that as long as I know the angle of rotation I can relate the measured intensity to wavelength, i.e. colour.
The protocol for the spectrometer (see Arduino code) is therefore the following:
- Find home position. For me that's where the little magnets are attached to the grating mount. I use the Hall sensor to measure the Hall signal during one full motor revolution and determine the maximum signal. Then the motor slowly rotates until that maximum value is found. You could just as well set the initial position by hand though...
- Go to starting point. Optional, but useful if don't want thousands of points (and the associated wait while transferring data over serial).
- Measure. Repeat this sequence: rotate grating 1/8th step, read photodiode circuit, store value.
- Send data and display, go back to home.
Another detail regarding the grating: mount the piece of DVD in a way such that the lines on it are vertical. If you can, use a piece that's closer to the outer rim, as the lines will have less curvature there.
Finally, why is the grating curved?
This has got nothing to do with the spectrum itself, but with the spectrometer's resolution. The spectrum only depends on the line spacing. The reason for the curve is that the beam will diverge after diffraction which in turn will broaden the spectral lines. This can be fixed by inserting a focussing lens or focussing mirror. The latter is accomplished by curving the reflective grating / piece of DVD.