RS Student Project: A low-cost portable VIS/NIR Spectrometer
We are a team of three Electronic Engineering students from the University of Glasgow who are working with Dr Vincenzo Pusino to develop a low cost spectrometer operating in both the visible light (VIS) and near-infrared (NIR) ranges.
Recent developments in the field of food quality have seen the growth of advanced spectrometry applications to determine food integrity and reliability. Industry-grade spectrometers used for food integrity analysis typically operate in the visible and near-infrared band (VIS/NIR). The high market value of existing solutions, alongside their tendency to come in larger, bulkier iterations, prevents wider demographics from appropriately assessing the quality of their products and samples. In this project, the development of a low-cost, handheld VIS/NIR spectrometer was carried out. The final iteration of the spectrometer was designed to include both reflection and transmission features via a removable board with LEDs attached to appeal to applications of both contexts.
Project Overview
This project is based around the Raspberry Pi RP2040 microprocessor (221-1611) with the AS7265x Spectral Sensor from AMS-Osram. These components were selected mainly due to their cost, but since these are widely accessible components, it helps in development of a reproducable product, available for all.
The AS7265x Triad module from Sparkfun was used for initial development which connects to the RP2040 via I2C. Utilising the example C++ code provided by Sparkfun, a program was developed to take readings from the spectrometer and display them in a user-friendly manner. This data is then analysed to find the dominant wavelengths reflected or transmitted through the sample so that the colour can be discerned. With the colour of the sampled fruit obtained, this will allow us to determine the quality of the piece of fruit.
In order to display this information to the user, a 2.13" E-Paper display was selected because of its high "pixel" density and low power draw. Since this device is intended to be convenient to use in the field, where larger conventional spectrometers would not be of use which requires a small size, and long battery life. The nature of an E-Paper display means that when the display isn't actively updated, it uses negligible current with the image being retained on the screen, visible in sunlight. However the downside to this is the long refresh times (300ms for a partial refresh or 1.5s for a full refresh) and lack of a backlight, making the device harder to use at night.
Challenges and Solutions
Initial testing involved using a cheaper alternative (AS7341) to the AS7265x which had a reduced wavelength range, which limited the potential uses of this device. With funding from RS, it was possible to switch to the AS7265x which gives much greater granularity in its readings with a wider range of wavelengths.
Initially, this project was to utilise micropython for its codebase, however with Arduino being such a popular standard, much more example code was available in C++. Switching to C++ on the RP2040 allowed using this example code to greatly decrease development time of a prototype while also being accessible to those familiar with Arduino hardware already.
A preliminary PCB was manufactured in-house at the University, but it was found that this would need to be very large and cumbersome to work with, which goes against the portability requirement of the device. With RS funding, we were able to design and purchase a more complex PCB with surface-mount components, which greatly reduces the footprint of the device. Reducing the size of the PCB and using an accessible third-party PCB manufacturer also helps the reproducability for other users such as hobbyists, small universities, or industry applications.
Conclusion
As of now, a working prototype has been developed, but with weeks still to go and the final PCB to be delivered, there is still much left to do, but it is still on track. What remains is to test the PCB once it arrives and integrate the spectroscopy into the user interface.
We envision this project being revolutionary for being an accessible, open-source solution to give an entry-point into VIS/NIR spectroscopy and allowing analysis for simple VIS/NIR applications.
Comments