Live data from Hacker News

DIY Raspberry Pi Spectrometer Guide

github.com

11–20 of 31 posts

Re: DIY Raspberry Pi Spectrometer Guide

#12
post #3

Unfortunately, light spectrometer, not mass spectrometer. I'd love a DIY mass spectrometer or liquid chromatograph for biohacking!

You might like - https://www.youtube.com/watch?v=nIKhUizkXxA ( DIY mass spectrometer measures potassium in dietary salt substitute ) by Ben Krasnow

As well as Chromatogiraffery's channel: https://www.youtube.com/channel/UCZ8l6SdZuRuoSdze1dIpzAQ

Re: DIY Raspberry Pi Spectrometer Guide

#15
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.

Re: DIY Raspberry Pi Spectrometer Guide

#16
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 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?

Re: DIY Raspberry Pi Spectrometer Guide

#18
post #17

This is awesome! Is there a way to try different hardware to have a spectral range to [440nm - 2200nm]? Or am I too ambitious?

Color visible sensors tend to have a spectral range of 400 to around 1000 nm. (There is often an additional glass filter to block ~ 800+, which is removable).

Beyond 1000 nm, silicon becomes transparent and ceases to work as a detector, so those longer wavelengths need a detector made from another material, notably indium gallium arsenide (InGaAs) which in one form can get all the way out to around 2700 nm. Anything that gets you away from silicon chip fab also gets you away from the fab-ulous economics of silicon. InGaAs sensors are super damn expensive.

Beyond 2700, thermal imaging cameras and the like use even more exotic sensor materials.

An alternative for those longer wavelengths is a monochromator (e.g., rotating diffraction grating detecting one wavelength at a time) and a single element detector which is cheaper than an array. If course your subject has to be sitting still for the duration of your measurement.

Re: DIY Raspberry Pi Spectrometer Guide

#19
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.

[0] http://scheeline.scs.illinois.edu/~asweb/CPS/

Re: DIY Raspberry Pi Spectrometer Guide

#20

$70 seems expensive for a diffraction grating, what am I missing?

There's very little use for a general purpose grating, since all commercial uses end up with custom gratings directly from manufacturers. So the ones that are sold in catalogs tend to be more expensive owing due to economies of scale, maintaining an inventory, and probably passing through one or more middlemen. And people willing to pay R&D prices to have something quickly drive up the price as well.
Post reply on HN