Skip to content

TSL2591 overflows under direct sunlight despite GAIN_LOW INTEGRATIONTIME_100MS options set #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
averter opened this issue Jun 16, 2023 · 3 comments

Comments

@averter
Copy link

averter commented Jun 16, 2023

The error message discussed here is helpful, but my tsl2591 is under direct sunlight with GAIN_LOW and INTEGRATIONTIME_100MS and the code keeps crashing... With this configuration isn't this sensor supposed to work even under these extreme light conditions? I'm copying my code below for reference.

import board
import adafruit_tsl2591
import time
import requests
i2c = board.I2C()
sensor = adafruit_tsl2591.TSL2591(i2c)
sensor.gain = adafruit_tsl2591.GAIN_LOW
sensor.integration_time = adafruit_tsl2591.INTEGRATIONTIME_100MS
READING_DELAY = 1
time.sleep(READING_DELAY)
print(sensor.lux)
@lamasek
Copy link

lamasek commented Jun 23, 2023

Maybe i have 1 anothe answer. Typical maximum summer dayligt in Europe Czech Republic is around 100 000 LUX. TSL 2591 has specified maximum 88 000 LUX. Also 100 000 LUX is roughly 1 cm far from 100W classic light bulb.
For measuring outside i bought another LUX meter chip, but now i am trying this if it is more precise.

@averter
Copy link
Author

averter commented Jun 25, 2023

That makes sense. Perhaps this sensor it's not the best for an application with direct sunlight? Is there any way to double check that this is the source of error?

@averter
Copy link
Author

averter commented Sep 3, 2023

  • I'll assume that this is indeed due to the limited range of the sensor. An alternative would be this SEN0390 sensor with a range of up to 200k lux, although there seems to only exist libraries for arduino (not the rpi).

@averter averter closed this as completed Sep 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants