levkovigor / LTR390

Arduino library for the LTR390 UV sensors.
MIT License
8 stars 3 forks source link

Could this be used as a UVI sensor for reptile lamp ? #9

Open Griizly opened 7 months ago

Griizly commented 7 months ago

Hi !

Sorry, this might not be the right place to ask this but you seem to be very familiar with this sensor

I'm trying to create a UVI meter for my reptile lamp, to check the decrease of UVi in time and know when to replace them :)

I have 7 Arcadia T5 12% 54w UVB tube that should output 8.5 UVI at 30 cm from light source, they produce 7000K Pro T5 Datasheet

Do you think this sensor could do the job ?

Thanks !

Griizly commented 7 months ago

I received my sensor,started playing around with it, it seems to work with simple reptile tube ( arcadia call them Shadedweller pro, they are 8W, 400lumen, 6000kelvin ) I get a UVI of +/- 0.7 at 25cm from the light source so that seems fine

But for my other tubes ( arcadia t5 desert 12%, 54w, 2400 lumen, 7000kelvin ) I should get something around 8.5 UVI at 30cm from light source and I get something around 2.5 2.7 UVI

If I multiply the value I get for those tube by ~3 I almost get what I should expect but i'm not sure that it is the right way to do it because if I multiply by 3 then the values for my shadeweller is wrong...

Any tips to share ?

FYI, these tubes are "white" and therefore does not output infrared image

floatAsNeeded commented 5 months ago

I don't know if that can help your issue, but it could be related to the WFAC value. Se library notes in h file

define UV_SENSITIVITY 1400

define WFAC 1

Which is used in the calculation of UVI.

float uvi = (float)(raw) / ((gain_factor[_gain] / gain_factor[LTR390_GAIN_18]) (res_factor[_resolution] / res_factor[LTR390_RESOLUTION_20BIT]) (float)(UV_SENSITIVITY)) * (float)(WFAC); return uvi;

So you need to change it to whatever number is right for you. You could change the library to make WFAC a variable so you can change it when you need to in your code.