I’ve been lying to my students a bit with the simple circuit I gave them for measuring light levels:
First, previous schematics have been showing a PNP phototransistor, when an NPN one was clearly needed (and I’ve been talking all along to them about NPN phototransistors, and simply not noticing that I was drawing a PNP one). I’ll have to correct this in class!
Second, although the simple circuit that I gave them is sometimes used, photodiodes are usually used with a constant voltage drop across the diode, with a transimpedance amplifier to measure the current:
Two common bias voltages are used: one which puts zero volts across the photodiode, so that there is no dark current, and one that puts a few volts of reverse bias on the diode, so that the depletion region at the diode junction is thicker and parasitic capacitance of the junction reduced (improving the bandwidth of the detector).
An even better design, and the one that I would probably use if I wanted to hook up a photodiode to an Arduino or KL25Z for good measurements is a two-stage amplifier:
Of course, the biggest lie I told them was about the meaning of the Open Circuit Voltage spec for photodiodes. A photodiode acts like a tiny photocell, and if not externally biased will produce a small voltage. With the simple circuit at the top of the page, using a PD204-6C photodiode and a 5.6MΩ resistor for R2, I got V2 output voltages from 3mV up to 5.55V. The photovoltaic effect can raise the voltage substantially above the 5V power rail! This is not a problem with transimpedance amplifier designs, since the amplifier can provide enough current to keep the cathode of the photodiode clamped at V_ref. The phototransistor design also does not have the same problem with the photovoltaic effect—using WP3DP3BT as Q1 and R1=120kΩ, I get readings from 1mV to the full 5v, but not beyond 5v.
I think I’ll let the freshman design class know about this problem with the photodiode circuit, and that there is a relatively simple solution, but I don’t think I’ll try to get them to design the improved circuit. I think it would be a good replacement for the rather unsuccessful phototransistor lab in the applied circuits course, though, especially as transimpedance amplifiers are fundamental to a lot of bioelectronics (patch-clamp measurements of ion channels, nanopores, nanopipettes, …).