The TSL235 is a light-to-frequency converter.
This library reads TSL235 output frequency and convert it to irradiance, and then to illuminance.
Irradiance is the power of electromagnetic radiation per unit area (radiative flux) incident on a surface. It’s expressed in watt per square metre, the symbol is Ee.
In photometry, illuminance is the total luminous flux incident on a surface, per unit area. It is a measure of how much the incident light illuminates the surface, wavelength-weighted by the luminosity function to correlate with human brightness perception. It’s expressed in lux, the symbol is Ev.
Irradiance and illuminance are related by the luminosity function. The luminosity function describes the average spectral sensitivity of human visual perception of brightness. This function it is standardized, usually the CIE 1924 function it is used for conversion.
The standard luminosity function is normalized to a peak value of unity at 555 nm, so the value of the constant in front of the integral is usually rounded off to 683 lm/W.
Vlambda is the luminosity function.
To measure TSL235 output we count the number of risign edge on the clock external input pin of Atmega.
Using this frequency count method, we can measure up to F_CPU / 2. Given a 8Mhz micro frequency, we can measure up to 4Mhz.
References of the below summary goes to Irradiance Meter by Jonathan Thomson.
TSL235 returns a frequency dependant on spectral irrandiance or the light source.
Every photon that crash on the photodiode area is beeing absorbed and converted to current depending on his wavelength. Current is then trasformed to frequency by a Current-to-Frequancy converter.
The photodiode has a spectral responsivity that vary upon wavelength. The responsivity over a specify wavelength is specify by datasheet. TSL235 photodiode react from 300 to 1100nm.
We can say that
given fO as the output frequency, Re(lambda) as responsivity over wavelength, Ee(lambda) source light spectral irradiance over wavelength
If we fix a normalized spectral irradiance of a know source as X(lambda), the frequency output from sensor is:
Because fX is computed starting by the normalized spectral irradiance X(lambda), and our light source has the same shape of spectral irradiance, we can relate fX and fO by a constant k.
So, the spectral irradiance of the measured source is [uW/(cm^2)/nm]