Tiny $25 Spectrometer Aims To Identify Materials With Ease

Reflectance spectrometers work on a simple principle: different things reflect different wavelengths in different amounts, and because similar materials do this similarly, the measurements can be used as a kind of fingerprint or signature. By measuring how much of which wavelengths get absorbed or reflected by a thing and comparing to other signatures, it’s possible to identify what that thing is made of. This process depends heavily on how accurately measurements can be made, so the sensors are an important part.

[Kris Winer] aims to make this happen with the Compact, $25 Spectrometer entry for The 2018 Hackaday Prize. The project takes advantage of smaller and smarter spectral sensors to fit the essential bits onto a PCB that’s less than an inch square. If the sensors do the job as expected then that’s a big part of the functionality of a reflectance spectrometer contained in a PCB less than an inch square and under $25; definitely a feat we’re happy to see.

59 thoughts on “Tiny $25 Spectrometer Aims To Identify Materials With Ease

  1. “The project takes advantage of smaller and smarter spectral sensors to fit the essential bits onto a PCB that’s less than an inch square. If the sensors do the job as expected then that’s a big part of the functionality of a reflectance spectrometer contained in a PCB less than an inch square and under $25; definitely a feat we’re happy to see.”

    Put those sensors in phones and one will improve citizen science and field medicine.

    1. This process depends heavily on how accurately one can define a library of materials. The best sensor ever is useless without a way to translate the information measured into actual results. How easy is it to extract information that is messy? Meaning it is very rare that you sample only one substance at a time. How well would it handle something as complex as say a muffin or even a drop of blood?

          1. Qualitative, requiring pure sample, or Fourier Transform, Subtractive etc. for Quantitative as well? I”m working on $75 capillary chromatography

      1. Not the person you’re replying to, but I’d guess they are referring to Mass Spectrometry which is different from using reflected light.



        Although as wikipedia notes, “The term mass spectroscope continued to be used even though the direct illumination of a phosphor screen was replaced by indirect measurements with an oscilloscope. The use of the term mass spectroscopy is now discouraged due to the possibility of confusion with light spectroscopy.”

      2. A spectrometer has an optical dispersion element to produce a spectrum – spread out light by wavelength.

        There are also more time domain spectrometers that use interference, like the Fabry-Perot Spectrometer based on their etalon, or the Fourier Transform Spectrometer based on a Michelson Interferometer. These require a moving mirror.

        A thing with or without a filter is a photometer. It measures the brightness of a surface or the transmission through a medium. (or a light meter as in photography – incident or reflected).

        When someone hacks together a nice spectrometer with slits and a grating and the linear array from a scanner, what are you gong to call that? By the way, it is probably nearly as easy as this project and you can get a couple thousand points on the spectrum with at once, with 12 bit data or better.

        This is a fine project, just call it a photometer. I made something like it in the ancient past for color blind people to sort and shop for clothes.

    1. Makes a lot of difference depending on what you are trying to detect. This is a “Reflectance spectrometer” which will work best when the object under analysis is bathed in light matched to the sensitivity of the (filtered) photodetectors. The chemical makeup of the test object will determine how much of the light is reflected or absorbed, and a catalog of specific spectral responses of known materials can be built up to allow identification of many unknown ones.
      Getting a good light source to use with those detectors is going to be half the battle. I wonder if the same detectors could be used in emission or absorption spectroscopy.
      Write up could have been a little more detailed.

        1. You need something that has a broad consistent output over a wide range of wavelengths. Usual thing is to tailor the signal amplification to be consistent with the output of the source.

          1. Or just flatfield it with a white spectral target (use teflon if you are on a tight budget).

            As a hyperspectral imaging tech, id like to point out that doing chemcial analysis on this, is HARD. First off, metamerism is still a thing, you cant really detect different plastics reliable with the visable light range.

          2. The system in the youtube video is covering into the mid IR range with the MEMS-FPI sensor, though the AMS looks like has spectral data for the whole Vis range and not the whole NIR range. Isn’t easy… though isn’t that hard I thought from my hyperspectral imaging experience using NIR spectra. Even neater is FTIR microscopy. Isn’t their some sort of spectral intensity background like with a 99% reflectance std or are you performing remote sensing hyperspectral imaging without a target are reflectance standard to account for environmental transmitter source?

    2. Technically it’s a multi point (18) photometer that is emulating a lower resolution photo-spectrometer and not actually a high resolution photo-spectrometer.

      The difference being that it takes point samples and not the entire spectrum.

      You simply couldn’t make a true Visible Light/Infra Red photo-spectrometer on this budget.

      The word Spectrometer is being loosely overused now. Examples of “Spectrometers” are –
      Mass Spectrometer.
      Gas Spectrometer.
      Light Spectrometer.
      Photo Spectrometer.
      (RF) Wave Spectrometer.

      So the word “Spectrometer” has little meaning by itself.

      1. Spectrophotometer would be more accurate I’m thinking. Interesting how the interpolation and frequency correction algorithms can level the signals out. I haven’t read into the sensors specs yet. Will do however, looks interesting.

      2. I could not see anything about the optical path. A spectrometer will be dispersing the light from a point or slit so that all the data is coming from the same physical source.

        With this device I can guess you use a large physical sample and very even illumination, or a small aperture and light shinning through a sample with the aperture pressed against the sample so the sensors are evenly illuminated?

  2. This kind of reads like identify stuff by checking it’s color.

    Is this better than feeding light from the object (reflected or emitted) through a prism, into a camera and using software to identify and measure all it’s spectral lines? I would have thought that would be better than simply measuring the amplitude at 18 different fixed wavelengths. It also sounds totally do-able with a Raspi and a camera.

    Or am I only thinking this because most of my knowledge of spectrum analysis is from reading astronomy books when I was a kid that were probably dated then and are definitely outdated today?

    1. The size is the key to this project.

      Not most likely… though maybe.

      You are correct, like using a histogram method or if you have enough volume for the spectrophotometer and if you use a slit and diffraction grating or another method to image the dispersed spectra.

    1. I was waiting for that to be mentioned. I told a scientist friend about the SCiO when they launched and she just sighed and said “it doesn’t work like that” – fundamentally I believe you can’t really build a library of materials and have it identify them, usually they use spectrometry against a known substance or sample and try to measure purity / contamination / chemical makeup (proportions of known ingredients).

      Doing it “in reverse” against an unknown sample is like trying to write an accurate recipe from a mouthful of unknown food. You might get a few things kinda-right but not to any useful degree.

  3. if it could “only” detect metals, there’s a large market of scrappers out there who would love a low-cost device. Current offerings start at around 20.000 USD or so I’m told.

    1. I’m confident someone could pick up a few commercial off the shelf lasers to test and see about a laser ablation like atomic absorption or emission spectrophotometer since that seems more cost effective and safer than an X-Ray or Gamma Spectrometer.

      I’ve also wondered about RF range like a magnetic resonance spectrometer or electron paramagnetic/spin resonance spectrometer. The later two would be larger in size and the laser ablation may be made to be smaller. I may be wrong if the antennas can be miniaturized. The lower frequency wouldn’t require the larger magnets if I understand correctly and more sensitive antennas I think would detect at a higher or room like temperature.

        1. NMR takes a strong magnetic field and then a small RF coil around the sample, plus more coils for tweaking the field from the primary magnet.

          The ablation I think depends on enough energy to generate a plasma and therefore, emission spectra. But the emission lines are narrow and often with important ones very close together. This device can’t resolve emission (like gas discharge) or absorption (like stellar) spectra, which is why it is a photometer.

          And just to throw it in here, a mass spec needs a vacuum, and an electric field to accelerate fragments of molecules and a magnet to act as a prism for charged objects in the standard instrument. Charge hitting a target forms a detection current and the accelerating potential or the magnetic field are varied, or the target is moved. It can go quite slowly if need be and is often fed samples from a gas or liquid chromatograph (HPLC) to pre-sort molecules by size. The mass spec does not need a computer.

          The other form of mass spec is the time-of-flight model which uses an electric field and a long tube in which more massive fragments will be accelerated more slowly. A quick burst of date comes out from a very small sample. It is pulsed and added up to get enough signal, and is fast. It trades higher speed electronics in exchange for eliminated the magnetics. If it doesn’t use a computer, it needs something like very high-speed analog oscilloscopes with storage displays or Polaroid cameras.

          1. Right, good call. I was thinking more inline with alternate devices instead of using XRF that would be hackable with COTS materials or maybe even a potential system that is more compact and suitable for testing for consumer use by scrappers and maybe to get more buy in… environmental testing too for metal in water or food or drugs I guess.

            Amazing what the people have for potential with open source ideas when improvisation skill and ingenuity combine to create something that either someone hid for proprietary purposes to own market share or never thought of doing or never marketed what they were doing. The Internet sure does bridge gaps in communication either way.

            In regards to NMR, I was thinking like zero field or really more logically earth field NMR, though you don’t see that too often:

            There are a few earth field NMR methods that are demonstrated online if you do a search:

      1. ~10yrs ago I saw a device the size of a battery powered drill, which produced electrical sparks to the target and displayed the metallic composition of this sample. I expect, that it somehow measured the light emission spectrum of these sparks. So not laser ablation (only usable for metallic (conductive) samples, but similar.

        1. There are arc spectrometers I forgot to mention that are like I noted in another comment and like you note of the atomic/optical emission. My understanding is different patent or trademarks and have to read into to verify. We did use those when I worked at Bosch. I forgot… it’s been so long… Someone may have miniaturized also.

        2. I saw on a TV show a few years ago a device used by metal recyclers to sort/classify metals. It had a shielded radioactive source and a window that was opened by the press of a trigger. The device then measured reflectance an or absorption giving a readout about the metal, it could distinguish between various alumin[i]um alloys. That allowed the recycler to isolate more expensive alloys.

  4. With the few spectral lines and limited IR coverage this thing can dissociate well characterized and homogeneous things. It is utterly useless to characterize anything to a useful degree outside of a tightly controlled lab environment.

  5. More details of construction and intent at the Hackaday.io link, but this is an 18-channel photospectrometer made up of three separate 6-channel sensors that use narrow band (20 nm) filters to affect the spectral resolution. I am using a 5700 K 90 CRI broad-band source plus 850 nm and 940 nm led sources to illuminate the target samples. The photospectrometer measures reflected light from these sources (and other if not careful) and results in a 18-point or bin spectrum of reflected light in terms of counts versus wavelength (400 – 950 nm), where each point or bin is at a fixed wavelength.

    There is a cool video (https://www.youtube.com/watch?v=y6ccmh24BXw) of the device being used to identify materials produced by AMS, the maker of the spectrometer. Can the device really tell sugar from rice flour? I don’t know yet. But it is worth $25 to find out!

    1. The demonstration wasn’t real? Seems with chemometrics and the correct processing with a spectral library can. Not sure how well as I still need to read more into though does look like there is some form of spectra digitization to interpolate the spectra. Most didn’t believe the FT-NIR system I implemented for a bunch of materials could work. Then I found USGS and JPL data that proved can… and I did for ID at least and some qualitative methods also. I didn’t personally do the hands on work for quantitative analysis that was never implemented. I’m thinking can be also with FT systems. Not sure with this system… though maybe and appears to be more for qualitative range versus an accurate FDA validatable equivalent or better than compendial method say for potency and purity.

    2. Very good answers. Thanks. I was hoping for a CRI of 95+, but thay gets expensive fast.
      The very big question I see is how are you eliminating other light sources from adding variants in the measurement if you are keying to 5700K?
      This would be a Godsend in my world of dentistry.

      1. To the underinformed, CRI is how true in band replication a light source is to sunlight at noon without clouds. 100=pure perfect replication, and is unobtainium. 98 is the highest mass produced source I’ve ever seen for sale.

      2. 5700 K 90 CRI at 100 mA is very bright, I can’t look at the led when it is on for the same reason I can’t look at the sun. That said, I think this photospectrometer would best be used in a fixture tha would ensure the same standoff from the target sample as well as keeping stray light out. It’s really the stray light reflected off of non-sample objectsthat is the problem. I am using a toilet paper tube, and this seems to work pretty well. Ideally, (if I had a 3D printer), I would print a suitable fixture.

    3. Why not use an incandescent or a Xenon flash? It is easy to get a continuous source that way. And you can compute the shape of the output spectrum or just measure once and normalize. The flash would be the way to go. IIRC tungsten-halogen has a CRI of 100 exactly. Strobes are more like 6500K but have nearly equal R G and B, which would be handy for this application. I don’t think quartz tubes are used in strobes for the light: quartz transmits UV very well but who needs it for visible light? Quartz I think is for strength and heat and reliably fuzing electrodes.

      1. Of course, one could add cost and complication to the spectrophotometer to gain higher resolution and what not. But the idea is a small, inexpensive (essentially disposable) device that is good enough for some applications.

        As an 18-channel, 20 nm FWHM 400 – 940 nm spectrophotometer (or photospectrometer) it is well worth the <$25 cost just by being fun to use.

        If it really can be used to distinguish/identify even a handful of common materials, this might have many real world applications.

  6. If i can use this to sense the 9 types of asbestos without having to sample and stick it under a microscope I will be a really happy person. At the moment checking to see if something has asbestos in it is a pain in the rear and chews up so much time.
    At the moment if i go on to a site and find something that resembles it we have to shut the site down and take samples then wait for days for a result.

      1. lol :) Until the shed catches fire because the DIY nuclear reactor we were building in there from old smoke sensors got away on us and the binder in the asbestos exploded causing the fibers to cover everything then the demotion team comes in and pulled the frame down causing the fibers to fall in to the ground and end up washed in to the water table and in to our bore water.
        All hypothetical of course because who these days has the energy to drill a bore.

  7. I think some of the comments here are overly optimisic regarding the resolution and capabilities of these devices. And several of the other commentors correctly point out limitations and improvements.)

    There are significant gaps in the spectral response of the devices (you might fail to differentiate between two substances if a key signature wavelength falls in a gap).

    Also, the response bandwidth is rather large (lots of overlap).

    Further, while the sensors have a light acceptance angle of 20-degress, the interference filters incorporated on the device surface are particularly sensitive to angle. This usually implies the need for collimating optics. Even the LEDs themselves tend to have angle dependent spectral output (due to phosphors).

    It’s a long datasheet, so there’s still more to explore.

    (I think the project author is being realistic. But I also think this hackaday.com article is a bit of click-bait to drive readers to the unbridled mess that is hackaday.io )

  8. Does this spectrometer can identify a strange object in my forehead(big enough microchip) somehow and tell me the exact location using any software combination or any other combination please?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.