Hi guys, Arduino beginner here!
I have a SENS-43UV sensor, connected to A2 pin on my Arduino Uno. The Arduino reads the sensor (reporting very low values indoors, ~5-6, but outdoors in the sun it was higher, 13-15, so obviously it reacts to sunlight).
According to the guys over at Build an Arduino UV Index Meter | DroneBot Workshop,
If you are using an UV sensor that will never give out over a volt under normal conditions you are actually wasting a lot of accuracy with the above arrangement. A range of 0 to 1 volt will only use the digits between 0 and 204, leaving 820 unused digits.
To address this, they suggest changing analogReference() to somewhere around 1 volt:
That way the entire 1024 bits of resolution will be available for your sketch.
However I use other analog sensors as well and would not like to change analogReference(). My question to you is, how can I convert the analogOutput of the sensor to corresponding voltages/UV indexes, even though it will admittedly not be as accurate?
UV1 – 227 mV
UV2 – 318 mV
UV3 – 408 mV
UV4 – 503 mV
UV5 – 606 mV
UV6 – 696 mV
UV7 – 795 mV
UV8 – 881 mV
UV9 – 976 mV
UV10 – 1170 mV (1.17 volts)
Usually it is a matter of multiplying like so:
sensorvalue * 5 /1024
is it not?
Any help would be greatly appreciated!