BACKGROUND
There are quite many cheap 433MHz temperature and humidity sensors out in market but hard to find a cheap light meter that would provide illumination measurements, not only a triggering.
THE OBJECTIVE
To modify an existing temperature and hygrometer sensor by soldering off the thermistor and replacing it by a light dependent resistor (LDR). For such endeavour I bough a Nexa NBA-001.
BILL OF MATERIAL
1pc Nexa NBA-001
1pc Photo resistor - Light Dependent Resistor (LDR)
1pc 7.5KOhms resistor
HANDS ON
On the bottom right side of the circuit board you see the target, the blue thermistor we need to replace by a LDR.
The challenge here is to replace the thermistor by a LDR component that is to oscillate in the same range as the thermistor, in other words, to have the same impedance. After some calculations and trial-error exercises I found that I had to put a 7.5KOhms resistor in series with the LDR. By doing so, I do not get out-of-range reading on the display of the NEXA NBA-001.
To not complicate the post with the maths behind it, what I did was to set the device on complete light (the best is direct sun light) to complete darkness. I got readings ranging from -72C to +72C.
And here is the result:
The next was to convert those reading to Lux. For that I made use of a cheap light meter (lux) I bough in eBay and the e-Exponential regression calculator found here.
This is the result of what I got but you should create your own one for best accuracy.
This is the snippet I use to convert the values to lux:
sensor:
- platform: rfxtrx
automatic_add: False
devices:
0a5207002f0e0291270289:
name: LumenHygro
data_type:
- Humidity
- platform: template
sensors:
lux_value:
value_template: >
{% if states.sensor.lumenhygro_humidity.attributes.Temperature > 0 %}
{{ (0.02755061*e**(0.142984576*(states.sensor.lumenhygro_humidity.attributes.Temperature))) | round(0) }}
{% else %}
{% if states.sensor.lumenhygro_humidity.attributes.Temperature <= 0 %}
{{ 0 }}
{% endif %}
{% endif %}
friendly_name: "Illuminance"
unit_of_measurement: "lx"
device_class: illuminance
KNOWN PROBLEMS/LIMITATIONS
- This Nexa device compensates the Hygrometer value for “temperature”. This means that low luminosity levels give negative “temperature” values and so the Nexa device compensates the Hygrometer values accordingly. This means that the Hygrometer is not reliable unless a regression formula is set to void the compensation.
- It seems to me that lux measurement is ideal for bright environments however I do not find it useful in dim or low illuminated environments since the tendency is to give cero lux or very low lux values and so loosing resolution. In other words, at night, when using artificial light at home, I easily get cero or very low lux values even when it is not completely dark. This is the behaviour I find using the cheap lux meter I bought in eBay. Is this the expected behaviour? Any hint?