Advanced Op-Amp Applications: TIA, Log, Precision Rectifier & Instrumentation

Op-amps doing more than gain. Learn the transimpedance amplifier (photodiode front end) with its bandwidth and feedback-capacitor stability, logarithmic and exponential amplifiers, precision half- and full-wave rectifiers and peak detectors, the three-op-amp instrumentation amplifier, voltage-to-current (Howland) and current-to-voltage converters, active clamps and bootstrapping — with Python computing TIA bandwidth and C_f, log-amp slope and instrumentation-amp gain resistors.

Placing nonlinear devices (diodes, transistors) or unusual sources (photodiodes, sensors) inside the op-amp's feedback loop yields circuits that no passive network could: rectifiers that work at millivolts, amplifiers that compress 6 decades into a few volts, and current-to-voltage converters with femtoamp sensitivity.

These circuits are the front ends of optical receivers, medical instruments, RMS meters and industrial sensor interfaces.

An analogy

Putting a diode inside the feedback loop is like having an assistant who automatically compensates for your weak spot: the op-amp raises its output by exactly the diode's drop, so the diode's 0.6 V threshold disappears from the result.

Precision rectifiers and peak detectors

A plain diode can't rectify signals smaller than ~0.6 V. Inside an op-amp loop the op-amp output swings up by the diode drop automatically, so the circuit rectifies microvolt signals. A second op-amp combines half-wave outputs into full-wave (absolute value) rectification, used in AC voltmeters and envelope detectors. Adding a hold capacitor turns it into a peak detector (with a reset switch).

Transimpedance amplifiers

Key design points:

Instrumentation amplifiers

In-amps amplify small differential signals on large common-mode voltages with high input impedance and high CMRR (100–130 dB) — bridge sensors, thermocouples, ECG. Integrated in-amps (AD620/INA128-style with G = 1 + 49.4 kΩ/R_G) have laser-trimmed resistors. Watch the input common-mode range at high gain (internal nodes may saturate), the REF pin (drive from a low impedance), and the need for a DC bias return path for floating sources.

Log/antilog and other nonlinear circuits

Log amplifiers use the exponential V_BE–I_C law of a transistor in the feedback path; matched transistors and a temperature-compensating gain stage cancel I_S and V_T drift. Antilog (exponential) circuits swap the positions. Together they build multipliers, dividers and RMS converters. Other tricks: Howland current pumps for sensor excitation, bootstrapping to raise input impedance, active clamps and ideal diodes for power ORing.

Formulas

Worked example: TIA output

Given: R_f 10 MΩ, I_ph 1 nA

Find: V_out.

Answer: −10 mV

Worked example: In-amp gain resistor

Given: G = 1 + 49.4 kΩ/R_G, target G = 100

Find: R_G.

Answer: ≈ 499 Ω

Worked example: Log-amp output change

Given: Current increases 1000×

Find: ΔV_out.

Answer: ≈ 179 mV

Transimpedance amplifier and 3-op-amp in-amp

  TIA (photodiode)                 3-op-amp instrumentation amplifier
         C_f                         V+ ─▷A1─┬─ R ─┐
       ┌─||─┐                              R           ├─ R₂ ─┐ R₃
       ├─R_f─┤                              R_G    difference │
  PD ──┤−    │                              R      amp (A3)  ├─▷── V_out
  ▼    │ ▷───┴── V_out = −I·R_f        V− ─▷A2─┴─ R ─┘ R₂ ──┘ R₃ ─ REF
  GND ─┤+

The TIA holds the photodiode at 0 V (virtual ground) so its current flows entirely into R_f — linear, fast and free from the diode's capacitance charging. The in-amp's first stage gives high-impedance differential gain (1 + 2R/R_G) with unity common-mode gain; the difference stage rejects the common mode.

TIA bandwidth, log slope and in-amp gain

import math
# Advanced op-amp applications: TIA bandwidth/stability, log amp, instrumentation amp gain, precision rectifier
# Transimpedance amplifier: photodiode 20 pF, Rf 1 Mohm, op-amp GBW 10 MHz
Cd, Rf, GBW = 20e-12, 1e6, 10e6
f3db = math.sqrt(GBW / (2 * math.pi * Rf * Cd))
Cf_opt = math.sqrt(Cd / (2 * math.pi * Rf * GBW))
print(f"TIA achievable bandwidth ~ {f3db/1e3:.0f} kHz; feedback C for ~Butterworth response {Cf_opt*1e12:.2f} pF")
# Log amplifier: Vout = -VT ln(Iin/Is) ; per-decade slope
VT = 0.02585
print(f"log amp slope {VT*math.log(10)*1e3:.1f} mV/decade of input current")
# 3-op-amp instrumentation amplifier gain = (1 + 2R/RG) * (R3/R2)
R, RG = 25e3, 1e3
print(f"inst-amp gain with RG 1k: {(1+2*R/RG):.0f}; RG for gain 1000: {2*R/999:.1f} ohm")
# Precision half-wave rectifier: a 10 mV peak signal through a plain diode vs precision circuit
print("plain diode: 10 mV signal -> ~0 V output (below 0.6 V threshold); precision rectifier: 10 mV peak output")
# TIA achievable bandwidth ~ 282 kHz; feedback C for ~Butterworth response 0.56 pF
# log amp slope 59.5 mV/decade of input current
# inst-amp gain with RG 1k: 51; RG for gain 1000: 50.1 ohm
# plain diode: 10 mV signal -> ~0 V output (below 0.6 V threshold); precision rectifier: 10 mV peak output

A 1 MΩ TIA with a 20 pF photodiode and a 10 MHz op-amp reaches about 280 kHz and needs only ~0.56 pF of feedback capacitance for a well-damped response — comparable to PCB parasitics, so layout matters. The log amplifier compresses each decade of current into 59.5 mV. One resistor, R_G, sets in-amp gain from 1 to 1000.

Common mistakes

Applications

Key takeaways

Going further