TSL2591 Step Increase in Noise after 10^8 ms of operation

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
pleggieri
 
Posts: 5
Joined: Wed Nov 16, 2022 10:22 pm

TSL2591 Step Increase in Noise after 10^8 ms of operation

Post by pleggieri »

I am using the TSL2591 light sensor with an Arduino Mega to measure the luminosity and lux of an LED that is positioned to point at the sensor. The sensor outputs a constant reading over several days, but each time, the noise of the reading increases at 10^8 ms (or 27.8 hours). The average sensor value (over 400 measurements) stays the same, but the local variance among 50 consecutive measurements increases here by greater than 2x. I am using the Adafruit_Sensor and Adafruit_TSL2591 libraries.

Could this step increase in noise at the same timepoint be related to the clock in I2C communication? If so, is there a way to reset the sensor and/or the timing without a hard reset of the Arduino?

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

Re: TSL2591 Step Increase in Noise after 10^8 ms of operation

Post by adafruit_support_mike »

I can think of reasons why noise could be related to a clock, but no reason for clock-referred noise to increase after a certain interval. At worst, the clock would act as an influence on something else, like a battery voltage.

What are you using as a power source?

Also, have you ruled out noise as a legitimate part of the measured data? LEDs are solidly in the realm of Poisson noise sources, since the light is emitted as electrons drop from one energy band to another (discrete and random).

I can think of lots of reasons for an LED's noise to change over time, especially when combined with the effects of temperature. I can't think of a good reason for a sudden step-change though.

How abrupt is the change? It's one thing to say the noise at 2e8ms is twice the value at 2e0ms, and another thing to say the noise at 2e8ms is twice the value at 2e8-1ms. If the increase is exponential, it could be related to the growth of lattice defects in the LED die.

User avatar
pleggieri
 
Posts: 5
Joined: Wed Nov 16, 2022 10:22 pm

Re: TSL2591 Step Increase in Noise after 10^8 ms of operation

Post by pleggieri »

Hi Mike,

Thanks for your reply! The power source for the sensor is 12V DC from a power supply plugged into the wall. I suppose I can't be sure that this step increase in noise is coming from the sensor, but whatever it is it happens every time at the same timepoint. I've attached some representative data; right at 27.78 hours (10^8 ms), the optical density shows intermittent decreases, suggesting increases in light intensity.

I can try running my sensor for 30+ hours without the LED light source to see if I still pick up this step increase in noise. If it is the sensor, are there ways around this? I tried resetting the I2C bus using "TWCR = 0" and "Wire.begin()" before 27 hours, but still saw the same step increase in noise.

Thanks,
Patrick
Attachments
Screenshot 2022-11-28 115122.png
Screenshot 2022-11-28 115122.png (32.14 KiB) Viewed 146 times

User avatar
pleggieri
 
Posts: 5
Joined: Wed Nov 16, 2022 10:22 pm

Re: TSL2591 Step Increase in Noise after 10^8 ms of operation

Post by pleggieri »

Sorry, the power supply is 5V from the Arduino, not 12V. My mistake.

User avatar
sj_remington
 
Posts: 999
Joined: Mon Jul 27, 2020 4:51 pm

Re: TSL2591 Step Increase in Noise after 10^8 ms of operation

Post by sj_remington »

The posted graph appears to show several step increases, not just one. Look at 26h, for example.

How do you explain the climbing trend? This is inconsistent with your statement "The sensor outputs a constant reading over several days".

If you turn off the system, let it rest for a day, and repeat the experiment, how do the two sets of results compare?

User avatar
pleggieri
 
Posts: 5
Joined: Wed Nov 16, 2022 10:22 pm

Re: TSL2591 Step Increase in Noise after 10^8 ms of operation

Post by pleggieri »

Sorry, this is a different experiment, I should have clarified. The value on the y-axis is expected to increase here with time as bacteria are growing inside the photocell. What is not expected are those intermittent decreases on the y-axis, which only appear after 10^8 ms. This is consistent across multiple experiments with resets in between; they show up every time and only after 10^8 ms for some reason.

User avatar
sj_remington
 
Posts: 999
Joined: Mon Jul 27, 2020 4:51 pm

Re: TSL2591 Step Increase in Noise after 10^8 ms of operation

Post by sj_remington »

Fine, but what about the steps you are ignoring, at 24.5, 26 and 28.5h for example? They are equally large compared to the "downward spikes".

This looks like the sum of two different effects: a possible quantization error, compounded by expected ~Gaussian noise.
Last edited by sj_remington on Mon Nov 28, 2022 9:11 pm, edited 1 time in total.

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

Re: TSL2591 Step Increase in Noise after 10^8 ms of operation

Post by adafruit_support_bill »

A test with a different light source could rule out fluctuations in the LED intensity.
A wiring diagram and/or photos of the setup, source code and some sample raw output may yield clues as well.

User avatar
pleggieri
 
Posts: 5
Joined: Wed Nov 16, 2022 10:22 pm

Re: TSL2591 Step Increase in Noise after 10^8 ms of operation

Post by pleggieri »

Perhaps that wasn't the clearest example data to show. I've attached a clearer output here, where the step increase in noise after 27.78 hours is more obvious. Ignore the blip at 24 hours, this was a manual intervention.

I can test whether a light source not connected to the Arduino resolves this issue, in which case I can blame the LED, but still that would be odd. I would be curious why an LED driven by a constant current driver and PWM from the Arduino would consistently become less stable at the same timepoint.
Attachments
Screenshot 2022-11-28 174320.png
Screenshot 2022-11-28 174320.png (13.76 KiB) Viewed 115 times

User avatar
sj_remington
 
Posts: 999
Joined: Mon Jul 27, 2020 4:51 pm

Re: TSL2591 Step Increase in Noise after 10^8 ms of operation

Post by sj_remington »

The second plot shows rather dramatically different behavior, inconsistent with the first. Something appears to be quite unstable in your system, and swapping out components is a good place to start.
I can blame the LED, but still that would be odd
Not to me. An LED is a rather large semiconductor device, subject to manufacturing defects. And you may be overdriving it.

Time to post code, wiring diagrams, etc. as previously suggested.

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

Re: TSL2591 Step Increase in Noise after 10^8 ms of operation

Post by adafruit_support_bill »

I can test whether a light source not connected to the Arduino resolves this issue, in which case I can blame the LED
In that case, it could be the LED, the power supply or the drive circuit for the LED. There are a number of components in the system which could contribute to the observed symptoms.

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

Return to “Other Products from Adafruit”