Electronics Design AU
SensorsAnalog

How Do You Design a Transimpedance Amplifier for a Photodiode Sensor?

Last updated 7 July 2026 · 8 min read

Direct Answer

A photodiode produces a current proportional to incident light, typically nanoamps to low microamps for ambient-light-level sensing — far too small and too high-impedance a signal to feed an ADC directly. A transimpedance amplifier (TIA) converts that current to a voltage using an op-amp with a feedback resistor R_f in place of the usual feedback network: the photodiode's current is forced through R_f, producing an output voltage V_out = -I_photodiode × R_f (inverting configuration) while holding the photodiode's own terminals at a nearly constant voltage — the property that a passive resistor-to-ground conversion can't provide. The two design decisions that matter most are sizing R_f for the required sensitivity without saturating the op-amp, and adding a small feedback capacitor to counteract the peaking and potential oscillation caused by the photodiode's own junction capacitance interacting with the op-amp's input capacitance.

Detailed Explanation

A photodiode is referenced across this site only as a component inside something else — the detector inside an optocoupler, the sensing element behind an optical encoder disc — but the circuit that actually turns a photodiode's current output into a usable voltage, the transimpedance amplifier (TIA), has no dedicated coverage. This page covers that circuit directly: why a photodiode needs an active current-to-voltage converter rather than a passive one, how to size it, and the stability problem that catches most first-time TIA designs.

Why a Photodiode Needs a Transimpedance Amplifier, Not Just a Resistor

A photodiode operating in photovoltaic mode behaves as a current source: incident light generates a photocurrent (I_photodiode) proportional to optical power, typically in the nanoamp-to-low-microamp range for ambient-light-level sensing and up to milliamps for a photodiode deliberately exposed to a bright, focused source. The naive approach — a resistor from the photodiode to ground, forming a simple current-to-voltage divider like the shunt-resistor technique used for measuring current with a shunt resistor — works electrically but performs poorly here, for a reason that doesn't apply to shunt-resistor current sensing: a photodiode's own output impedance is very high, and any voltage that develops across it as its current flows through a resistor to ground shows up directly as photodiode bias, which changes its response and, at higher photocurrent, drives it toward saturation of the resistor's own voltage range long before useful signal levels are reached.

A transimpedance amplifier solves this by placing the photodiode directly at an op-amp's inverting input (in place of the standard input resistor), with a feedback resistor R_f connecting the output back to that same inverting input. Because the op-amp's negative feedback holds the inverting input at a virtual ground (see what is an op-amp? for how virtual ground works) the photodiode always sees close to 0 V across itself — exactly the photovoltaic-mode condition it operates best in — while the op-amp forces the entire photocurrent to flow through R_f instead of charging up the photodiode's own junction capacitance. The output voltage is simply V_out = -I_photodiode × R_f, an inverting relationship analogous to the inverting amplifier configuration, but with a current source at the input instead of a voltage source through an input resistor.

                    R_f
              ┌──────///──────┐
              │                │
Photodiode ───┼──── (−) OA ────┴──── Vout = −I_photodiode × R_f
   (cathode   │      (+)
    to V+ or  │       │
    ground)   └───── GND (or bias V+)

Sizing the Feedback Resistor

R_f is chosen from the required output swing at the maximum expected photocurrent: R_f = V_out(max) / I_photodiode(max). A photodiode producing 500 nA at the brightest expected condition, targeting a 3 V full-scale output, needs R_f = 3 V / 500 nA = 6 MΩ — a value that would look unusual in most other analog circuits but is routine in a TIA. Larger R_f gives more sensitivity per unit of light but directly costs bandwidth (covered below) and increases the resistor's own Johnson noise contribution to the output, which sets a practical ceiling on how far R_f can be pushed for a given noise budget.

Bandwidth and the Stability Problem

