No need for a Raspberry Pi! I once made a spectrometer at home out of just a camera, a white LED and a diffraction grating (and some tape and a wood base to hold it together). If you don’t have a diffraction grating, it can be replaced by a CD — only difference is that the CD operates using reflection vs transmission. The idea is that you shine the light from the LED through your sample (which I bought some cuvettes to hold); the light then transmits through the grating / off the CD, which splits it into wavelengths. One can then take a photo of the spectrum and analyse it using a program such as [0]. Of course, an LED is a pretty terrible light source, but with some sort of baseline correction I suspect it could actually become pretty reasonable as a spectrophotometer.
You can use a peeled-apart DVD and a USB web camera for a fraction of the cost. It's a design Public Labs came up with around 2012: https://hackaday.com/2012/08/27/turning-a-webcam-into-a-spec...
Public Labs even developed a modified design that works with most smart phone cameras, among their follow-up work (such as testing high-end cameras: https://publiclab.org/notes/stoft/10-23-2016/high-rez-webcam... )
The spectral response of the sensor is not linear, as it is designed to imitate human vision - and as anyone who read early 2000's digital camera reviews can tell you, even fancy cameras from well known manufacturers can have noticeably different color response.
One benefit of Rasp Pi cameras is that genuine cameras could be evaluated and characterized, but counterfeits and such will be a problem. Same is true of USB web cams, I suppose.
Does anyone know what you call the mount with a screw that's holding the spectrometer for either the mini/larger version? I couldn't seem to see it mentioned in the readme.
I tried something similar using just blu tack to hold the spectrometer to camera, from looking at the graph from it I think I possibly used the pi noir camera, as it can seem to see up to 900+nm or so.
Unfortunately, light spectrometer, not mass spectrometer.
I'd love a DIY mass spectrometer or liquid chromatograph for biohacking!
Just in time to make a DIY plant-sap-analysis tool, perfect timing!
Related: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4371691/
If you’re into lasers, Les’ YouTube channel is a goldmine.
This is awesome! Is there a way to try different hardware to have a spectral range to [440nm - 2200nm]? Or am I too ambitious?
What would happen to the quality if the diffraction grating spectroscope were replaced with a prism?
$70 seems expensive for a diffraction grating, what am I missing?
OT question: Is it possible to use a wedge-shaped slit (uneven width) to increase the dynamic range of a slit-grating-camera phone spectrograph?
Backstory: I've repeatedly encountered deep confusion about color, even among first-tier physical-sciences graduate students. Yet color is widely taught K-2. Apparently without great success. So what might a rewrite, a modern learning progression for color, look like? Perhaps one based on spectra, a modern colorspace, and building on current understanding of color perception? Tablets are used in K - "find and take a picture of a circle". So how about using them for color? There's middle-school work with color "arithmetic" (an <R, G, B> binary triple with addition(light) and subtraction(filter)). And phone spectrographs are a thing. Thermal IR inspection cameras suggest having a context image aids understandability, and phones now have multiple cameras, so might one do a more accessible sample-with-context spectroscope app? With the light path folded flat, not sticking out? And a high dynamic range to permit sampling objects under ambient illumination? Might one craft a spectra-based introduction to color? For K?