Public Lab Research note

This is an upgrade for spectrometry. Try building it and report back how it goes.

A more compact spectrometer

by cristoforetti | May 13, 2016 16:59 13 May 16:59 | #13112 | #13112

What I want to do

For the WebValley 2016 Summer School (, together with the other tutors of the school, we are looking for the feasibility of building a portable spectrometer for field use outdoor.

In principle, we could try to use the v3.0 spectrometer as it is, but I want to try to make it a little bit more compact.


As far as I have understood, the problem with reducing the length of the spectrometer is related to the focus of the webcam which looks optimized for a distance from the slit close to 20cm. If this distance cannot be changed, there are not so many ways to reduce the size of the whole object: we need to alter the optical path of the light using mirrors inside the box. In my project I cut small pieces from a mirror bought in a supermarket. These are placed inside the spectrometer taking care of the right reflection angles.

After some trial and error, the final design of the spectrometer is shown in the figure.


The size is 70x70mm, as the height can change a bit consistently with the size of the webcam.

The light enters through the slit (at the bottom in the figure) and is reflected the first time with an incident angle of 50 deg. After that, other three reflections follow before the beam hits the diffracting surface with an incident angle of 69 deg. This last angle is fixed for collecting the spectrum on a (hopefully) wide range of wavelengths. If I did the math correctly, using a DVD as diffraction grating, we will find light with wavelength of 380nm at around -25 deg from the normal and with wavelength of 1000nm at +24 deg. You can see the two angles at the top of the figure.

In Fig. 1 you can also see that the central mirrors are rotated by 6 deg with respect to the border of the box. This allows avoiding inclination both of the diffraction grating, saving the optimal choice of 69 deg, and of the webcam.

The total path length of the light is between 19cm and 20cm, which is exactly what we want.

First I realized a prototype in polystyrene (see the figures)


At least the angles were right because I can see the spectrum. It is really bad shaped but this is due to problems with my very old webcam. As you can imagine, the stability of the system is quite low so I did a 3D model of the layout with Sketchup and thanks to a colleague that has a 3D printer in his lab I’ve got the new plastic version. The model and the printed spectrometer are in the last two figures. The cover is still missing but I wait for the new webcam before fixing the details of that part and before posting some spectra.


This were I am now, still lot of works to do before having the full prototype for open field data collection and before WebValley 2016...

I made this Help out by offering feedback!

People who made this (0)

None yet. Be the first to post one!

I did this Help out by offering feedback!

People who did this (0)

None yet. Be the first to post one!


This is certainly a very ambitious undertaking. 70X70mm that would be pretty amazing.

Reply to this comment...

@dhaffnersr: assuming that the angles are right I think that it will be crucial to have good mirrors reflecting on a wide range of wavelengths without absorbing too much (four reflection before the grating are a lot). Btw I ordered your webcam.

Reply to this comment...

hey cristoforetti, my web cam's dimension's are 32mm X 32mm, so your project is pretty small I hope it will work, as far as the mirrors, if i were you i would use aluminum coated one's, because they will have a 99 percent reflectivity index.

Reply to this comment...

Thanks dhaffnersr, that dimension shouldn't be a problem. Probably I will need to modify a bit the design, shifting the optics 5mm to the left should be sufficient and there is room for that inside the 7x7cm . Regarding the height, I will add a support for the webcam of the correct size in the final project.

Reply to this comment...

Sounds good, the 3D printed prototype looks cool also!

Reply to this comment...

@cristoforetti, the camera focal distance is based on using a slit to simulate collimated light -- non-collimated light gives multiple diffraction angles for the same wavelength (spectral distortion). So, for simplicity, the camera is roughly focused on the slit. However, the camera's DOF is so deep that the practical distance isn't critical. Therefore, since the light is not actually collimated with these simple designs, the '20cm' works better than just shortening the distance to 10cm -- the spectral error is largely the angular variance based on slit width, camera aperture and distance.

If you are still prototyping .... you might consider thinking about a few additional factors: 1) using front-surface mirrors (broader spectrum, lower distortion and no internal reflections), 2) having many reflective surfaces increases the mechanical stability issues (you should be able to do it in 2) and 3) the shallow angles of the proposed housing can make unwanted reflections (off the channel side walls) a bigger problem as it's difficult to obtain truly non-reflective surfaces (perhaps keep it simple with an open box with no 'channels' and one or two well-placed baffles (think wide "slit") to stop unwanted reflections.

Reply to this comment...

@stoft thank you very much for the clarification and suggestions.

About 1) I am looking to use cars mirror, that should be front-surface mirrors.

In order to avoid unwanted reflections I painted the wall of the chamber with black tempera color. Trying before and after you actually see a lot of difference: indeed without painting lot of noise was collected in the camera.

Also reducing the number of mirrors is a very good suggestion and I think is indeed possible keeping fixed the 7x7cm box. I will try with 2 as you said.

Reply to this comment...

hey cristoforetti , I just wanted to give you some info on why you should be using the aluminum coated mirrors:

Aluminum is also common used in mirror coatings. It is one of the few metals that retain its full silvery reflectance in finely powdered form, making it an important component for mirror coatings. Aluminum mirror finish has the highest reflectance of any metal in the 200–400 nm ultraviolet and the 3000–10000 nm infrared spectral ranges. However, its reflectance in the 400–700 nm visible range is slightly lowered compared to silver and tin and in the 700-3000 near infrared when compared to silver, gold and copper. Regardless of all the benefits above, the advantages are only temporary because of oxidation tarnishing. Aluminum naturally reacts with air creating a barrier oxide layer and so effectively reducing nominal reflectance. Therefore, to maintain optical integrity of aluminum coatings, it must be treated with a protective coating.


Reply to this comment...

@dhaffnersr thank you for the reference. You are certainly right, my only point is that it will take some time to have an aluminum coated mirror, in the meanwhile I will do the prototype experiments with the cars mirror.

Reply to this comment...

cristoforetti, oh yeah, that's perfectly fine I do the same thing when I build a prototype. I use some pretty unconventional material sometimes!

Reply to this comment...

Yes, both aluminum and silver oxidize very rapidly which is why all mirrors with those surfaces are coated -- the type of coating affects the mirror's spectral reflectance. However, for your experiments I'd not worry about it; front-surface should be sufficient. A cheap source of 1-in dia (you don't need a large surface area) front surface mirrors are dental-probe mirrors, sold by the box on Amazon as a mirror replacement item. With care, the metal backing/housing can be removed if needed.

Reply to this comment...

stoft, see, that's what I'm talking about, finding the work-around, that's actually a great idea and very cost effective.

Reply to this comment...

Login to comment.