In Star Trek, it's possible to wave a tricorder in the general direction of something mysterious and have the instrument tell you exactly what it is. This DIY spectrometer kit for your smartphone promises to do nearly the same thing, and it'll cost you just $65.
A spectrometer works by breaking up the light that comes off of some material and looking for a signature in that light that can be used to identify the material. Really, it's just a fancy way of measuring the fact that every single thing is a slightly different color, and if you can look at a material or a substance in enough detail, you can use its color to figure out what it is or what it's made of.
The way a spectrometer does this is by spreading light out into a spectrum, and then measuring the intensity of the colors along as many points of that spectrum as possible. For example, something that looks purple probably has some more intense blue and red peaks in its spectrum, and less intense peaks in the green and yellow. What you end up with when using a spectrometer is sort of a graph of color, and by matching that graph to a database of known spectra, you can figure out exactly what thing (or things*) you're looking at.
There are lots of very fancy spectrometers both here on Earth and up in space doing some incredibly detailed analysis of everything from rocks to stars, but you don't need that level of precision for normal everyday spectroscopy. All you really need is a camera (like you have on your phone) plus a little box containing a slice of DVD-R disc to break up the light, like in the picture above. And this is the kind of result that you can get:
The tricky part to all this is being able to correlate a spectral signature like that with actual stuff, and the guy who came up with the smartphone spectrometer is Kickstarting a library of open-source spectral data. The idea is to make something that'll work like Shazam, except for stuff instead of music. You use your little phone spectrometer on whatever you want analyzed, then the spectrum gets be sent off to an online database and demixed if necessary, and finally — spectrazam! — your phone will tell you all of the chemicals or whatnot that you're looking at.
Of course, to get this to really work like a tricorder, it's going to need to be beefed up a little bit. With lasers. The latest Mars Curiosity rover knows where it's at: instead of just passively looking at light spectra, it uses a laser to vaporize stuff and then get a spectra that way.
So you know what that means: the next generation of the smarphone spectrometer must include a laser cannon. Must. For science!
*Looking at a bunch of different materials in one spectra can get messy, but a technique called spectral demixing can be used to figure out how many different things you've got going on, and what's what.