24-06-2015, 16:08
Hi Zdenek
With great respect to your work, I still think that your formula will produce too low results.
Consider this situation:
The maximum value that we can get at the ADC1 variable, is 1023, which should correspond to a UV Index greater than 11.
Transmission factor of the cover = 1 (uncovered)
Using your formula:
IndiceUV = ((((1023 * 1 / 1 ) - 135.0) * 11.0) / 1024.0) ;
IndiceUV = 9.539
Even when the sensor reaches its maximum output voltage, we never get a UV index greater than ~9.5
I think I know where is your mistake. Your are considering, that ADC1 value corresponds to output voltage, but is only the raw output of the ADC (from 0 to 1023)
With great respect to your work, I still think that your formula will produce too low results.
Consider this situation:
The maximum value that we can get at the ADC1 variable, is 1023, which should correspond to a UV Index greater than 11.
Transmission factor of the cover = 1 (uncovered)
Using your formula:
IndiceUV = ((((1023 * 1 / 1 ) - 135.0) * 11.0) / 1024.0) ;
IndiceUV = 9.539
Even when the sensor reaches its maximum output voltage, we never get a UV index greater than ~9.5
I think I know where is your mistake. Your are considering, that ADC1 value corresponds to output voltage, but is only the raw output of the ADC (from 0 to 1023)

