- Thu Aug 21, 2014 7:58 am
#173941
I'm working on a project where I want to use the Sparkfun UV Breakout Board, a Redboard, and a 16x2 LCD to report ambient UV radiation. I have everything prototyped up and it's functioning. However, the UV readings are fluctuating a bit and I'd like to smooth out the readings to achieve a +/- 0.01 mW/cm^2 precision.
The first way I smoothed the data was to increase the averaging rate from 8 samples to 75 samples for the sample code (https://learn.sparkfun.com/tutorials/ml ... okup-guide). This yielded an increase of precision from ~0.5-0.7 mW/cm^2 down to +/- 0.1 mW/cm^2. Ideally I'd just keep increasing my averaging sample size, but anything higher than 95 samples in the averaging routine spits out highly erroneous data.
Thus, I believe I need to add a RC circuit to smooth out the readings between the OUT pin of the sensor and A0 on the Redboard. However, I am still learning and am uncertain how to size the resistor and capacitor to smooth the voltage readings further.
Here is the datasheet for the UV Sensor: https://cdn.sparkfun.com/datasheets/Sen ... 3-8-13.pdf
And here is the Sparkfun page on that sensor: https://www.sparkfun.com/products/12705
Could someone provide assistance on how I should proceed to smooth out the voltage fluctuations? Thank you in advance!
The first way I smoothed the data was to increase the averaging rate from 8 samples to 75 samples for the sample code (https://learn.sparkfun.com/tutorials/ml ... okup-guide). This yielded an increase of precision from ~0.5-0.7 mW/cm^2 down to +/- 0.1 mW/cm^2. Ideally I'd just keep increasing my averaging sample size, but anything higher than 95 samples in the averaging routine spits out highly erroneous data.
Thus, I believe I need to add a RC circuit to smooth out the readings between the OUT pin of the sensor and A0 on the Redboard. However, I am still learning and am uncertain how to size the resistor and capacitor to smooth the voltage readings further.
Here is the datasheet for the UV Sensor: https://cdn.sparkfun.com/datasheets/Sen ... 3-8-13.pdf
And here is the Sparkfun page on that sensor: https://www.sparkfun.com/products/12705
Could someone provide assistance on how I should proceed to smooth out the voltage fluctuations? Thank you in advance!