TSL2561 not working for low-light integration time setting?

Breakout boards, sensors, other Adafruit kits, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
iamchriskelley
 
Posts: 4
Joined: Sun Aug 26, 2012 8:42 pm

TSL2561 not working for low-light integration time setting?

Post by iamchriskelley »

Hi,

I just bought a TSL2561 to replace a cadmium sulfide photoresistor for low-light readings. The sensor appears to work fine with the high-light and medium-light integration time settings (13ms and 101ms, respectively), tested with the demo code tsl2561.pde with and without 16x gain.

However, running the demo code with the low-light integration time setting (402ms) option, the sensor reads zero for IR, full, and lux regardless of the intensity of the light source or use of 16x gain. Is this an indication that the sensor is defective in some way, or is there perhaps a known code bug? Anyone else had this issue? I like this sensor but without the low-light setting it's basically worthless for my current project.

Thanks,
Chris

User avatar
iamchriskelley
 
Posts: 4
Joined: Sun Aug 26, 2012 8:42 pm

Re: TSL2561 not working for low-light integration time setting?

Post by iamchriskelley »

Okay, can someone suggest then how I'm supposed to get the attention of the Adafruit support team? Their Contact page just links to this forum for technical support. I need to have the apparent malfunction of this TSL2561 addressed or have the part replaced. Thanks in advance for any advice.

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

Re: TSL2561 not working for low-light integration time setting?

Post by adafruit_support_bill »

I have not tested the low-light mode on this sensor. I'll connect one up and see if I can reproduce the problem.

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

Re: TSL2561 not working for low-light integration time setting?

Post by adafruit_support_bill »

The sample I have here gives good readings with all integration times.
Contact [email protected] with a link to this thread and ask for a replacement sensor.

User avatar
iamchriskelley
 
Posts: 4
Joined: Sun Aug 26, 2012 8:42 pm

Re: TSL2561 not working for low-light integration time setting?

Post by iamchriskelley »

Thank you for resolving the problem! I'll do as suggested.

User avatar
bg0
 
Posts: 2
Joined: Sat Dec 29, 2012 2:57 pm

Re: TSL2561 not working for low-light integration time setting?

Post by bg0 »

Was there a resolution to this or are there any updates? I received this module yesterday and it works fine with the fastest integration time, but I, too, receive '0's otherwise.

Thanks!

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: TSL2561 not working for low-light integration time setting?

Post by adafruit_support_rick »

@briangortney - Please email [email protected] with a link to this thread to arrange for a replacement.

User avatar
ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: TSL2561 not working for low-light integration time setting?

Post by ktownsend »

Which version of the driver are you using? This was updated a bit less than a month back to use the new Adafruit Unified Sensor Driver system, and I did a quick test with 13ms and 402ms integration time and also spit out the raw values and it works for me.

Make sure you're using the latet library from here: https://github.com/adafruit/Adafruit_TSL2561

Edited the loop function to also read the raw values:

Code: Select all

void loop(void) 
{  
  /* Get a new sensor event */ 
  sensors_event_t event;
  tsl.getEvent(&event);

  uint16_t broadband, infrared;
  tsl.getLuminosity(&broadband, &infrared);
  Serial.print("Broadband: "); Serial.print(broadband); Serial.print(" Infrared: "); Serial.println(infrared);
  
  /* Display the results (light is measured in lux) */
  if (event.light)
  {
    Serial.print(event.light); Serial.println(" lux");
  }
  else
  {
    /* If event.light = 0 lux the sensor is probably saturated
       and no reliable data could be generated! */
    Serial.println("Sensor overload");
  }
  delay(250);
}
13ms integration time (default value):

Code: Select all

------------------------------------
Sensor:       TSL2561
Driver Ver:   1
Unique ID:    12345
Max Value:    17000.00 lux
Min Value:    0.00 lux
Resolution:   1.00 lux
------------------------------------

------------------------------------
Gain:         Auto
Timing:       13 ms
------------------------------------

Broadband: 92 Infrared: 15
68.00 lux
Broadband: 92 Infrared: 14
68.00 lux
Broadband: 90 Infrared: 14
69.00 lux
Broadband: 92 Infrared: 14
69.00 lux
And changing the integration time to 402ms in 'configureSensor' in the example sketch:

Code: Select all

void configureSensor(void)
{
  /* You can also manually set the gain or enable auto-gain support */
  // tsl.setGain(TSL2561_GAIN_1X);      /* No gain ... use in bright light to avoid sensor saturation */
  // tsl.setGain(TSL2561_GAIN_16X);     /* 16x gain ... use in low light to boost sensitivity */
  tsl.enableAutoGain(true);          /* Auto-gain ... switches automatically between 1x and 16x */
  
  /* Changing the integration time gives you better sensor resolution (402ms = 16-bit data) */
  // tsl.setIntegrationTime(TSL2561_INTEGRATIONTIME_13MS);      /* fast but low resolution */
  // tsl.setIntegrationTime(TSL2561_INTEGRATIONTIME_101MS);  /* medium resolution and speed   */
  tsl.setIntegrationTime(TSL2561_INTEGRATIONTIME_402MS);  /* 16-bit data but slowest conversions */

  /* Update these values depending on what you've set above! */  
  Serial.println("------------------------------------");
  Serial.print  ("Gain:         "); Serial.println("Auto");
  Serial.print  ("Timing:       "); Serial.println("402 ms");
  Serial.println("------------------------------------");
}
Which results in:

Code: Select all

------------------------------------
Sensor:       TSL2561
Driver Ver:   1
Unique ID:    12345
Max Value:    17000.00 lux
Min Value:    0.00 lux
Resolution:   1.00 lux
------------------------------------

------------------------------------
Gain:         Auto
Timing:       402 ms
------------------------------------

Broadband: 2525 Infrared: 373
65.00 lux
Broadband: 2528 Infrared: 373
66.00 lux
Broadband: 2532 Infrared: 374
66.00 lux
Broadband: 2548 Infrared: 376
66.00 lux
My guess is that you're perhaps hitting the low-light limit of the infrared sensor???

Kevin

User avatar
bg0
 
Posts: 2
Joined: Sat Dec 29, 2012 2:57 pm

Re: TSL2561 not working for low-light integration time setting?

Post by bg0 »

Thank you for the replies.

I am using the newest version of the library, and I did consider both saturation and the low-light limit. The sensor returns '0's (for all values) under both longer integration times with both 0 and 16x gain, and under all light conditions, from pitch black (sensor completely covered with opaque material) to what should be saturation (bright flashlight), and everything in between.

Seems to work fine with the fastest integration setting: reads zero when blocked and can be smoothly pushed all the way to 'saturation zero' with light.

Will contact support.

Thanks again,

Brian

damianoc
 
Posts: 1
Joined: Mon Apr 29, 2013 3:31 pm

Re: TSL2561 not working for low-light integration time setting?

Post by damianoc »

Same problem here. I have purchased 3 sensors, and 2 of them do not work at low-light integration setting. 2 out of 3 it sounds quite a bit for a hardware failure. Has anyone solved the problem by the software side?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: TSL2561 not working for low-light integration time setting?

Post by adafruit_support_rick »

What kind of microcontroller are you using?
How have you got the sensors connected?
Is there anything else on the I2C bus?
Any other devices connected to the MCU - shields, etc?

ottoberge
 
Posts: 9
Joined: Fri Jun 28, 2013 1:42 pm

Re: TSL2561 not working for low-light integration time setting?

Post by ottoberge »

I purchased 10 TSL2561 chips from you on July 2 and I have recently found
that they are malfunctioning. Of the 10 TSL2561 chips only four are capable
of running at all three integration times.

What I did to check the sensor is:

Using the sample program "sensorapi" I tested each of the 10 sensors at all
three integration times. For longer integration times, many of the sensors
didn't return a reading. This was shown by printing "Sensor overload". Of
the 10 sensors tested only 4 worked at all three integration times. 2
sensors only worked at 13ms & 101ms integration times. 4 sensors only worked
at a 13ms integration time.

I have already contacted Adafruit Support regarding this issue.

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm

Re: TSL2561 not working for low-light integration time setting?

Post by adafruit »

We dont -think- its a hardware issue - with these all-in-one integrated designs, if the sensor works at all its working fine. It could be something is amiss with the software, we tried to follow the datasheet best as possible but it could be something is amiss. Right now the maintainer is on holiday, but we've flagged this thread so he can take a look when he's available.

ottoberge
 
Posts: 9
Joined: Fri Jun 28, 2013 1:42 pm

Re: TSL2561 not working for low-light integration time setting?

Post by ottoberge »

Thank you for the quick reply.
Well I'm not sure where the issue is, but I tested each of the 10 sensors multiple times and only specific sensors don't work with specific integration times. These problems are entirely consistent, leading me to believe the issue is with the sensor itself.
I look forward hearing from the maintainer.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: TSL2561 not working for low-light integration time setting?

Post by adafruit_support_mike »

Could you post a photo of your hardware setup and provide details of your testing procedure? It does sound like you're seeing systematic errors, but a 60% defect rate is "ran over the reel with a truck" territory.

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

Return to “Other Products from Adafruit”