I thought I’d take a moment to show a sneak peek of a something I’ve been working on for the Mark 5, an inexpensive 3D printable mini spectrometer. (The Mark 5 is going well, by the way — The first prototype is half-built, and I successfully communicated with it’s linux console over USB this weekend!)

This is a prototype Open Mini Spectrometer, a very small, inexpensive, and partially 3d-printable mini visible light spectrometer for embedded systems. Technically it has two components, the detector electronics, and the spectrograph.

Detector:

The detector board contains:

a TSL1401CL linear CMOS detector w/128 channels

an AD7940 external analog to digital converter (14-bit @ 100kSPS)

a small power filter

a standard 0.1″ header to easily breadboard the spectrometer or connect it to a microcontroller (including an Arduino)

a 4 x 2mm-hole mounting pattern to attach the spectrograph

for the stand-alone pcb, 2 x 3mm mounting holes (one on either end)

Spectrograph:

The prototype spectrograph is an experiment in low-cost design, and is almost entirely 3D printed using ABS plastic on an inexpensive desktop 3D printer (such as a Makerbot, though I used an ORD Bot Hadron). I have much more experience designing electronics than I do designing optical systems, and so the spectrograph is designed to be swappable/upgradable as newer designs come to pass (and I expect it to go throught a few iterations). This first spectrograph design has a 3D printed slit, and uses an inexpensive 1000-line/mm diffraction grating of the kind you can find on diffraction grating slides for classroom experiments. I read a paper a while ago on using deconvolution to post-process the data from slit spectrometers and basically sharpen the point-spread function (or PSF) to effectively increase the resolution of the instrument. Inspired by this, I decided to leave out the relay optics between slit-to-grating and from grating-to-detector to see if I could use post-processing to effectively sharpen up the overly broad PSF and have an even simpler and less expensive instrument.

The spectrograph design:

contains a ~0.2mm printed slit

400-700nm (approx) spectral range

Variable spectral resolution (~3.3nm @400nm, ~1.8nm @ 700nm), not accounting for the PSF

1000 line-per-mm diffraction grating (cut into a 4mm wide strip, and inserted into the spectrograph flush with the slit aperture)

3D printable on an inexpensive printer

Very small size — about 1cm wide x 2cm long x 3cm tall.

With a spectrometer you’re often battling for SNR, and have to worry about stray light. Although these pictures don’t show it, the spectrograph has to be spray painted with a flat matte black paint to get any kind of performance.

Example Data:

I connected the open mini spectrometer to an Arduino Uno, and wrote a quick sketch to acquire spectral data and send it serially to a Processing sketch. Let’s have a look at some data collected from the instrument from two light sources — the first a white LED, and the second a red laser diode. The following images include four subplots: (1) the raw detector data from the light source, (2) a baseline measurement to determine the ambient light, (3) the difference of 2 from 1, to arrive at just the light from the light source, and (4) the spectrum re-sampled from variable (1.8-3.3nm) to evenly spaced spectral bins:

White LED

Red Laser Diode (~650nm)

Currently it has all the performance you’d expect from a $20 spectrometer with no relay optics — the PSF is quite broad (the FWHM on the laser diode is about 20nm), and although the printed slit is fairly deep there’s still a fair bit of translation on the detector depending on the spatial location of the source. I haven’t had much luck using deconvolution to sharpen the spectra, but I don’t have a great deal of experience with deconvolution on noisy data.

All of that being said, it’s a great first prototype in a functioning state, and with plenty of potential for improvement!

In terms of cost, in small quantity the detector boards have about $20 of parts. If you’d like to use an external ADC, I’ve included a solder jumper to output the raw analog voltage on the CS pin, and this also reduces the cost in small quantities by about $10. The spectrograph can be made for the cost of printing, painting, plus the cost of the diffraction grating. I think the materials cost for me was probably less than $1.

Source Files:

The source files, including the Eagle files for the PCB, the Google Sketchup and STL files for the current spectrograph, as well as sample Arduino and Processing sketches (and example data, in CSV format), are available on Thingiverse. The code portions are released under GPL V3, and everything else under Creative Commons Attribution Share-a-like 3.0 Unported, both freely available without a warranty of any kind. If you’d like to order prototype PCBs from the same place I ordered them, the project is shared on OSHPark.com, with each set of 3 bare boards available for about $5. These revision 1 boards change very little compared to the boards pictured above — a few vias have been moved to help make the design more light tight, and I’ve added in a solder jumper for those who would like to use an external ADC.

Contributor TODO List:

The open mini spectrometer is an open-source hardware project. Want to contribute? Here are a list of near-term todo items:

Find a source of tiny inexpensive relay optics (~4mm dia, short focal length) that are repeatedly and consistently available in both small and large quantities

Design a better way of inserting and securely mounting the diffraction grating

Modify the spectrograph to include relay optics

Try printing the spectrograph using different materials. How does the slit hold up? Are there materials or methods where the slit is printed better (e.g. SLS? Inkjet?). Are there matte black build materials that do not require the spectrograph to be painted prior to use?

Use the mini spectrometer to measure a variety of known spectral sources, and post the data

Modify the pi filter for better noise rejection. A good deal of noise still appears to come through the USB port/Arduino and into the spectrometer, requiring a greater number of averages for a clean signal. Battery power should also help with this.

Handy at signal processing? (and, specifically, deconvolution?) Feel free to grab some sample spectral data from thingiverse and see if you can improve the PSf and effective resolution with some postprocessing.

The Science Tricorder Mark 5 contains the same footprint for the spectrograph, so for compatibility I’d greatly prefer to keep the physical dimensions and the mating portion of the spectrograph the same (unless there’s a compelling reason for change, of course).

Thanks for reading!