Electronic – What are the relevant parameters for a reverse-biased LED light sensor

infraredledlightsensor

Following this appnote (PDF) on using photodiodes, I'm connecting an IR LED as a light sensor and emitter, configured like this:

enter image description here

To emit light, I pull PIN1 high and PIN2 low; R2 serves as a current limiting resistor. To detect light, I pull PIN2 high and connect PIN1 to an ADC; U$1 and R1 form a voltage divider, and the voltage on PIN1 is proportional to the amount of light.

What I'm curious about is the best value for R1 and its relation to output voltage and response time. The appnote gives a formula for calculating the response time, but leaves terms undefined. The current value of 20M was based on experimentation with a breadboard; at this value it gives reasonable results between 0 and 0.15 volts for reflected light from another identical LED, and a bit over 5V if I point the emitting LED directly at the detector.

I'd like to increase the sensitivity to low light levels, but I don't know how much I can safely do so without sacrificing response time. My target component isn't the same as I was using on the breadboard, either, and I don't know what parameters of the LED affect the output voltage. In a nutshell:

  • How do I determine the response time of this circuit in its detecting configuration?
  • How can I determine what voltage level to expect at PIN1 with a given value of R1 and a given light level?

Best Answer

There are not good answers to these questions because LEDs are intended for emitting light, and as such the parameters you need to answer your questions are not specified.

A LED reverse biased as a light sensor is a current source proportional to the light level. Being a current source, it have very high impedance (a perfect current source has infinite impedance). The response time is proportional to the resistance of the node times the capacitance. Since the capacitance is parasitic, it is hard to guess and will depend a lot on the particular LED and on layout. The resistance is the deliberate resistance R1 in parallel with any leakage resistance and the resistance of the LED being a imperfect current source. Other then R1, these are again hard to guess. 20 MΩ is so high that leakage can be a important factor. Even dirt on the board and ambient humidity matters at that impedance.

As for how to determine the voltage, that again must be done experimentally. Unless you have a unusual LED that is intended also for reverse operation, you're not going to get a spec. Test a few and leave lots of room for device variation.

I would use a considerably lower resistance with some amplification. The lower resistance will decrease the response time and make things more predictable by making the leakage resistance small enough in comparison to not matter. You are currently getting ouputs from 150 mV to 5 V with 20 MΩ. With 2 MΩ instead, those voltages will be 15 mV to 500 mV, which is still big enough for plenty of opamps to amplify reliably and should be low enough to make leakage ignorable. It may still be too slow, in which case you can use lower resistance still with better amplification.

Another point is that if your supply is large enough to get 5V on R1, then you may be applying too much reverse voltage to the LED in low light conditions. Check the LED datasheet (this usually is specified) and make sure you're not exceeding the reverse voltage limit. A lower resistance will let you use lower reverse bias voltage.