TEMT6000 sensibility issue?

I’ve built a garage multi sensor using ESPHome (DHT22, ultrasonic sensor, door sensor, presence sensor…) and a NodeMCU 32S
In this multi sensor I have a TEMT6000 that I want to use to check at night if someone forgot to switch off the light. This TEMT6000 is in front of the light, less than 2 meters away (light is on the wall not at ceiling).

Here is my code, which is the same we can find on ESPHome website:

  - platform: adc
    pin: GPIO34
    name: "$devicename illuminance"
    unit_of_measurement: lx
    icon: "mdi:brightness-5"
      - lambda: |-
          return (x / 10000.0) * 2000000.0

Issue is that at night when the light is on, returned value is 0! At day, if light is off value is still 0 and and if I turn on the light value is 4lx… If I put a light in front of it it seems to work but light must be less than 50cm away.
Is the TEMT6000 not the good sensor for this? Is my sensor defective?

Looking a the datasheet (pdf) the sensor seems to be most responsive to 600nm wavelength (orange). What sort of light do you have in your garage?

Incandescent, LED, florescent?

If it’s either of the last two, the light may not be outputting much at this wavelength.

Though the response is fairly broad (50% sensitivity at 420nm to 800nm) so maybe not this problem.

Maybe try with an incandescent light and see if it is more sensitive to that.

The angle of 50% sensitivity is fairly wide (+/- 60°) so you shouldn’t have to aim it too directly.

Light is a LED one: 8W, 806ln, 4000K (white light). I’ve tried with a yellow (9W, 806ln, 2700K) and I got nearly the same result: between 0.5 to 4lx.

Then I tried with an old light (40W incandescent lamp) and I got 20lx… What is fun is that lx value is stable with the old one and varies a lot with the LED one.

Yeah that’s your problem. The LED lights don’t emit a smoothly continuous spectrum. More like red, green and blue spikes that trick you into thinking it’s white. You could look for a high CRI (colour rendering index) LED light (>90 CRI). This should have a better spectrum that will work with your sensor. Unfortunately high CRI lights tend to be quite dear. You might be better off changing the sensor. A BH1750 might be better. It has a much broader peak response.

1 Like

Thanks. Will try a BH1750!

I can now confirm that with a BH1750 it is working as expected

1 Like