Close
0%
0%

Compact, $25 spectrometer

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

Similar projects worth following
Designing and building an inexpensive spectrometer just got easier with AMS' new 3-chip AS7265X smart spectral sensor; once this is working, building a modern tricorder should be a piece of cake!

AMS makes several interesting sensors including the CCS811 air quality sensor which I use in my STM32 Sensor Tile project and the AS7262 6-channel light sensor, which appears now in a breakout board that Adafruit has just announced. The AS7262 offers six channels in the visible (430 to 670 nm) with 40 nm FWHM resolution. There is also another similar AMS sensor the AS7263 which offers six channels in the near IR (600 - 870 nm) with 20 nm FWHM resolution.

I was thinking of designing a simple spectrometer out of these two by combining them onto one pcb. The problem with this idea is that they both have the same I2C address, so I would have had to use an I2C multiplexer. Then there is the problem of syncing the data conversion and read times to build a proper 12-channel spectrum. These are both manageable problems and I was looking forward to working them out when I discovered, in a way, AMS had already beat me to this idea.

It should be no suprise that AMS thought of combining sensors with different filters (this is how they achieve the relatively narrow 20 nm spectral resolution) just as I did. But they did it right, equiping one of the sensors with a master I2C bus to allow management and proper syncing with the other two. Yes, that's right, in the 3-chip AS7265X set AMS has come up with (AS72651 as master, AS72652 and AS72653 as slaves) there are now 18 individual channels spanning the 410 to 940 nm range with 20 nm FWHM resolution. The full 18 channels can be read out after two conversion cycles (minimum conversion time is 5.6 milliseconds). The sensors can also control indicator leds as well as source leds for illumination to match the spectral response of the sensors.

The idea here is that the resultant device 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.

In the initial design, I have chosen one broad spectrum 5700 K 90 CRI led and two IR leds (one peaked at 850 nm and one peaked at 940 nm). The idea is to gather an 18-channel spectrum using the broad band illumination, then again using one or both IR sources. The latter will provide the signatures needed to distinguish and identify organic compounds and analyze plant and animal matter, whether in the wild, in the garden, or on the dining table.

The pcb itself has been designed to be as compact (18 x 19 mm) as possible while remaining easy to assemble, aesthetically pleasing, and functional.

I still have several problems to solve. The master (AS72651) requires that firmware is loaded onto the connected SPI flash memory. I am still not sure where to get the firmware, how to load it, and even whether this needs to be done through the SPI port (which I did not expose to the board edge) or via I2C. Also, I do not know if the master bus requires pullup resistors (this is required on the EM7180 master bus, but not on the MPU9250 bus, so I added them to be sure). I also can't find the three chip set for sale anywhere. Lastly, I think the reference design in the AS72651 data sheet has several obvious errors but it is hard to be sure. I have sent AMS e-mail with my questions and thoughts about the reference circuit but haven't heard a peep yet. I ordered the AS7265X evaluation kit ($130) so I will at least have a working version to examine and start the Arduino sketch development.

