2026-05-03
Many sensors output current, not voltage. Photodiodes, phototransistors, and some gas sensors produce a tiny current proportional to what they're measuring. Your ADC needs a voltage. The transimpedance amplifier (TIA) bridges that gap — it converts an input current into a proportional output voltage.
The circuit is deceptively simple: take an op-amp, connect the current source to the inverting input, tie the non-inverting input to ground (or a reference voltage), and place a feedback resistor Rf from the output back to the inverting input. The output voltage is:
Vout = −Iin × Rf
That's it. A 1 µA input current through a 1 MΩ feedback resistor gives you −1 V out. The negative sign just means the output is inverted; if you need positive output, either use a subsequent inverting stage or bias the non-inverting input to a positive reference.
The stability problem. Here's where beginners get burned. Every photodiode has junction capacitance (typically 10–100 pF), and your op-amp's inverting input has stray capacitance too. That capacitance combined with the high-value feedback resistor creates a pole that can make your TIA oscillate wildly. The fix is a small feedback capacitor Cf in parallel with Rf. A good starting-point value is:
Cf ≥ √(Cin / (2π × Rf × GBW))
where Cin is the total input capacitance and GBW is the op-amp's gain-bandwidth product. For example: with Cin = 50 pF, Rf = 1 MΩ, and a 10 MHz GBW op-amp, you get Cf ≥ √(50e-12 / (6.28 × 1e6 × 10e6)) ≈ 0.9 pF. Start with 1 pF and adjust from there. Too much Cf kills your bandwidth; too little lets oscillation through.
Real-world example: ambient light sensors. A BPW34 photodiode produces roughly 50 µA in bright indoor light. With Rf = 100 kΩ, you get 5 V out — a clean signal for a microcontroller ADC. For dim-light detection (nanoamp currents), you'd push Rf into the tens of megaohms, but now PCB leakage currents and op-amp input bias current start to matter. Choose a FET-input op-amp like the OPA380 or LTC6240 with femtoamp-level bias currents for these applications.
Practical tips:
