Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5

UV sensor for WeatherDuino Pro2 weather station
#21

Hi,

(24-06-2015, 16:08)Werk_AG Wrote:  The maximum value that we can get at the ADC1 variable, is 1023, which should correspond to a UV Index greater than 11.

Don't forget that for our Australian friends, the "Record" UV Index is over 17. And apparently the highest ever recorded was over 43, but that was up a mountain ! IMHO Steve's pragmatic solution with Cumulus, to offer a calibration "multiplier" (and perhaps an "offset"), may be the best solution.

It seems that UV is diffused by the atmosphere more than visble light, so the correct "Cosine Response" is more important. If the sensor itself has a good Cosine Response, then beware that any "window" above it may severely upset the shape, due to high surface reflection at low angles. A good demonstation of this is the "Harry Worth Shop Window" scene:




If I understand correctly, you shouldn't use a "clear" window but a diffusing window, which is why (white) Teflon or PTFE is often used. Recently I found this PDF which I found most informative. Bear in mind that the guy spent at least a year of his life preparing it (his master's degree), and there's lots of maths that you won't want to bother with. But it's the only document I've found so far that gives some practical details about designing UV (and Visible) diffusers. See for example the diagrams on page 4.

PTFE/Teflon sheet seems to be available quite cheaply, for example from ebay. But all that I've found so far is specified for its mechanical properties; I've found nothing concering the optical parameters of the sheets being offered.

Cheers, Alan.
Reply
#22

(24-06-2015, 18:09)Werk_AG Wrote:  Some considerations about possible materials to cover the sensor.

The UV sensor used on the Uncle Bob unit (shown in this post), is covered with a small piece of polystyrene (from a CD cover).

[Image: SR_UV_new05.jpg]

"The polystyrene plate is virtually opaque to light of wavelengths 200 nm to 275 nm, with the background absorbance dropping quickly with wavelengths above 275 nm to a value of 0.400 at 300 nm and less than 0.050 by 375 nm. Polypropylene, while equally opaque at 200 nm shows slightly less absorbance than polystyrene in the lower UV wavelengths. Polypropylene decreases rapidly from approximately 3.000 at 230 nm to less than 1.000 at 240nm, with a slight secondary peak from 250nm to 290 nm"

Considering the spectral response of the UVM-30A, a polystyrene cover seems suitable. Response bellow 275nm is almost zero.

I'm now starting to investigate Liquid Optical Clear Adhesives (LOCA).
Some are completely UV transparent.

by coincidence I was looking these up yesterday http://www.masterbond.com/properties/opt...-adhesives
Interesting numbers.
Reply
#23

(24-06-2015, 17:20)Werk_AG Wrote:  As said before, your work in this matter is greatly appreciated, so, please continue...
If possible, try to do your tests with the UV sensor connected to the TX unit, creating test conditions as close as possible to real use conditions.

Hi again,

Maybe, now it's the formula OK (finally). Now I'm not doing any tests, I'm only calculating like our WeatherDuino TX and RX Shy Thank you for your help again, Werk_AG. I think, our formula has to be:
 
IndiceUV = ((((ADC1 * 1100.0 / 1024.0 ) / Transmission - 135 ) * 10.9 ) / 1023.0) ;

Here is a proof:
 
[Image: UVIcalculating.png]

The spreadsheet with calculating is in attachement. Value "Transmission" is for example 0.9 for transmission 90%, 0.8 for 80%, etc. This value has to be experimentally detected, as we discussed it above.


Attached Files
.xlsx PorovnaniVypoctu_v1.1-e.xlsx Size: 12,75 KB  Downloads: 308

Best Regards
Zdenek

Brandys/L Weather
Reply
#24

(24-06-2015, 19:46)AllyCat Wrote:  Hi,


It seems that UV is diffused by the atmosphere more than visble light, so the correct "Cosine Response" is more important. If the sensor itself has a good Cosine Response, then beware that any "window" above it may severely upset the shape, due to high surface reflection at low angles. A good demonstation of this is the "Harry Worth Shop Window" scene:

Hi Alan

Thanks for the excellent pdf document, it contains very useful information.

Despite I'm not getting too bad results, the "Cosine Response" is one of the aspects with which I am not fully satisfied in any of my practical implementations of the UV sensor.
Next approaches, probably will be with a Teflon dome. Unfortunately they are not easy to find.

Reply
#25

(24-06-2015, 21:55)hornychz Wrote:  ...Now I'm not doing any tests, I'm only calculating like our WeatherDuino TX and RX.

Hi

I'm almost sure that when you start to test the readings with a real unit, you will find that the original formula was not so wrong as it seems at first sign, especially if your sensor cover will be a flat and reflective material (like the one I'm using).
I'm not saying that your calculations are wrong. It's more like theoretical data versus practical observations.

I taken the liberty of using your nice spreadsheet, and added some data. The used formula, seems to give good output results at least with my three test units, each one have different sensor cover materials (but all flat, and reflective).