This promises to be a fun and very useful project which should result in a tiny 18-channel spectrometer capable of forming the basis for my (or anyone else's) modern tricorder.  

The project is all open source (at least my part is) so anyone should be able to copy it once I get it working. The best part is the total cost (once I do get the bugs out...

Read more »

vsmy1850.pdf

850 nm IR led data sheet

Adobe Portable Document Format - 144.05 kB - 04/19/2018 at 03:46

Preview
Download

vsmy1940x01.pdf

940 nm IR led data sheet

Adobe Portable Document Format - 157.60 kB - 04/19/2018 at 03:46

Preview
Download

spectrometer.BOM.xls

BOM spreadsheet

Microsoft Excel - 12.50 kB - 04/19/2018 at 03:37

Download

AS7265X.v01a.zip

EAGLE design files and gerbers

x-zip-compressed - 118.60 kB - 04/19/2018 at 03:16

Download

AS72651_DS000531_3-00-1.pdf

Data sheet for AS72651

application/pdf - 945.60 kB - 04/19/2018 at 03:07

Preview
Download

  • More thoughts on DemoBoard and pcb redesign

    Kris Winer3 days ago 0 comments

    April 23, 2018

    I didn't appreciate it at first but the UART interface via FTDI connector that is the default with the DemoBoard allows the sensor to work without an MCU. The AS7265X sensor set is configurable by the AMS-supplied GUI with which the data can be captured and stored for later plotting. This is a pretty convenient way to use the spectrometer.

    I intend to use an MCU and set the I2C interface as default on my spectrometer design. But I should be able to also make it work with the FTDI connector by simply connecting the I2C enable (CEN on the board) to GND and using SDA/SCL as UART RX/TX. We'll see if the pullups get in the way.

    One thing I learned from the DemoBoard is that exposing the SPI port to load the required firmware onto the SPI flash is needed. There is some discussion in the AS7265X data sheet of loading firmware directly via I2C to the AS7265X. I think this is for the case where there is no SPI flash and the firmware needs to be loaded to the sensor from the host. But I don't know. I was hoping I could load the SPI flash with firmware by this method, and I might still be able to. But I decided to redesign the pcb to add the SPI port just in case this doesn't work.

    I still haven't gotten an answer to my queries from AMS. I might just have to copy the firmware from the SPI flash on the demoboard. The AS7265X chip set won't become available for purchase until mid-May which should be just around the time I get these boards back from OSH Park. So I hope to have a working design by then...

  • First AS7265X Spectrum

    Kris Winer5 days ago 2 comments

    04/21/2018

    I received the AMS DemoBoard yesterday and started playing with it. Curiously, it has a device marked AS7263 where I expected the AS72651 to be. Maybe these are the same device. They both have the same spectral response, but maybe only the AS72651 has the extra I2C master engine in it. Don't know. I have asked AMS in an e-mail.

    There is a flex connector to interface with the 4 MBit Adesto flash, which has the firmware, not very useful for firmware copying, which is maybe the point. No firmware came with the extensive documentation on the included USB thumb drive.

    You can see the big solder pads for adding source leds. The tri-foil arrangements of the sensors is pretty nice; this means all three sensors will see the reflected light emitted from the object. This will be hard to replicate on the small board I chose so it might be worth increasing the board size just for this arrangement, which seems ideal.

    After I realized I needed to use the USB cable that came in the kit to connect to the board (the cable has a built in FTDI connector) I was able to quickly and intuitively gather my first data. I took a continuous set of ~25 samples, saved the data to a file and imported the data into an open office spreadsheet. I couldn't figure out how to plot it easily so I just hand-typed in one of the sample sets versus the bin wavelength:

    This was with the three sensors pointed at the window looking outside in bright sunlight. The peak at ~550 nm makes sense since the dominant color is bright green reflected off of the sun-lit oak trees. But the largest intensity is at ~760 nm, deep in the red. There is one of those digikey red rulers in the field of view. I also made no attempt to correct for dark current, etc. Just wanted to see 1) if the three sensors worked and 2) what kind of data I could expect. So far so good. Now I just need to buy the three sensor ICs, obtain and load the firmware, and I should be able to get my board to do the same.

View all 2 project logs

Enjoy this project?

Share

Discussions

Kris Winer wrote 04/19/2018 at 00:39 point

@david.bradley469  Well, first things first, I need to get it built and working. I have no doubt i will eventually, after all AMS makes a dev board that more or less already does just what my design does. Assuming I can find the parts for sale, find and load the firmware, and correct any design errors in my pcb i expect to have a working spectrometer in the next few weeks.

Then yes, let the fun begin!  I expect to be able to analyze all kinds of things I am interested in. But the whole point of a $25 spectrometer is anyone and everyone can build or buy one and use the analyzer to study whatever they are interested in. All those interested in cancer research will be enabled and empowered to do as you suggest. But just imagine all of the other equally interesting and important secrets that can be discovered when this inexpensive but powerful device is in general circulation.

I have longed for a low-cost, practical tricorder. Inexpensive mems sensors like the BME280, CCS811, MPU9250, VEML6040, etc, MCUs like the STM32L4, plus this AS7265X spectrometer will go a long way toward that goal.

What a wonderful time we live in!

  Are you sure? yes | no

david.bradley469 wrote 04/18/2018 at 19:15 point

Kris:  If you integrated this with a microscope with a moving mini table, it could be used for analizing tissue and blood samples for cancer screening!  You could make a big difference in the world for the poor all over the world!

  Are you sure? yes | no

Robert Mateja wrote 04/18/2018 at 10:24 point

Ok, I'v seen datasheet.I was under impression that for absorbance measurement it is necessary to select specific excitation wavelength and measure behind cuvette.Chip has led drivers so it is a matter of matching right source.Now I get it, best wishes with project!

  Are you sure? yes | no

Robert Mateja wrote 04/17/2018 at 16:29 point

What do you plan for beam separator rotating prism or diffraction gate? In DIY some projects use cd/dvd for this purpose in vis.I bet dedicated sensor can beat CCD with openCV, nice project!

  Are you sure? yes | no

Kris Winer wrote 04/17/2018 at 18:15 point

Not sure what you mean. Each source led is independently driven. I can collect spectra from all three sensing engines with none, 1, 2, or all three sources on and I can do the same with any one sensing engine. I don't think there is any need for a beam separator. Why would you think so?

The sensing engines contain six filters each which serves to separate the reflected light into the respective 3 x 6 frequency bins. No additional separation is required.

It still remains to be seen which is the best source frequencies (whether one broadband and two IR are optimum) for general use, and whether some combination might be best for specific uses. Lots of experimentation is still TBD.

Thanks for the like and follow!

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates