I understand the basic circuits used with phototransistors:
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?