AS726X NIR/VIS Spectral Sensor

Hello,

I want to measure the reflective of different objects using the AS726X NIR/VIS Spectral Sensor. However, I looked at the different examples and I see that the output is in some kind of unit (see attachment)? What is this unit and how do I convert it to a reflectivety scale between 0 and 1? Can someone please help me? Thanks!

Thomas

AS726Xdata.png

Hi Thomas.

The datasheet says the output numbers are “counts/ (μW/cm2)” and you can think of that as a measure of how bright or dark the reflected light at a particular wavelength is. If you wanted to convert that to 1’s and 0’s, you’d need to find the mid point in your readings and call everything above that a 1 and anything below that a 0.

The [data sheet for the AS7265x might helpful to have a look at too to get a better idea how these function.](https://cdn.sparkfun.com/assets/c/2/9/0/a/AS7265x_Datasheet.pdf)

Thank you for your reply! I have another question now that I am working with the board: is there a way to let the LED be on constantly instead of blinking, either for arduino code or python? Now I use the ’ sensor.takeMeasurementsWithBulb()’ command but than the led only goes on for a second and then turns off. For my measurements I need the LED to be on all the time.

It is possible to do that, but unfortunately we don’t have any sample code that allows for this.

If you look around in the library, you should be able to figure out what you would need to code to make that work.

Hi Chris,

As you said, the output is in “counts/ (μW/cm2)”. But how to convert them into Absorbance or Reflectance? That is the required output from a spectral sensor.

You need to calibrate the sensor. For each wavelength band, place a sample in front of it that has either 0 or 100% reflectance (or absorbance) at that wavelength, and note the outputs. Scale other measurements accordingly, using linear interpolation. On a 0.0 to 1.0 scale, using float values:

float reflectance=(value - min_reflectance_value)/(max_reflectance_value - min_reflectance_value);

Thank you for the reply! I have another question. Is it enough to use a mirror with 100% reflectance? And what should I use for minimum reflectance?

No idea about a minimum reflectance, but I don’t think a mirror that’s 100% reflective across a broad range of wavelengths exists.

I see. What am I supposed to use then?

A highly polished metal mirror and “first surface” glass mirrors are very close to 100% reflective at all wavelengths detected by that sensor.

For 0% reflective, pointing the sensor into a large, completely dark room should work.

Thank you for the idea. I’ll try them and update soon:blush: