APDS-9200 UV index reads above 11 when connected to Nova

Customer:

I have a question and suggestion. I wanted to post on the forum but gave up when I saw you use plain HTTP instead of HTTPS. I’m not comfortable sending my credentials that way. I assume you’re aware and planning to add an SSL certificate.

My main question: my APDS-9200 returns UV index values well above 11 when connected to Nova. UV index is typically measured from 1 to 11+, but mine reads higher. Is this expected behaviour from the board, and what’s your experience with it?

Original message (Croatian)

Imam pitanje i komentar/prijedlog.

Htio sam postaviti pitanje na forumu, ali odustao sam kad sam vidio da na forumu nemate https, već običan http. Kako nešto o tome znam, nije mi baš OK tako slati svoj usr/pwd s kojim inače radim narudžbe.

Pretpostavljam da ste toga svjesni i da imate u planu nabaviti SSL certifikat.

Pitanje - moj apds-9200 nabavljen kod vas vraća vrijednosti UV indexa višestruko preko 11, spojen na Novu. Obično je UV index mjeren od 1 do 11+, no meni mjeri više.

Da li je to očekivano ponašanje pločice, kakvo je vaše iskustvo?

Puno hvala

[name removed]

Originally submitted via email support on 18 June 2018. Migrated to the forum for community visibility.

Soldered Support:

Our developers are working on HTTPS implementation, it should be coming soon.

Can you send me the code you’re using? I suspect the issue is that you’re taking unfiltered values and calculating the UV index from them, but I’ll wait to see the code.

Original message (Croatian)

hvala na feedbacku! :slight_smile: da, naši developeri rade na implementaciji https-a, trebalo bi biti uskoro. Nismo htjeli više odgađati objavljivanje foruma zbog toga..

Možete li mi poslati kod kojega koristite? Pretpostavit ću da je greška u tome što uzimate nefiltrirane vrijednosti pa iz njih računate UV index, ali čekam kod!

Customer:

Here’s the code I’m using:

#include

APDS9200 light;

...

int ocitajSvjetlost() {
 light.enableLight();
 delay(100);
 return light.getLight();
}

int ocitajUV() {
 light.enableUV();
 delay(100);
 return light.getUV();
}

Now that you mentioned filtering, I found there’s also getUVUnfiltered(). Unfortunately I can’t test whether that fixes it right now - I don’t have the sensor with me at the moment. Which code do you use?

Original message (Croatian)

…
#include

APDS9200 light;

…

int ocitajSvjetlost() {
light.enableLight();
delay(100);
return light.getLight();
}

int ocitajUV() {
light.enableUV();
delay(100);
return light.getUV();
}

To koristim. Sad kad ste spomenuli filtriranje, kopam i vidim da postoji i: “light.getUVUnfiltered()”

Na zalost, ne mogu sad i isprobati da li to rješava problem, trenutno senzor nije kod mene

Koji vi kod koristitte?

Hvala

[name removed]

Soldered Support:

getUV() is just a raw UV value with a reference only the sensor knows. The correct function is getUVIndex() which returns the UV index according to the graph in the datasheet.

This function only gives values up to UV index 7, but it should go up to 11. I’ll update it and send it to you.

Also, 100ms for UV reading is sometimes not enough - I recommend increasing it to 150ms.

Original message (Croatian)

ovo je samo nekakva UV vrijednost koji je referentna sa nečime što samo senzor zna čime :slight_smile: ali ima funkcija getUVIndex() koja vraća UV index prema grafu u datasheetu.

Ova funkcija daje vrijednosti samo do UV indexa 7, a trebala bi do 11. Sutra forkam ovo pa Vam pošaljem.

Usput, 100ms za očitanje UVa nekada nije dovoljno, preporučam povećati na 150ms.

Soldered Support:

Here’s the updated library. It should work properly now. There’s an example getUVindex that retrieves the UV index. Test it and let me know how it goes.

Original message (Croatian)

evo libraryja. Ovdje bi trebalo sve lijepo raditi. Tu je i example getUVindex koji dohvaća UV index.

Testirajte pa javite :slight_smile: