TSL2561 digital luminosity in sunlight false reading ?

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jimk123
 
Posts: 708
Joined: Sun Dec 26, 2010 7:04 pm

TSL2561 digital luminosity in sunlight false reading ?

Post by jimk123 »

I purchased this sensor (id #439)from adafruit and am using your sample code with the arduino. The readings appear ok under indoor lighting conditions but when I let sunlight hit the sensor inside the house the readings drop to a fixed value of 53 lux, almost like it overloads the sensor ? Here is small snap shot of the values it returns:

IR: 888 Full: 2563 Visible: 1675 Lux: 1219
IR: 856 Full: 2469 Visible: 1613 Lux: 1174
IR: 874 Full: 2525 Visible: 1651 Lux: 1203
IR: 863 Full: 2493 Visible: 1630 Lux: 1187
IR: 883 Full: 2555 Visible: 1672 Lux: 1219
IR: 920 Full: 2663 Visible: 1743 Lux: 1271
IR: 1011 Full: 2947 Visible: 1936 Lux: 1418
IR: 4928 Full: 4934 Visible: 6 Lux: 53
IR: 4931 Full: 4933 Visible: 2 Lux: 53
IR: 4931 Full: 4933 Visible: 2 Lux: 53
IR: 4932 Full: 4934 Visible: 2 Lux: 53
IR: 4932 Full: 4934 Visible: 2 Lux: 53
IR: 4931 Full: 4933 Visible: 2 Lux: 53
IR: 4931 Full: 4933 Visible: 2 Lux: 53
IR: 4931 Full: 4934 Visible: 3 Lux: 53
IR: 756 Full: 2162 Visible: 1406 Lux: 1018
IR: 539 Full: 1498 Visible: 959 Lux: 681

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: TSL2561 digital luminosity in sunlight false reading ?

Post by adafruit_support_bill »

Sounds like an overload. The sensor range is from 0.1 to 40,000 Lux. Direct sunlight can be as high as 120,000 Lux.

clong
 
Posts: 4
Joined: Thu Jul 17, 2014 6:52 pm

Re: TSL2561 digital luminosity in sunlight false reading ?

Post by clong »

Just to follow up on this (7 months later!).

Where are you getting 40,000 Lux maximum from? I can't find this anywhere in the datasheet.

Is it possible to do intergration times of less than 13.7ms if using manual intergration? This may help increase the maximum.

How can one detect overload?

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: TSL2561 digital luminosity in sunlight false reading ?

Post by adafruit_support_bill »

Where are you getting 40,000 Lux maximum from? I can't find this anywhere in the datasheet.
The datasheet doesn't specify 40,000 explicitly, but if you work through the formulas and the maximum raw ADC readings, it comes out to about 40,000.
Is it possible to do intergration times of less than 13.7ms if using manual intergration? This may help increase the maximum.
Unfortunately, decreasing the integration time also decreases the max ADC counts, (note 6 on page 5) so it really wouldn't buy you anything. I think your best bet would be to use a neutral density filter over the sensor and adjust your readings accordingly.

clong
 
Posts: 4
Joined: Thu Jul 17, 2014 6:52 pm

Re: TSL2561 digital luminosity in sunlight false reading ?

Post by clong »

Very helpful, thank you.

One other question- if the gain is set to "no gain", do I need to multiply my results by 16x to get correct results, or is this not necessary, since the calculation of Lux is based on the ratio of the two channels?

I had wondered if a ND filter would be necessary. Are photography ones the only easily available ones? Do you have any idea what kind of grade filter would I need to bring pure sunlight down to 40,000 Lux?

I presume Sparkfun's page on the their version of your product is simply wrong, since it says:
Real-world conditions can range from 0.0001 lux in starlight, to over 100,000 lux in direct sunlight. The TSL2561 has features that allow it to handle this huge dynamic range. These settings are similar to a camera; one can change both the sensitivity, which is like an ASA film rating, and the integration time, which is like the shutter speed.
(https://learn.sparkfun.com/tutorials/ts ... okup-guide)

clong
 
Posts: 4
Joined: Thu Jul 17, 2014 6:52 pm

Re: TSL2561 digital luminosity in sunlight false reading ?

Post by clong »

Also, how can I detect that the sensor is in "overload"? Should the Lux count be at the maximum for that intergration time? (i.e. 5047 for 13.7ms) That doesn't seem to tally with the OP's results...

User avatar
adafruit_support_bill
 
Posts: 88096
Joined: Sat Feb 07, 2009 10:11 am

Re: TSL2561 digital luminosity in sunlight false reading ?

Post by adafruit_support_bill »

if the gain is set to "no gain", do I need to multiply my results by 16x to get correct results, or is this not necessary, since the calculation of Lux is based on the ratio of the two channels?
I think that the gain is accounted for in the calculation.
I had wondered if a ND filter would be necessary. Are photography ones the only easily available ones? Do you have any idea what kind of grade filter would I need to bring pure sunlight down to 40,000 Lux?
Most any piece of 'smoked' glass could probably do the job, but you would need to calibrate it yourself.

Assuming that the max range is 120,000 lux, a one-stop filter would bring you down to 60,000 and a two-stop filter would get you down to 30,000. Most any piece of 'smoked' glass could probably do the job, but you would need to calibrate it yourself. I'd look for the least expensive photographic filter.
I presume Sparkfun's page on the their version of your product is simply wrong, since it says:
I'd have to look at their code. They may have found a way to achieve that range.
Also, how can I detect that the sensor is in "overload"? Should the Lux count be at the maximum for that intergration time? (i.e. 5047 for 13.7ms) That doesn't seem to tally with the OP's results...
You would need to look at the raw ADC count. I'm not sure how this sensor handles overflows. Some will peg the value at the maximum. Others will roll over and lose the high order bits.

Locked
Please be positive and constructive with your questions and comments.

Return to “Other Products from Adafruit”