simply put with Standard Deviation,
if you have 10 readings.
.30 .31 .31 .31 .31 31 .31 .31 .31 .31
your average is 0.309
if you have 10 readings
3 .01 .01 .01 .01 .01 .01 .01 .01 .01
the average is still 0.309
Standard Deviaion would be much different for the two data sets.
high concentration of readings around the average in the first
wide range of readings, low confidence that the numbers are near the average in the latter.
Since I am not looking for the average, but the greatest deviation from the 'not-running' value, the average is not as important. but you are correct that the standard deviation is little more than an 'interesting' exercise.
the fan might run for 4:02 minutes.
I sample every 2 minutes.
so, it would be possible that the fan could turn on,then sample1, sample2, sample3 and the fan goes off
sample would be 1, 1, 1
the fan might run for 3:58 minutes.
sample -then fan on -sample - fan off - sample. = 0, 1 ,0
in the first, the average is 3
on the latter, 0.33
in either event the average of the last 10 readings would not be more than half of the distance between running and off.
as for the sketch
// lowest value of fan ON = 0.08 and highest value of fan OFF = 0.03
deltaP = P1 - P2
if (deltaP <= .5){
deltaP = 0;
}
Serial.print(deltaP);
this would result in a very short and simple sketch.
the output would be 0 or some higher reading
I could just use OFF and ON
but since summer just started and I am just getting this together, and on-line data storage is free....
getting the actual numbers will offer some confidence in the future.
as a note, I also have a current sensor ready to put in.
my thoughts are that presence of power does not dictate movement of air.
I have had too many leaf/dust/pollen clogged inlets to trust just power.