The Short Answer: How a Photodiode Actually Works on the Bench
If you are asking how does a photodiode work, the practical answer is that it is a semiconductor PN junction optimized to convert incoming photons into a measurable electrical current. When light strikes the depletion region of the junction, it excites electrons, creating electron-hole pairs. If there is an electric field present (either from an external voltage or the junction's internal built-in potential), these charge carriers are swept apart, generating a current that flows through your external circuit.
Unlike LEDs, which emit light when forward-biased, photodiodes are almost always operated in reverse bias or zero bias. The current they produce is incredibly small—typically in the nanoamp (nA) to microamp (µA) range—and is strictly proportional to the light intensity hitting the active area.
Photovoltaic vs. Photoconductive: Choosing Your Bias Region
The biggest mistake hobbyists make with photodiodes is treating them like light-dependent resistors (LDRs). They are current sources, not variable resistors. How you bias the diode dictates its speed, noise floor, and linearity. Here is how the two primary operation regions compare on the bench:
| Parameter | Photovoltaic Mode (Zero Bias) | Photoconductive Mode (Reverse Bias) |
|---|---|---|
| Applied Voltage | 0V (Anode and Cathode at same potential) | -5V to -100V (Cathode more positive than Anode) |
| Output Current | nA to low µA | µA to mA |
| Response Speed | Slow (kHz range) | Fast (MHz to GHz range) |
| Junction Capacitance | High (limits bandwidth) | Low (depletion region widens) |
| Dark Current (Noise) | Essentially zero | Present (nA to µA, increases with temp) |
| Best Application | Precision light meters, pulse oximetry | Fiber optics, laser tripwires, high-speed encoders |
How to select: If you need absolute precision and low noise (like measuring ambient room light or building a medical sensor), use photovoltaic mode. If you need to detect fast pulses, like reading a slotted optical encoder wheel spinning at 10,000 RPM, you must use photoconductive mode to shrink the junction capacitance and speed up the response.
The Go-To Application: Building a Transimpedance Amplifier (TIA)
Because a photodiode outputs current, you cannot simply read it with a microcontroller's ADC. You need a Transimpedance Amplifier (TIA) to convert that tiny current into a usable voltage. The formula is simple: V_out = I_photodiode × R_feedback.
Here is a complete, bench-proven single-supply TIA circuit designed for high-speed pulse detection using an OPA380 op-amp and a standard silicon photodiode.
Circuit Specifications & Component Values
- U1 (Op-Amp): OPA380 (Specifically designed for TIAs with low input bias current and high gain-bandwidth product).
- D1 (Photodiode): Vishay BPW34 (Broad area, high sensitivity).
- R_f (Feedback Resistor): 1 MΩ (Sets the gain: 1 µA of light current = 1V output).
- C_f (Feedback Capacitor): 15 pF (Critical for stability; prevents high-frequency oscillation).
- Power Supply: Single +5V rail.
Wiring the TIA (Photoconductive Mode)
- Connect the OPA380 V+ pin to +5V and V- pin to GND.
- Connect the OPA380 non-inverting input (+) directly to GND. This sets our virtual ground reference.
- Connect the photodiode Cathode to the +5V rail. (This applies a 5V reverse bias across the diode).
- Connect the photodiode Anode to the OPA380 inverting input (-).
- Place the 1 MΩ R_f resistor between the OPA380 output and the inverting input (-).
- Place the 15 pF C_f capacitor in parallel with R_f (solder it directly across the resistor legs to minimize parasitic inductance).
Bench War Story: When a 50ns Laser Pulse Turned Into a 5V Rail Slew
Theory is clean; the bench is messy. Last year, I was building an optical RPM counter for a high-speed motor using a 650nm red laser and a BPW34 photodiode. The motor had a 60-slot encoder wheel, meaning I needed to cleanly resolve pulses occurring every 80 µs.
The Setup: I built the TIA circuit above, but to save time, I omitted the 15 pF feedback capacitor, assuming the OPA380's internal compensation would handle it. I operated the BPW34 in zero-bias (photovoltaic) mode to avoid needing a negative voltage rail.
The Numbers: The laser hitting the BPW34 generated roughly 4 µA of peak current. With a 1 MΩ feedback resistor, I expected a clean 4V square wave pulse on my oscilloscope.
The Outcome: The output was a smeared, ringing mess that hovered around 4.5V and never dropped below 2V. The microcontroller's interrupt pin completely missed half the slots, reading the motor speed at exactly half its actual RPM.
What Went Wrong: Two massive errors. First, in zero-bias mode, the BPW34's junction capacitance is at its maximum (around 60 pF). Without the C_f compensation capacitor, the TIA was oscillating at roughly 3 MHz, which my scope's 20MHz bandwidth filter was smoothing into a thick, noisy DC blob. Second, the ambient fluorescent room light was generating a baseline 2 µA of DC current, pushing my baseline voltage up to 2V before the laser even hit it.
The Fix: I switched to photoconductive mode by tying the cathode to +5V. This reverse bias widened the depletion region, dropping the junction capacitance from 60 pF down to about 15 pF. I then added a 10 pF feedback capacitor. The oscillation vanished, the baseline dropped to near 0V (as the ambient light was AC-coupled out in software), and the 4V laser pulses became razor-sharp 50ns edges. The RPM counter worked flawlessly.
Safe Default Part Numbers and Datasheet Ratings
Do not buy unbranded "light sensor diodes" from bulk bins. The junction capacitance and dark current specs will be nonexistent. Here are three safe, readily available defaults for 2026 builds:
| Part Number | Manufacturer | Best For | Key Ratings | Approx. Price (1pc) |
|---|---|---|---|---|
| BPW34 | Vishay / Osram | General purpose, ambient light, slow pulse detection. | Active Area: 7.5 mm², V_R(max): 60V, Dark Current: 2 nA | $0.85 |
| SFH203 | Osram | High-speed encoders, IR data links, laser tripwires. | Active Area: 1 mm², V_R(max): 30V, Rise Time: 5 ns | $1.20 |
| S1223 | Hamamatsu | Precision lab equipment, low-light spectrometry. | Active Area: 5.8 mm², V_R(max): 30V, Dark Current: 0.1 nA | $4.50 |
Troubleshooting: How to Test a Photodiode with a Multimeter
Photodiodes rarely fail unless you exceed their maximum reverse voltage (causing avalanche breakdown) or physically crack the epoxy package. If your TIA circuit is outputting a flat 0V or is pegged to the positive rail, the diode is your first suspect. Here is how to test it on the bench using a standard digital multimeter (DMM).
Step 1: The Diode Test (Forward Bias Check)
- Remove the photodiode from the circuit. Testing in-circuit will yield false readings due to parallel feedback resistors.
- Set your DMM to the Diode Test mode (usually indicated by a diode symbol).
- Place the red probe on the Anode (long lead) and the black probe on the Cathode (short lead).
- Expected Reading: You should see a forward voltage drop between 0.400V and 0.600V (typical for silicon). If it reads OL (Open Loop) or 0.000V (Short), the diode is dead.
Step 2: Reverse Bias Leakage Check
- Swap the probes: Black on Anode, Red on Cathode.
- Expected Reading: The meter should read OL (Over Limit). If it reads any voltage drop or continuity beep, the junction is shorted internally.
Step 3: The Flashlight Current Test (The Real Proof)
- Set your DMM to the µA (microamp) current measurement range.
- Connect the red probe to the Anode and the black probe to the Cathode. (The DMM's internal shunt resistor will act as a zero-bias load).
- Cover the diode with your hand to block all light. Expected Reading: Less than 0.1 µA (often reads 0.00 on standard DMMs).
- Shine a bright white LED flashlight or your phone's flash directly onto the epoxy window.
- Expected Reading: The current should immediately jump into the 10 µA to 80 µA range, scaling smoothly as you move the light closer or further away. If the current does not react to light, the internal wire bond is broken, and the part belongs in the trash.






