Extreme's Blog :Return to Blog
Using LED As A Light Sensor
Resistor R1 ensures that the op amp “sees” a 0V input when the LED is in total darkness. To avoid undue loading of the signal, R1 would ideally be a 100MΩ or larger resistor but since such high values are rare and expensive I used a smaller value and increased the gain of the op amp to compensate for the voltage loss. To avoid the need for a second variable resistor to set the op amp’s input offset to zero, R1 must be large enough for the reduced voltage across the LED to swamp the op amp’s input offset voltage. With a 30MΩ resistor for R1, the voltage at the op amp input when the LED is exposed to bright light is reduced to about 60mV.
This is just over four times the 13mV maximum input offset of the TL071 op amp. R1 can be three 10MΩ resistors in series. Alternatively, I have found that a reverse-biased 1N4148 diode has an impedance of about 30MΩ (connect it in the circuit with the anode to ground). The output of the circuit is about 0V when the LED is in darkness. VR1 sets the gain of the op amp and it should be adjusted to give the required output voltage when the LED is exposed to bright light.
Author: Andrew Partridge – Copyright: Silicon Chip