The photodiode's junction capacitance (C_j, typically a few pF for a small photodiode, tens of pF for a larger-area one) sits directly at the op-amp's inverting input, in parallel with the op-amp's own input capacitance. This total input capacitance, combined with R_f, forms a pole inside the feedback loop — and because this pole is often well within the op-amp's own gain-bandwidth-limited loop response, it erodes phase margin and produces frequency-response peaking, or in the worst case outright oscillation, especially with a high-value R_f and a relatively slow op-amp.

The standard fix is a small feedback capacitor C_f placed in parallel with R_f. Correctly sized, C_f introduces a zero in the feedback network that restores adequate phase margin, and the resulting circuit's closed-loop bandwidth is then set by the R_f/C_f time constant: f_-3dB = 1 / (2π × R_f × C_f). This is a genuine trade-off, not a free stability fix — adding C_f to fix oscillation directly reduces the achievable bandwidth, so a design that needs both high sensitivity (large R_f) and high bandwidth (fast response) requires either a lower-capacitance photodiode, a faster op-amp with lower input capacitance, or splitting the gain across two lower-gain TIA/amplifier stages rather than one very-high-gain stage.

Noise Gain Peaking

A related but distinct effect from the stability problem above: the same input capacitance that erodes phase margin also increases the circuit's noise gain at higher frequencies — the op-amp's own input voltage noise is amplified more at frequencies where the input capacitance's impedance becomes comparable to R_f, producing a noise peak beyond the signal bandwidth of interest. This is why TIA noise analysis is usually done separately from a simple gain-bandwidth calculation: the feedback capacitor C_f that fixes stability also limits how much of that noise-gain peak actually reaches the output, so the same component serves both the stability and noise-shaping roles.

Practical Building Blocks

  • Op-amp selection. A photodiode TIA needs an op-amp with low input bias current (a FET or CMOS input stage, not a BJT input stage) because bias current flowing into the high-value R_f directly produces a DC offset error — the same consideration covered generally in sensor signal conditioning's treatment of high-impedance sensor interfaces. Low input capacitance and low input voltage noise are the other two priorities, in roughly that order for most ambient-light-level designs.
  • Dedicated photodiode-amplifier ICs. For common applications (ambient light sensing, proximity detection, optical power monitoring), integrated photodiode-plus-TIA or photodiode-plus-ADC modules (e.g. ambient light sensor ICs with an internal photodiode and digital output) avoid the discrete design entirely and are usually the better choice unless the application needs a photodiode type, size, or spectral response the integrated parts don't offer.
  • Guard ring / guard trace on the PCB. At R_f values in the MΩ range, PCB surface leakage current between the high-impedance inverting-input node and adjacent traces can rival the photocurrent itself. A grounded guard trace surrounding the sensitive node, on both the top and bottom layers, intercepts this leakage before it reaches the input.

