This is the existing calculation - I hope (used in both debug on the TX and in the RX) which appears to read high
// --- ADC1 is data from my UV sensor UVM-30A
const byte UV_Transmission = 100;
IndiceUV = ((avg_IndiceUV * 12.0 * (100.0 / UV_Transmission)) / 1024.0) ;
If I change the *12.0 value to *9.0 then the IndiceUV values fit almost perfectly with the UVM30A data sheet scale
// --- ADC1 is data from my UV sensor UVM-30A
const byte UV_Transmission = 100;
IndiceUV = ((avg_IndiceUV * 9.0 * (100.0 / UV_Transmission)) / 1024.0) ;
As an example 700*9*1/1024 = 6.1 - near perfect
Debug data with the above change - again pretty much bang on
Sending ID4...
ACD0 - SolarRad :545 SolarRad :745
ADC1 - avg UV : 937 Indice UV : 8.2
Sending ID4...
ACD0 - SolarRad :547 SolarRad :748
ADC1 - avg UV : 950 Indice UV : 8.3
Sending ID4...
ACD0 - SolarRad :548 SolarRad :749
ADC1 - avg UV : 954 Indice UV : 8.4
Sending ID4...
ACD0 - SolarRad :549 SolarRad :751
ADC1 - avg UV : 939 Indice UV : 8.3
Sending ID4...
ACD0 - SolarRad :550 SolarRad :752
ADC1 - avg UV : 934 Indice UV : 8.2
Sending ID4...
ACD0 - SolarRad :553 SolarRad :756
ADC1 - avg UV : 935 Indice UV : 8.2
Sending ID4...
ACD0 - SolarRad :555 SolarRad :759
ADC1 - avg UV : 934 Indice UV : 8.2
Sending ID4...
ACD0 - SolarRad :557 SolarRad :762
ADC1 - avg UV : 955 Indice UV : 8.4
// --- ADC1 is data from my UV sensor UVM-30A
const byte UV_Transmission = 100;
IndiceUV = ((avg_IndiceUV * 12.0 * (100.0 / UV_Transmission)) / 1024.0) ;
If I change the *12.0 value to *9.0 then the IndiceUV values fit almost perfectly with the UVM30A data sheet scale
// --- ADC1 is data from my UV sensor UVM-30A
const byte UV_Transmission = 100;
IndiceUV = ((avg_IndiceUV * 9.0 * (100.0 / UV_Transmission)) / 1024.0) ;
As an example 700*9*1/1024 = 6.1 - near perfect
Debug data with the above change - again pretty much bang on
Sending ID4...
ACD0 - SolarRad :545 SolarRad :745
ADC1 - avg UV : 937 Indice UV : 8.2
Sending ID4...
ACD0 - SolarRad :547 SolarRad :748
ADC1 - avg UV : 950 Indice UV : 8.3
Sending ID4...
ACD0 - SolarRad :548 SolarRad :749
ADC1 - avg UV : 954 Indice UV : 8.4
Sending ID4...
ACD0 - SolarRad :549 SolarRad :751
ADC1 - avg UV : 939 Indice UV : 8.3
Sending ID4...
ACD0 - SolarRad :550 SolarRad :752
ADC1 - avg UV : 934 Indice UV : 8.2
Sending ID4...
ACD0 - SolarRad :553 SolarRad :756
ADC1 - avg UV : 935 Indice UV : 8.2
Sending ID4...
ACD0 - SolarRad :555 SolarRad :759
ADC1 - avg UV : 934 Indice UV : 8.2
Sending ID4...
ACD0 - SolarRad :557 SolarRad :762
ADC1 - avg UV : 955 Indice UV : 8.4
41south.net.nz powered by WeatherDuino and Weewx

