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?
  • \$\begingroup\$ What Olin says (as usual :-) ). That's an utterly superb application note - thanks for bringing it to attention. As the app note says - response time is related to R, & C_LED. AND C_LED is related to reverse bias voltage _- Cd - see app note). If you can REDUCE the reverse bias you will improve response time, probably at the expense of sensitivity - but this gives you another parameter to play with. \$\endgroup\$
    – Russell McMahon
    Sep 4, 2011 at 22:55
  • \$\begingroup\$ @Russell What puzzles me is the definition of C_LED - most terms are defined, but A isn't defined anywhere, and V_D and n don't really have any explanation for their values. \$\endgroup\$ Sep 5, 2011 at 0:34
  • \$\begingroup\$ I'd assume (possibly incorrectly) that A is a constant - ie it's the delta potential multiplied by a device dependant constant. They say "n:2-3" which I assume means you subtract 1/3 to 1/2 from the result. ie it's empirical. I also assume this is in pF (as Farads seems a bit large :-) ). A more rigorous version of that formula could be located but the main point ios that capacitance increases with bias voltage above some limit. \$\endgroup\$
    – Russell McMahon
    Sep 5, 2011 at 1:17
  • \$\begingroup\$ Link seems to have died, any possibility of editing in at least the title of it? \$\endgroup\$ Sep 18, 2017 at 14:29

2 Answers 2


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.

  • \$\begingroup\$ Thanks. I'm only reverse biasing it to 5v, which is within the absolute max on the datasheet. It sounds like the only way I'm going to determine this is by experimentation? Is leakage resistance the source of what the tech note describes as 'dark current'? \$\endgroup\$ Sep 4, 2011 at 22:32
  • \$\begingroup\$ @Nick: As I said, the LED in reverse looks mostly like a current source proportional to light. It's not a leakage resistance as much as a light-dependant leakage current. Dark current is the LED reverse leakage current with no light on it. You can think of that as the DC offset when used in a light measuring application. \$\endgroup\$ Sep 5, 2011 at 11:27

LEDs do have reverse capacitance and this is a real problem for some applications. I determined experimentally that the reverse capacitance on some blue diodes (notably in UPS front panels) can be as high as 300pF and very voltage dependent so they can indeed be used as varicaps if light shielded. This can be a source for interference if it causes regulator or output stage instability.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.