A photodiode light detector converts incoming photons into a measurable electrical current. However, you cannot simply hook a photodiode directly to a microcontroller's ADC and expect a usable reading. The raw current output is typically in the nanoamp to microamp range, requiring a transimpedance amplifier (TIA) to convert that current into a stable voltage. To build a reliable optical sensor, you must select the correct semiconductor junction, apply the right bias voltage to control junction capacitance, and manage stray capacitance in your feedback loop.

This guide skips the abstract solid-state physics and goes straight to the bench: which part numbers to buy, how to wire the TIA, and how to troubleshoot the inevitable high-frequency oscillations that plague first-time optical builds.

Photodiode Symbol, Pinout, and Safe Default Part Numbers

The schematic symbol for a photodiode is a standard diode (a triangle pointing at a vertical line) with two inward-pointing arrows striking the junction, indicating photon absorption. Unlike LEDs, which emit light when forward-biased, photodiodes are operated in reverse bias or zero bias to generate a current proportional to light intensity.

Pinout Identification:
For standard through-hole epoxy packages, the Cathode is the longer lead and corresponds to the rounded edge of the plastic case. The Anode is the shorter lead, located next to the flat edge of the case. In metal TO-5 or TO-18 cans (often used for high-precision visible light detection), the metal case itself is typically tied to the anode or serves as a separate shield pin—always verify with the specific datasheet before soldering.

If you are starting a new design and need a reliable, readily available silicon photodiode, these are the safe defaults:

Part NumberManufacturerSpectral PeakActive AreaJunction Cap. (at 5V)Max Reverse Voltage
BPW34Vishay / Osram900 nm (Vis/NIR)7.5 mm²65 pF50 V
SFH203FAOsram900 nm (IR)4.8 mm²50 pF50 V
BPW21RVishay565 nm (Vis)7.5 mm²250 pF15 V
Bench Tip: The SFH203FA features a built-in daylight-blocking filter (black epoxy). If your application is in an IR remote control receiver or a beam-break sensor in a sunlit room, choose the SFH203FA over the clear-epoxy BPW34 to reject 60Hz/120Hz fluorescent and ambient solar noise.

Biasing Modes and Operation Regions

How you bias the photodiode dictates its speed, noise floor, and linearity. Selecting the right mode depends entirely on your bandwidth requirements.

Operation ModeBias VoltageJunction CapacitanceResponse TimeBest Application
Photovoltaic (Zero Bias)0 VHigh (e.g., 150 pF)Slow (µs to ms)Precision DC light metering, low-noise solar tracking
Photoconductive (Reverse Bias)5 V to 50 VLow (e.g., 15 pF)Fast (ns to µs)High-speed data links, LiDAR, 10kHz+ pulse detection

Applying a reverse bias voltage widens the depletion region inside the silicon. This wider depletion zone does two things: it reduces the junction capacitance ($C_j$), which increases the maximum bandwidth, and it sweeps charge carriers across the junction faster, reducing response time. The trade-off is a slight increase in dark current (the tiny leakage current that flows even in total darkness), which adds shot noise to your signal.

The Transimpedance Amplifier (TIA) Application Circuit

To convert the photodiode's microamp output into a voltage an ESP32 or Arduino ADC can read (0-3.3V), we use a Transimpedance Amplifier. The TI OPA380 is a purpose-built TIA op-amp with a 90 MHz gain-bandwidth product and ultra-low input bias current.

Target Specifications:
Gain: 1 V per µA of light current ($R_f = 1 M\Omega$).
Bandwidth: ~150 kHz.
Supply: 5V single supply.

  1. Power the OPA380: Connect Pin 8 to +5V and Pin 4 to GND. Place a 100 nF ceramic decoupling capacitor directly across these pins.
  2. Bias the Photodiode: Connect the BPW34 Cathode to the +5V rail. Connect the Anode to the inverting input (Pin 2) of the OPA380. This applies a 5V reverse bias across the diode.
  3. Set the Reference: Connect the non-inverting input (Pin 3) to GND. (If you need to measure bidirectional light changes, tie Pin 3 to a 2.5V voltage divider instead).
  4. Install Feedback Resistor ($R_f$): Solder a 1 MΩ, 1% tolerance metal film resistor between the inverting input (Pin 2) and the output (Pin 6).
  5. Install Feedback Capacitor ($C_f$): Solder a 2.7 pF ceramic capacitor in parallel with the 1 MΩ resistor. Do not skip this component. It compensates for the 65 pF junction capacitance of the BPW34 and prevents the op-amp from oscillating.
  6. Output Filtering: Route the output (Pin 6) through a 100 Ω series resistor to your microcontroller's ADC pin to isolate the op-amp from the ADC's sampling capacitor kickback.

