Useful references
I found this reference ("Variation of outdoor illumination as a function of solar elevation and light pollution") which has plots of dawn/dusk light intensity:
https://www.nature.com/articles/srep26756#f2

So there is a big difference between rural dawn and dusk (3 to 4 degrees!) but less for city dawn and dusk (about a degree). This will cause problems!
Another reference (http://stjarnhimlen.se/comp/radfaq.html) had a sun Lux data set covering 90 degrees down to -18 degrees altitude! For -6 degrees (civil twilight) the light level is 3.4 Lux. This number would for a clear night. For the range -12 to 3 degrees I fitted the following cubic:
Lux=10^(2.916+0.268942*Alt-0.03126*Alt^2-0.00156*Alt^3)
So now I can map Time, Altitude, Lux and Sample Voltage:

Notes:
- the linear regression only uses sample voltages between 400 and 700
- the assumed LDR dark resistance is 20M (I really should measure this!)
- the LDR load resistor is 1.2M
So two problems remain:
- the dawn/dusk offset
- non-ideal weather conditions
No solution to the dawn/dusk offset except to use a constant (guess).
Weather conditions
A 50% reduction in light levels is shown below:

This will cause problems as well.
Oh Slope!
I am coming to the conclusion that the slope is not that useful. In both cases the Lux level for the intercepts were the same (check the two graphs) so basically why bother! Again the slope like the inflection point is a function of the LDR maths. I should have picked this up when I was moving the curves left and right.
Where to now?
One option is to fit the entire daylight and twilight cycle. Entire curve will provide infromation on average/peak light levels. And I have a full model that I can fit.
AlanX
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.