Ambient luminosity level detection
The following steps are performed in connection with a photodiode circuit: a) resetting the photodiode circuit; b) determining when a photodiode voltage changes in response to illumination to reach a threshold; and c) updating a counter in response to the determination in step b). The steps a) to c) are repeated until an end of a measurement period is reached. The value of the counter at the end of the measurement period is then output to indicate an intensity of the illumination.
1. A method, comprising:
a) resetting a photodiode;
b) determining when a photodiode voltage changes in response to illumination to reach a threshold;
c) updating a counter in response to the determination in step b);
d) repeating steps a) to c) until an end of a measurement period is reached; and
e) outputting a value of the counter at the end of the measurement period that is indicative of an intensity of said illumination;
wherein a difference between a time for resetting the photodiode and a time when the threshold is reached is a discharge time; and
wherein the measurement period expires when a sum of a plurality of consecutive discharge times equals or exceeds a threshold period.
2. The method of claim 1 , wherein said measurement period is at least equal to a multiple of a half period of an A.C. mains power supply.
3. The method of claim 2 , wherein the A.C. mains power supply operates at a frequency selected from a group consisting of 50 Hz and 60 Hz.
4. The method of claim 1 , wherein said measurement period is selected according to a frequency of A.C. signals provided by an electric power supply network.
5. The method of claim 1 , wherein said measurement period is a multiple of 50 ms.
6. The method of claim 1 , further comprising measuring a charge level of the photodiode at the end of said measurement period.
7. The method of claim 6 , further comprising adjusting the output value of the counter in response to the measured charge level.
8. A method, comprising:
a) sensing a discharge of a photodiode;
b) in response to said sensing: triggering an updating of a counter storing a count value and resetting the photodiode;
c) measuring a discharge time of the photodiode after resetting of the photodiode;
d) repeating steps a) to c) over a time interval; and
e) outputting a light intensity received by the photodiode as said count value of the counter at an end of the time interval;
wherein the time interval is equal to a sum of a plurality of discharge times for said photodiode.
9. The method of claim 8 , further comprising summing the plurality of discharge times; comparing the sum to a threshold duration; and terminating the time interval when the sum equals or exceeds the threshold duration.
10. The method of claim 9 , wherein the threshold duration is selected according to a frequency of A.C. signals provided by an electric power supply network.
11. The method of claim 9 , wherein said threshold duration is a multiple of 50 ms.
12. The method of claim 8 , further comprising measuring a charge level of the photodiode at the end of said time interval.
13. The method of claim 12 , further comprising adjusting the count value in response to the measured charge level.
14. A method, comprising:
a) generating by a photodiode of a voltage which changes at a rate dependent on illumination;
b) comparing the voltage to a reference;
c) incrementing a count value in response to said comparison and resetting the photodiode;
repeating steps a) to c) until a measurement period expires; and
outputting the count value at an end of the measurement period as being indicative of an intensity of said illumination;
wherein a difference between a time for resetting the photodiode and a time for the compared voltage to pass the reference change is a discharge time, and wherein the measurement period expires when a sum of a plurality of consecutive discharge times equals or exceeds a threshold period.
15. The method of claim 14 , wherein said measurement period is at least equal to a multiple of a half period of an A.C. mains power supply.
16. The method of claim 15 , wherein the A.C. mains power supply operates at a frequency selected from the group consisting of 50 Hz and 60 Hz.
17. The method of claim 14 , further comprising measuring the voltage of the photodiode at the end of said measurement period.
18. The method of claim 17 , further comprising adjusting the count value in response to the measured voltage.