Bench Walkthrough: Building and Breaking a 10kHz Optical Receiver

Theory is clean; the workbench is not. Here is a real-world scenario demonstrating how stray capacitance destroys a photodiode light detector design.

The Setup: We needed to detect a 10 kHz pulsed IR LED from 3 meters away for an indoor positioning beacon. We chose the SFH203FA (IR, daylight blocking) and wired it to an OPA380 on a solderless breadboard. Based on the LED's irradiance at 3 meters, we expected a peak signal current of 400 nA. We installed a 2.2 MΩ feedback resistor to yield a target peak output voltage of 0.88 V.

The Outcome: Upon powering the circuit and connecting a 1-meter RG-58 coaxial BNC cable from the breadboard to the oscilloscope, the scope displayed a massive, continuous 4.5 MHz sine wave oscillation. The 10 kHz pulse envelope was completely buried under 2V peak-to-peak of high-frequency noise.

What Went Wrong: The oscillation was caused by excessive phase shift in the feedback loop. The 1-meter coaxial cable added roughly 30 pF of stray capacitance directly to the scope probe, but more critically, the solderless breadboard's internal metal strips added ~5 pF of parasitic capacitance between the inverting input node and ground. Combined with the SFH203FA's 50 pF junction capacitance, the total input capacitance exceeded the compensation provided by our initial 1.5 pF feedback capacitor.

The Fix: 1. We removed the breadboard and dead-bugged the OPA380 directly onto the photodiode leads, minimizing the inverting node trace length to under 3 mm.
2. We increased the feedback capacitor ($C_f$) to 3.9 pF to guarantee stability margin.
3. We moved the coaxial cable connection to the output side of a 100 Ω isolation resistor.
The 4.5 MHz oscillation vanished, leaving a clean, 850 mV 10 kHz square wave.

How Photodiodes Fail and Multimeter Diode Testing

Photodiodes are robust, but they are not invincible. Understanding their failure modes saves hours of debugging when a circuit suddenly goes dark.

Common Failure Modes

  • Shattered Junction (ESD/Overvoltage): Exceeding the maximum reverse voltage (e.g., applying 60V to a 50V BPW34) causes avalanche breakdown, permanently shorting the anode and cathode.
  • Epoxy Degradation: Clear-epoxy photodiodes exposed to intense, unfiltered UV light or high-heat soldering profiles can yellow or crack, altering their spectral response and reducing sensitivity to visible light.
  • Lead Fatigue: Repeated bending of the leads near the epoxy body breaks the internal gold wire bond, resulting in an open circuit.

Testing with a Digital Multimeter (DMM)

You can verify a photodiode's health using a standard multimeter in two steps:

1. The Diode Test (Dark Room):
Set your DMM to the diode test mode. Cover the photodiode with your hand or work in a dark room. Place the red probe on the Anode and the black probe on the Cathode. A healthy silicon photodiode will show a forward voltage drop between 0.40 V and 0.60 V. Reverse the probes (black to Anode, red to Cathode); the meter should read 'OL' (Open Loop). If it reads 0.00 V in both directions, the junction is shorted. If it reads 'OL' in both directions, the internal wire bond is broken.

2. The Photovoltaic Light Test:
Set your DMM to DC millivolts (mV). Connect the red probe to the Anode and the black probe to the Cathode. Shine a bright LED flashlight directly onto the epoxy lens. A functioning photodiode will generate an open-circuit voltage, typically jumping from 0 mV to anywhere between 50 mV and 350 mV depending on the light intensity. If the voltage remains at 0 mV under bright light, the semiconductor junction is dead.

For deeper characterization, such as measuring exact dark current or spectral responsivity, refer to the application notes provided by All About Circuits or the manufacturer's optoelectronics design guides. But for 95% of bench troubleshooting, the DMM diode and light tests will immediately isolate a dead component from a bad amplifier circuit.