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:
- Gain (V/A) = R_f — large R_f gives more signal and lower noise relative to signal
- Photodiode capacitance with R_f creates a noise-gain zero → needs C_f for stability
- Bandwidth ≈ √(GBW/(2πR_f C_d)) — faster op-amp or smaller C_d for speed
- Reverse-bias the photodiode (photoconductive mode) to cut C_d for speed; zero bias (photovoltaic) for lowest dark current
- Choose FET-input op-amps for pA bias current
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
- TIA:
V_out = −I_ph·R_f; f_−3dB ≈ √(GBW/(2πR_f C_d)) - TIA stability:
C_f ≈ √(C_d/(2πR_f·GBW)) (≈ 45–65° phase margin) - Log amplifier:
V_out = −V_T·ln(V_in/(R·I_S)); slope 59.5 mV/decade at 25 °C - Instrumentation amp (3 op-amp):
G = (1 + 2R/R_G)·(R₃/R₂) - Precision rectifier:
V_out = |V_in| (full-wave) — no diode drop - Howland current source:
I_out = V_in/R (when R₂/R₁ = R₄/R₃)
Worked example: TIA output
Given: R_f 10 MΩ, I_ph 1 nA
Find: V_out.
- 1 nA × 10 MΩ
Answer: −10 mV
Worked example: In-amp gain resistor
Given: G = 1 + 49.4 kΩ/R_G, target G = 100
Find: R_G.
- 49.4 k/99
Answer: ≈ 499 Ω
Worked example: Log-amp output change
Given: Current increases 1000×
Find: ΔV_out.
- 3 decades × 59.5 mV
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 outputA 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
- Wrong: Omitting C_f in a TIA. — Right: Photodiode capacitance makes it ring or oscillate.
- Wrong: Floating in-amp inputs without a bias return. — Right: Provide a DC path to ground for bias currents.
- Wrong: Using a bipolar op-amp for femtoamp currents. — Right: Use FET/CMOS inputs with guard rings.
Applications
- Optical receivers: Photodiode TIAs in fibre links and LiDAR.
- Medical: ECG in-amps, pulse oximeter TIAs.
- Metering: Precision rectifiers and RMS converters.
- Chemistry: Log amps for absorbance, pH electrodes.
Key takeaways
- TIA: V = −I·R_f; C_f needed for stability.
- Diodes in the loop give precision rectification.
- In-amps: high CMRR differential gain, set by R_G.
- Log amps compress decades using V_BE's exponential law.
Going further
- TIA noise analysis: e_n·C_d noise gain peaking.
- Lock-in amplification: Synchronous detection of weak signals.
- RMS-to-DC converters: Log-antilog computing.