Close

Normalized spectra...

A project log for Compact, $25 spectrometer

AMS's new AS7265X 3-chip set promises a compact, 18-channel, 20 nm FWMH spectrometer for less than $25

Kris WinerKris Winer 05/28/2018 at 19:012 Comments

28 May 2018

Like a kid with a new toy, I could not resist testing the spectrometer out on various targets.

First, I soldered headers onto the board and mounted it on a breadboard along with a small Arduino-programmable (Ladybug) STM32L432 MCU:


I tested out the led controls a bit more and found that by default the top and bottom source leds are off. So I played around with turning them on and testing whether the spectrometer could "see" them. I think the 850 nm leds I bought simply do not work. I have never gotten a signal from the 850 nm when the led was supposed to be on. The 940 nm led does work and I experimented with different current drives up to 50 mA. My MCU board has a 150 mA LDO so I don't want to press things too much. The broad band (5700 K, 90 CRI) led (yellow square thing on the AS7265X board) defaults to 100 mA as far as I can tell. I must say, the AT commands are somewhat cryptic and I will have to do a lot more experimenting to make sure I understand how to use the led sources correctly. It would help if I could actually see the leds!

I programmed the button to turn on the broad-band source, then take a spectrum, then turn off the broad-band source, kind of like flash photography. It sort of kind of works, but there are latency issues due to the relatively slow serial interface and I don't always get a clean 18-channel spectrum. Sometimes the leading or lagging channel is missing or mixed up with OKs and other AT command activity. But it is usable, and I can simply position the breadboard over an object, press the button like taking a picture, and read off the 18-channel data from the serial monitor. Still a bit clunky but eminently usable.

I did a little more measuring with this rig held a few centimeters from each object:

The white paper spectrum is again basically the spectrum of the broad-band source (plus the 940 nm led I think). When applied to various household objects, the absorption of the objects changes the spectrum recorded by the spectrometer. So flourescent green paper absorbs strongly in the blue but not much elsewhere. The banana and red pepper absorb strongly in the blue and between ~600 and 700 nm. Definitely different and distinguishable.

I think the right way to plot such data is by correcting for dark current and normalizing by the white paper spectrum. We basically want to know how much of the source light is reflected back, and it makes sense to plot the reflected spectra of our test object as a ratio to the reflected spectra from a quasi-ideal (white paper) reflecting object. The dark current is zero, at least that is what I measure with the broad-band illumination off at these gain (2) and integraton time (100 ms) settings.

I have color coded the spectra to approximate the colors of the objects (clever, no?). What we see is that florescent green paper reflects light uniformly from ~500 to ~800 nm; it is the absence of blue and the presence of light from ~650- 700 nm that accounts for the flourescent green apparently. The banana and red pepper both have a similar spectrum with double peaks at ~600 nm and ~750 nm, what we see is determined mostly by the first portion of the spectrum. The banana has nearly equal parts of green (560 nm), yellow (585 nm) and orange (610 nm) components so looks yellow to us, while the red pepper is mostly yellow (585 nm) and orange (610 nm). The peaks at 705 - 730 nm nm dominate in both spectra (typical human visible light sensitivity is 390 - 700 nm) and accounts for the dominant red color of the pepper.

Of course, human perception of color intensity varies as well. I am not trying to rigorously analyze these results or claim we can "predict" the color of objects by this kind of spectroscopy alone. I just claim that the results are plausible. In other words, the spectrometer seems to be working.

We can draw a couple of conclusions from this limited application of the AS7265X spectrometer. Firstly, it can and does work as an integrated 18-channel spectrometer without special optics or inordinate fuss. Secondly, it can distinguish between objects of different color. I will admit that now that I have 18 channels, I want more. The difference in color between a banana and red pepper is really due to the difference in a few channels (in particular, 555 nm and 705 nm). So for visible colorimetry this might not be the best choice of sensor since almost half the 18 channels are outside of the normal visible range.

But the promise of this spectrometer (apart from being a hoot to use) is to identify unknown materials. Can it really do this? I will be looking into this next...

Discussions

Sarah Gildein wrote 06/07/2018 at 09:46 point
Nice blog. I am anticipating your next blog and I will beyond any doubt take after this sort of blog. Essays are utilized as an appraisal instrument to assess your capacity to inquire about a point and build a contention, and also you're comprehension of subject content. There are great deals of service https://www.dissertationcapital.com accessible you can pick one of the website.

  Are you sure? yes | no

zogzog wrote 05/29/2018 at 19:05 point

Hi, you might be able to see your IR leds using your smartphone camera.

  Are you sure? yes | no