PublicLab Smartphone Spectrometer

2014-01-13 00:40:53 -0500

Got my "Smartphone Spectrometer" Open Hardware kit back in November 2013, and finally got around to assembling it. The project has a cleverly minimalistic approach: the "device" is three pieces of plastic, some anti-reflective material, an optically printed "slit", and a piece of diffraction grating film; you put it together with four screws and 8 pieces of tape - and then put it between a light source and your cellphone camera, which sees a spread-out "rainbow" spectrum. You then hit the Spectral Workbench website, and take a picture of the spectrum (through the web page directly, or uploaded from your gallery) and push it through with some comments; there's a calibration step involving orienting the image the right way (which I think could be automated, they are in color after all) and then marking 2 Mercury lines, which gives you a reference you can use for other shots with the same gear. All open hardware and open source code; PublicLab is actually an OpenId provider that Spectral Workbench uses, there's a lot of general "playing well with others" here; the workbench website code is even up on github, the CAD models for the parts are downloadable.

I successfully uploaded and processed a couple of bright-light shots, since I actually still have a small number of CFL bulbs; turns out "LED" bulbs have boring incandescent-like spectra, because the phosphors that give them their pleasant color are somewhat wide band. Haven't sampled any "easy" colored LEDs yet. So as Kickstarters go, this was an excellent and engaging experience.

The software had a few frustrations (things that are fine once you see them, but having a user-centric first-light walkthrough overlay would help for people coming from Kickstarter rather than from a specific interest in public science work.) Most of them were in areas where calibration could be made a lot more automatic, or at least guided, with checks for what you should be seeing (things like "are the pixel-colors in the image spectrally increasing left-to-right and not top-to-bottom" are easy to do in code, even if you just present them to the user as suggestions.) That said, the other models of DIY spectrometer may produce sufficiently better images (especially when they're assembled more skilfully) that it isn't as necessary on that side.

As for the assembly itself: the adhesives they shipped with are horrible for the assembly (too thick, and not repositionable at all.) Once I get around to learning enough OpenSCAD to be useful in this space, I'm definitely going to look at redesigning this to use 5 pieces of plastic; clearly clamping the diffraction grating will work better than gluing it, and I think a similar approach will work for the slit (and reduce light-leak around that end of the assembly.) That won't help with the attach-to-camera part (I do like the idea of just gluing it to a sacrificial case, but I have a Galaxy Note 3 and there aren't really any useful cases for it yet) but stealing some ideas from the Easy Macro rubberband-lens might be a good starting point, without going so far as simply making a version of the Easy Macro with a prism instead of a lens.

Not only did the Kickstarter deliver, this particular reward is available from the PublicLab Store along with the Desktop and Foldable models, so you can follow along at home. (Bonus gadget points: most of the example photos of the device have it attached to a Firefox OS phone :-)