Design Considerations

  • Match the photodiode bias mode to the application's priority. Photovoltaic (zero-bias) mode gives the best linearity and lowest dark current for precision, low-light measurement; reverse-biased (photoconductive) mode trades some dark current and linearity for meaningfully higher bandwidth — see the FAQ above for the full trade-off.
  • Always include a feedback capacitor, sized deliberately rather than added as an afterthought. A TIA built with only R_f and no C_f will often appear to work on the bench with a slow light source, then show ringing or oscillation once tested with a faster-changing light signal or a larger-area, higher-capacitance photodiode.
  • Budget input bias current against R_f before finalising the op-amp choice. A bias current of 1 nA through a 10 MΩ feedback resistor produces a 10 mV output offset — potentially significant against a small full-scale signal. FET-input and CMOS-input op-amps have bias currents in the femtoamp-to-picoamp range specifically to keep this error negligible even at high R_f values.
  • Route the high-impedance input node with a guard ring, not just short traces. Above a few MΩ of R_f, PCB leakage current (through flux residue, humidity, or the board material's own finite resistivity) becomes a real error source; a guarded, grounded trace around the sensitive node is standard practice at this impedance level, not an optional refinement.

Common Mistakes

  • Omitting the feedback capacitor and discovering oscillation only under fast-changing light. Because the circuit can appear stable with a slow bench light source, the stability problem often surfaces only after the product is exposed to a faster real-world light signal — always design C_f in from the start using the photodiode's actual junction capacitance, not just when oscillation is observed.
  • Selecting a BJT-input op-amp for a high-value R_f design. BJT-input op-amps have bias currents orders of magnitude higher than FET/CMOS-input parts; combined with a multi-MΩ feedback resistor, this produces a large, temperature-sensitive DC offset that can dominate the actual measurement.
  • Treating the photodiode's dark current as negligible without checking the datasheet at the actual operating temperature. Dark current roughly doubles for every 8–10°C rise in most silicon photodiodes — a dark current that's negligible at 25°C can become a significant fraction of the signal at an elevated operating temperature inside an enclosed product.
  • Ignoring PCB leakage current at high R_f values. At R_f in the tens of MΩ, even the finite surface resistivity of standard FR-4 under flux residue or humidity can introduce a leakage current comparable to the signal itself — a guard ring around the input node, not just careful component placement, is the standard mitigation.

Zeus Design's engineering team designs optical sensing front ends — photodiode TIA circuits, ambient light and proximity sensing, and optical power measurement — as part of complete product electronics design.

Frequently Asked Questions

Should a photodiode be operated in photovoltaic mode or reverse-biased (photoconductive) mode?
Photovoltaic mode (zero volts across the photodiode, the standard TIA connection with the photodiode tied directly between the op-amp's inverting input and ground or a fixed bias) gives the lowest dark current and the best linearity at low light levels, because the photodiode isn't driven by an external bias at all — only the light-generated current flows. Reverse-biased (photoconductive) mode applies a small reverse voltage across the photodiode, which reduces its junction capacitance and therefore increases achievable bandwidth, at the cost of higher dark current (which now includes a bias-dependent leakage term) and a small nonlinearity from that leakage current. Use photovoltaic mode for precision, low-light, or DC/slow-changing measurements (ambient light sensing, precision optical power measurement); use reverse-biased mode when the application needs fast response (communications photoreceivers, pulsed rangefinding) and can tolerate the higher dark current.
How do I choose the feedback resistor value for a photodiode TIA?
Start from the required output voltage swing at the expected photocurrent range: R_f = V_out(max) / I_photodiode(max). For example, a photodiode producing 1 µA at full-scale light and a target 3 V output swing needs R_f = 3 V / 1 µA = 3 MΩ. Values in the hundreds-of-kΩ to tens-of-MΩ range are common for ambient-light-level sensing; a few kΩ to low hundreds of kΩ is more typical for higher-light-level or communications photoreceivers where bandwidth matters more than sensitivity. A larger R_f gives more gain (better sensitivity to low light) but reduces bandwidth (the R_f/feedback-capacitance pole moves lower) and increases the resistor's own Johnson noise contribution — the choice is a direct trade-off between sensitivity, bandwidth, and noise, not a value that can be maximised without cost.
Why does a photodiode TIA oscillate, and how is that fixed?
The photodiode's junction capacitance (typically a few pF to tens of pF, higher for larger-area photodiodes) combines with the op-amp's own input capacitance to form a capacitance to ground at the inverting input. Together with the feedback resistor R_f, this creates a second pole in the feedback loop that erodes phase margin — at typical TIA gain values this pole often falls well within the amplifier's loop bandwidth, which produces peaking in the frequency response and, in the worst case, sustained oscillation. The standard fix is a small feedback capacitor C_f in parallel with R_f, sized to introduce a zero that restores adequate phase margin; the resulting closed-loop bandwidth is set by the R_f/C_f pole, f = 1/(2πR_fC_f), rather than by R_f alone. Many op-amp manufacturers publish a TIA-specific stability calculator (entering photodiode capacitance, R_f, and desired bandwidth) that produces the correct C_f value directly, since the manual gain-bandwidth-product analysis is easy to get wrong.

References

Related Questions

Related Forum Discussions