PySense: absurd values from light and temperature sensors
-
Hi!
I have a PySense connected to a LoPy and am using the example libraries.
In my room with daylight I get the values 13 and 23 from the light sensor. Using raw2lux, this converts to 0 Lux because the ratio is > 1.3. (In my case its 1.77.) ratio is defined as d1 / d0. But if I have a look in the datasheet, I think ratio should be d1 / (d1 + d0). Even then, the ratio is > 1.3.
Is there something wrong with the formula in the example? Which do you use?
Also I get a too high temperature reading from the SI7006A20 (temperature / humidity) sensor. It says 29°C when it should be about 22°C. The MPL3115A2 (temperature / pressure) gives 23.13°C which could make sense regarding it's located on the board and the LoPy has been running for a while.
Do you use a compensation factor for the temperature?
Thank you very much for your help!
-
Regarding the light sensor (LTR-329ALS), my understanding was that it LTR329ALS01.light() gives the 2 numbers representing the lux values of 2 channels.
If you left the default configuration registers (Gain 1x-> 1lux to 64k lux) then the lux values are exact the values returned.
The 2 channels have a different sensitivity based on wavelength (ch0 ~450nm violet-blue and ch1 ~770nm red).I don't know what's raw2lux. Also the ratio d1/(d1+d0), is mentioned in datasheet but I did not understood the meaning.
I've read the datasheet from:
http://optoelectronics.liteon.com/upload/download/DS86-2014-0006/LTR-329ALS-01_DS_V1.pdfOn my desk, evening, I have:
'>>> lt = LTR329ALS01(py)
'>>> print("Light: " + str(lt.light()))
'Light: (45, 33)
45 lux, 1.5m away (surface is sphere with 1.5m radius) -> 1272 lm, seems ok, as I have 3 bulb-lights of ~400lm.
But with cellphone, 2 cm away: Light (6617, 2758)
<Later edit> I've used this online tool to convert lux to lumens, as light-bulbs have specs in lumens http://www.rapidtables.com/calc/light/lux-to-lumen-calculator.htm
Also with a Blue+Green LED, I've obtained values (85,7), which indicates a blue light, and lack of red light.
-
Hi mkr, for the temperature issue please follow this topic, as more info here: https://forum.pycom.io/topic/2001/pysense-accuracy
The MPL3115A2 temperature gives me aprox the same temperature as SI7006A20.
-
Hi mkr,
Regarding temperature, the SI7006 sensor reports its own temperature, not the Ambient Temperature. I am evaluating some application notes, to see how we can estimate/compensate for the Ambient Temperature. https://www.silabs.com/documents/public/application-notes/AN607.pdf