I understand the basic circuits used with phototransistors: Basic phototransistor circuits

I believe that this is essentially a voltage divider, commonly used for all sorts of analog sensors. In the left circuit, in the dark, the phototransistor is very high impedance, making Vout close to Vcc, and dropping as more light is detected. In the right circuit, Vout is close to GND, going up as more light is detected.

I would like to use an IR phototransistor to detect IR pulses (low frequency, of unknown duration), and I'm not sure how to choose a value for the resistor. Ideally, I would like to avoid using an ADC, and just detect a logic high/low with a microcontroller. If I need to use an ADC and detect voltage at a certain threshold, then that is possible, as well.

How do I choose an appropriate resistor given datasheet values for the phototransistor? I know that dark current is 100nA (Vce = 15V) and light current is 20mA (Vce = 5 V, H = 20 mW/cm), and collector current is 25mA, but I'm not sure how to turn those values into a suitable resistor. An application note I found says that "the load resistor (RL) should be set in relation with the collector current (IC) as Vcc < RL × IC." That gives me a resistor of 132 ohms or less using 3.3V, however, and that seems pretty small, given what I've found recommended elsewhere (up into the tens of kOhms).

How do I chose this resistor value appropriately?


1 Answer 1


The voltage accross the resistor is the current thru it times its resistance. That's basic Ohm's law. The values you give are a bit conflicting and misleading, but let's say the maximum light current is 20 mA. If the power supply is 5 V and you want 500 mV on the transistor so it doesn't saturate, then that leaves 4.5 V on the resistor. 4.5V/20mA = 225 Ω.

However, things are not that simple. The ambient light level can vary by a large margin, so the DC dynamic range has to be high. To be safe, you make sure that the resulting voltage stays linear with light up to the maximum light the transistor is rated for or you know will ever be encountered. That's what I did in the example above. The problem with that is that gain will be very low. The signal you want may only be a millivolt or possibly less.

This is why light sensors like this are almost always AC coupled. Use the largest resistor that still allows about 500 mV accross the transistor with maximum light, then AC couple that into a amplifier. The ambient light level is DC or slowly changing, so will get blocked. Now you can amplify the AC signal in the frequency range you are looking for. This may require a voltage gain of 100s to 1000 or more. Anything you can do mechanically to eliminate ambient light pickup and strengthen the intended received beam will help. With lower maximum ambient light, you can make the resistor larger, which increases gain.

  • \$\begingroup\$ Excellent, thank you. This phototransistor will be sitting a cm or two from the IR LED I want to read pulses from, and I should be able to eliminate nearly all ambient light, so I'm hoping I don't need an amplifier. I'll give it a shot. \$\endgroup\$
    – Mark
    Commented Mar 14, 2012 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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