Any experience with a Davis Pyranometer

Dear Leo

I would prefer to keep a 3.3V as analog reference and 12 as analog resoution. The wind direction work fine with 3.3V

The Sun radiation measure look nice but the anlog pin return alway a measure between 10 and 15, but mostly closer to 12 and 13.

I could choose an offset 11, or 12.

But I am a bit worrried about the difference 10-15, even if it's not a lot..

The seller say:

Intervalle de mise à jour : 50 secondes à 1 minute

(Update interval: 50sec to 1mn)
What do you means? I should wait about 50-60mn to take the next measure?
Do you know, when I power the Davispyranometer, IfI need to wait some time before taking the first measure?
I wonder, if I would better measure 10 times, the output of the pyrnometer and then take an average as for exemple:

int m=0;

for(int i=0; i<10;i++){
m = m+ analogRead(A0)
delay(100);
}
m = m/10;

In fact, there is somethings strange.

I measure 10 time

sunValue = 0;
    
    for(int o=0; o<10; o++){
      sunValue = analogRead(pin_readSun);
      Serial.println(sunValue);
      delay(100);
    }
    sunValue = sunValue/10;

The first measure was 12, but all the next are 27-2

12.00
27.00
27.00
27.00
24.00
25.00
25.00
27.00
26.00
27.00

Then my idea to measure 10 time, because the measure are in facte closer t0 24-26
I tried to take 20 times the measure and it print me again

12.00
28.00
26.00
29.00
30.00
27.00
28.00
26.00
30.00
26.00
27.00
23.00
28.00
25.00
23.00
26.00
25.00
26.00
27.00
27.00

as we can see the first is always the lowest, excepted if I add a delay(100) before the for loop.

I beleive the average is not a bad idea, isn't? Then the offset will be closer to 24-26

pierrot10:
I would prefer to keep a 3.3V as analog reference and 12 as analog resoution. The wind direction work fine with 3.3V

That's fine, if you accept some gaps in the readout and a readout varying with processor supply.
The advice given was to reduce/eliminate those things.
Wind direction, which you only seem to want in 16 (4-bit) steps, is less likely affected by variations.

You have to accept some zero offset drift. A pyranometer is not meant to measure moonlight.
Your display code could ignore anything below 15 or so.

If the sensor is slow (things take time to stabilize), there is not point reading it more often.
Averaging several readings, as in post#20, could still be beneficial.
Leo..

Edit:
Did you switch analogue input or Aref, and where in the sketch.
Then the first reading is invalid.

Hello,
Someone gave me a second Davis Pyranometer.
I first use it in a blackroom and the analog pin return about 450, while the first return about 23.
II choose an offset of 450 and I place it in the field.

I am very suprised about it behaviour. If look at the graph Smart Bud | Charts (first), the analog pin show 0 (blue line) during the days (in the black room (my bathroom), I mesured 450) AND during the night the analog incease and decrease when the day arrive.

It work at the opposite!!!!!
Secondly. do you have an idea why, in my bathroom the analog pin print 450, and when is under a cloudy night it show some value!!! A cloudy night can not be more dark than my bathroom!!!

Is the Pyranometer defect?

Additionally, I think my approch is wrong to calculate the W/m2.
If you look at that graph, this morning 10.2.2021 at 8:10, the analog pin mesure 60.

float f_sunValue = analogRead(pin_readSun); //Get a value between 0 and 1023 from the analog pin connected to the anemometer
  f_sunValue = analogRead(pin_readSun);
  delay(10);
  // read twice to avoid (The timing between the calls do not matter much, the question is how fast you read after switching the input of the ADC from one pin to another. )
  // Read #30 : https://forum.arduino.cc/index.php?topic=714834.30
  f_sunValue = 0;

  for (int o = 0; o < 20; o++) {
    f_sunValue += analogRead(pin_readSun);
    Serial.print(o); Serial.print(F(". ")); Serial.println(f_sunValue);
    delay(10);
  }
  f_sunValue = f_sunValue / 20;
  //Si.sprint(F("DEBUG fsunValue:"),2); Si.sprintln(f_sunValue,2);
  
  sunValue = (int16_t)f_sunValue;

sunValue printed 60.

Now, I calculate the voltage with a resolution of 12

float v1 = (3.3 / 4096.0) * sunValue;

which print me a value of 0.048V

I now need to convert that value in mV because the the pyranomèter mesure 1.67mV per W/m2

int mv = v1*1000; // Convert to mV
sunValueWm2 = 1.67 * mv;

sunValueWm2 should print 80W/m2

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.