I bought a desktop spectrometry kit from the Public Lab store, I had an issue where the webcam lens aperture appeared to be too high. It looked around 38mm from the base and I was getting 1/4 of the webcam image cut off by the top of the cutout in the DVD holder. I tried moving the camera down into the soft velcro a bit but was still missing a bit of the image and wasn't having very good results. As an owner of a couple 3D printers, I felt I could improve the design a little so I made a little something last night.
The design is customizable for distance from slit to lens, lens height, lens/grating block angle, webcam dimensions, etc. The DVD bit or a commercial "diffraction grating slide" is just laid over the camera and can be secured by taping the sides or double-sided tape. There is a reference mark to align the lens at the proper height, and a cable channel under the block for running the wire out. Printed in cheap $18/kg PLA, the standard 200mm length, 35mm height unit is about 25 grams or roughly 45 cents and takes about 50 minutes to print. The 200mm length version (~210mm overall) should be able to be printed on a standard 200x200mm 3D printer if rotated 45 degrees to fit on the bed. Baffles and slit mounts can be integrated into the same frame although I haven't experimented with this at all. One issue is that the double-sided tape for attaching the webcam doesn't stick as well as it does to the wooden block. I'm not sure how to address this to secure the webcam more rigidly.
A couple general questions I have:
-- When using the 1000 lines/mm diffraction grating, a 640x480 capture from the webcam crops out half the spectrum due to it being off-center. I can move the spectrum up and down by moving the device up and down but left and right do nothing so how would I center the image better? Tilt the webcam left or right a little?
-- In my capture, you can see the green and red are almost clipping and overall there isn't a lot of detail in the capture. Would this be remedied by a smaller slit? Is the image out of focus? I've tried focusing the webcam using a page of text at 200mm but man is it ever hard to focus because the image is blurry while touching the lens due to the whole thing moving so it becomes a series of "better now? or better now?" small adjustments until I give up.