Using Sparkfun AS7263 NIR spectrometer for soil composition analysis

Hello! I’m using the Sparkfun AS7263 NIR with an arduino to do some basic soil spectroscopy. Everything’s wired correctly, the sensor is using the build in LED and is installed in a small black box. I want to measure the amounts of silt, sand and clay in a sample. To get starting data, I mixed the proportions of each into samples (70% silt, 30% sand) into a paper bowl, spread it out, and placed the sensor on top. However, the numbers for each wavelength I’m reading are very inconsistent on the same sample. I’m using the sparkfun provided code. How can I get these readings to stabilize?

You’d need to either characterize the samples first or provide pure samples to get predictable readings…measure sand by itself, soil by itself, then half-and half, etc

Try watching a youtube video covering basic spectroscopy use (or even better, one for this particular device!) and then you can follow our guide to learn how to manipulate the settings to gather the data you’d like

Thank you! I’ve taken the pure sample data, and data from samples with known ratios of composition. The strange thing is, the numbers change if the test is run twice on the same sample! Is that something you’ve encountered before?