Giter Site home page Giter Site logo

UV Index shows zero! about ltr390 HOT 9 CLOSED

gotfredsen avatar gotfredsen commented on July 29, 2024
UV Index shows zero!

from ltr390.

Comments (9)

gotfredsen avatar gotfredsen commented on July 29, 2024

Actually if I lower the resolution to 16 bits, I get a UV Index. I also noticed that if I change the ALS from 18bit to 16bit, the lux readout is 4x higher (from ~15k to ~60k). While I assume the raw ALS would change, I expect to see similar lux levels, just with lower precision.

I tried Adafruit's library, but bar an error in their code, it also doesn't calculate lux and UV Index, for same reason I wonder.

I could also have a different version of the LTR390 chip, since the data sheet changed the UV Sensitivity count from 2300 to 1400, so maybe mine is an old (2300) version...

from ltr390.

levkovigor avatar levkovigor commented on July 29, 2024

@gotfredsen
What UV source did you use?
According to datasheet UVI accuracy +- 1.5 at Gain 18x and 20bit Resolution at range UVI < 3. So if the UV source is weak, the reading may be near zero.
Any LTR390 has UV Sensitivity 1400 according to the latest datasheet. 2300 - is incorrect value, it was measured incorrectly.

from ltr390.

levkovigor avatar levkovigor commented on July 29, 2024

@gotfredsen
About ALS calculation for different resolutions - I ll recheck it on next week

from ltr390.

levkovigor avatar levkovigor commented on July 29, 2024

@gotfredsen BTW I've found mistakes in setResolution and getResolution methods. I've corrected them and made new release 1.0.3
Maybe this was the problem. Can you check UVI and ALS calculations now?

from ltr390.

gotfredsen avatar gotfredsen commented on July 29, 2024

@levkovigor the ALS/Lux calculations seems perfect now, thank you. See below.

However the UV Index calculation might be off. Using a gain of x3, the UV index seems dangerous high ;-). If I keep to x18 (and 20bit), I still get zero. And I accept my UV source might not be the best. I will find a more reliable source and test again.

Ambient Light Lux: 2071
UV Index: 4294967295
UV data: 2589
Ambient Light Lux: 2072
UV Index: 4294967295
UV data: 2591
Ambient Light Lux: 2071
UV Index: 4294967295
UV data: 2589
Ambient Light Lux: 2084
UV Index: 4294967295
UV data: 2606
Ambient Light Lux: 2075
UV Index: 4294967295
UV data: 2594
Ambient Light Lux: 2069
UV Index: 4294967295
UV data: 2587

from ltr390.

levkovigor avatar levkovigor commented on July 29, 2024

@gotfredsen
I'm going to do research on the gain and resolution tomorrow. There is no such information in the datasheet. Perhaps there is not proportional dependence.

from ltr390.

gotfredsen avatar gotfredsen commented on July 29, 2024

@levkovigor
I changed the library to return float on the UV Index instead, and I get some readings out of that. While I know the UV Index is reported in whole numbers, I have seen libraries reporting UV Index in real numbers, which I find useful.

I have compared the LTR390 with two other UV Sensors: VEML6075 and SI1133, both end-of-life.

UPDATE:
I did get UV Index with a better light source: I got 3.54 outdoor (33k lux), and (because of float) 0.01 indoor in a "darker" area (96 lux). Under my desk lamp (6434 lux) I get 0.08 in UV Index.

from ltr390.

levkovigor avatar levkovigor commented on July 29, 2024

@gotfredsen Changed return values of Lux and UV Index to float - 1.0.5

UPDATE:
I did get UV Index with a better light source: I got 3.54 outdoor (33k lux), and (because of float) 0.01 indoor in a "darker" area (96 lux). Under my desk lamp (6434 lux) I get 0.08 in UV Index.

Lux and UV Index are different indicators and depend on the light source and environment

from ltr390.

levkovigor avatar levkovigor commented on July 29, 2024

@gotfredsen

New release - 1.0.6
Error fixed in function getResoluton()
Added data in csv files for Lux and UVI calculations at different gain and resolution values
Added some data in csv files with comparisons of sensors: LTR390, VEML6070, VEML7700, SI1145

from ltr390.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.