[Image: UV_formula.JPG]

My formula seems to produce over estimated results, especially at the lower part of the scale, but this compensates the losses due to reflexion at high incidence angles (sunset and sunrise).

One more time I say, this is a result of a practical observation, done to obtain readings comparable to the readings from other nearby weather stations.

Real time readings:

[Image: graphUV.php]


Just another thought:
Using your formula increases memory usage in more than 40 bytes.
Also, avoiding complex floating point calculations as much as possible, it's a good rule.
If you gonna use your proposed formula, I'm sure it can be simplified.


Attached Files
.xlsx WeatherDuino_UV_Calc.xlsx Size: 17,11 KB  Downloads: 251

Reply
#26

(26-06-2015, 14:23)Werk_AG Wrote:  My formula seems to produce over estimated results, especially at the lower part of the scale, but this compensates the losses due to reflexion at high incidence angles (sunset and sunrise).

One more time I say, this is a result of a practical observation, done to obtain readings comparable to the readings from other nearby weather stations.

Just another thought: Using your formula increases memory usage in more than 40 bytes. As much as possible, avoid complex floating point calculations in Arduino it's a good rule. If you gonna use it, I'm sure it can be simplified.

Hi, Werk_AG,
and thank you for your reply. I'm saying again - you are right, definitely ...
But, there are min. three resons to use a new formula:
1) it is a bit more refined and more versatile
2) respects the fact that the curve passes through zero
3) but mainly: it enables a very simple amateur calibration
Formula could be a little simplified:
IndiceUV = (( ADC1 * 1.074 / Transmission - 135 ) * 0,011
but it doesn't mean, in my opinion, nothing for decrease memory use ...
Here is my results for today:
[Image: MeasuredByMe.png]
and this for today from CHMU:
[Image: MeasuredByCHMU.png]
Now I'm using only CD cover and my TX case is only down in the garden, not yet on the roof (I'm still waiting for some components).
Have a nice summer ...

Best Regards
Zdenek

Brandys/L Weather
Reply
#27

(26-06-2015, 15:13)hornychz Wrote:  1) it is a bit more refined and more versatile
2) respects the fact that the curve passes through zero
3) but mainly: it enables a very simple amateur calibration

3) Agree! I already had admitted the benefits of introduce something like the "transmission" parameter in the formula.

2) ???

1) More refined and versatile? Maybe I'm wrong, but comparing the two graphs (yours, and the official) yours, is starting to have readings too late in the beginning of the day (and I suspect that it starts to show zero too early at the end of the day too).

The better one, is the one which produces better results, and this may take months to determine. Hope this thread don't goes in the direction of "mine is better than yours".

Wish you a nice summer too.
Best regards
Caneira

Reply
#28

(27-06-2015, 05:49)Werk_AG Wrote:  1) More refined and versatile? Maybe I'm wrong, but comparing the two graphs (yours, and the official) yours, is starting to have readings too late in the beginning of the day (and I suspect that it starts to show zero too early at the end of the day too).

The better one, is the one which produces better results, and this may take months to determine. Hope this thread don't goes in the direction of "mine is better than yours".

Yes, yes ... my sensor starts late, because it is temporarily too low in the garden and in the mornings and evenings is in the shade ... The second reason differences is my location is about 70 km west from the CHMU meteo station in Hradec Kralove, so the overcast isn't the same in the both location (and some clouds are at us early then at Hradec Kralove).

Caneira, you are a great pattern for me, and community in this forum too ... I love WeatherDuino, I think it's the best meteo station available for amateurs. And this is only one reason for me to add some of my thoughts into this forum, not "mine is better than yours". Because I thought it might be interesting for the others, I wrote it into forum, not into PM. And I repeate, before your work take my hat off!

Best Regards
Zdenek

Brandys/L Weather
Reply
#29

Hi,
Just using what is in the code now and no modifications, could a add/subtract calibration factor be used in cumulus? I wrote a quick arduino program to compare two UVM-30A sensors and simply displaying each individual output and the difference on the serial monitor. This was so i could simply test a few different cover mediums and see the attenuation. My first test was at 10am on a warm spring day and my analogue value raw from the UVM was 250, UV index of 11+. The local forecast was for 12, so pretty close.
However my concern is when it does hit summer and we start getting UV index of 14 and 15 every day where does this leave my readings? If i attenuated my uv with a cover that reduced it by a factor of 3 and "added" 3 in cumulus would this give me a pretty fair observation? I'm not too concerned for the lower end of the spectrum.
Reply
#30

Hi,

The UV Index is a linear scale, so you should use a multipler to correct for any attenuation that you introduce, or to correct for calibration errors (except for any zero/bias offsets).

One problem is identifying a material which is (semi-) transparent to UV. I suggest a sheet about half a mm thick of PTFE (Teflon). See post #98 here.

Cheers, Alan.
Reply




Users browsing this thread: 1 Guest(s)