Sub topic 13
Converting current to voltage
This chapter covers the transimpedance amplifier, which turns a current into a proportional voltage. It assumes you can apply the virtual short and the zero input current constraint with KCL, as in the inverting amplifier chapter. It also assumes you know Norton and Thevenin source equivalents and the relation i = C dv/dt.
Why measure current by turning it into a voltage
Many sensors produce a current, not a voltage. A photodiode, a photomultiplier tube, an ion chamber and the output stage of a current-output DAC all behave this way. Later circuitry, such as an ADC, usually wants a voltage.
The simplest conversion is a resistor to ground, with the voltage V = I·R measured across it. That approach has three problems:
- The source sees a voltage that changes with the signal. A photodiode's current, capacitance and leakage all depend on its bias voltage, so the response becomes nonlinear.
- The source drives a load resistance
R. Whatever reads the voltage next must not load it, which often forces an extra buffer. - A large
Rgives a large signal, but it also gives a large voltage across the source.
The op amp fixes the first problem by holding the source terminal at a fixed voltage, nearly 0 V, whatever the current is.
The circuit and its derivation
Connect the current source Is to the inverting input. Put a feedback resistor Rf from the output to that input. Tie the non-inverting input to ground.
Apply the analysis procedure:
- The non-inverting input is at 0 V. Negative feedback exists through
Rf, so the virtual short holds the inverting node at 0 V. - The op amp input draws no current. All of
Istherefore flows throughRf, from the node toward the output. - Write Ohm's law across
Rf, with the voltage at the node on the left:0 − Vout = Is·Rf.
The result is:
Vout = −Is · Rf
The constant −Rf has units of volts per ampere, which are ohms. It is called the transimpedance (or transresistance) gain. A current of 1 µA into the node with Rf = 1 MΩ produces −1 V.
The sign depends on the current direction. Current flowing into the inverting node gives a negative output. Reverse the sensor, or follow the stage with an inverting stage, if you need a positive output.
Relation to the inverting amplifier
This is the inverting amplifier with the source resistance absorbed. In the inverting amplifier, Vin and Rin produce the current Vin/Rin into the node, so Vout = −Rf·Vin/Rin. Here the current is supplied directly. Any Thevenin source Vs with series resistance Rs has the Norton current Is = Vs/Rs, so the two circuits are the same. The resistor Rs does not change the transimpedance gain. It only determines how much current is supplied.
Why the source sees almost no voltage
The inverting node stays at 0 V, so the source operates as if it were short-circuited. A photodiode in this condition works at zero bias. It has low dark current and no change of response with signal level.
With finite open-loop gain A, the node voltage is not exactly zero. Let Rs be a shunt resistance across the source (a photodiode's parallel resistance, for example). KCL at the node gives:
Is = v⁻/Rs + (v⁻ − Vout)/Rf, with Vout = −A·v⁻
Solving for v⁻ gives:
v⁻ = Is / (1/Rs + (1+A)/Rf)
The resistance seen by the source is v⁻/Is, which equals Rs ∥ Rf/(1+A). The feedback resistor is divided by 1+A, so the input resistance of the amplifier is very small. The next section shows the numbers.
Computing it
The function below uses the equations above. The shunt resistance defaults to infinity, which means no shunt.
def transimpedance(i_s, rf, a=None, rs=float("inf")):
"""Return (vout, r_in) for a transimpedance amplifier.
i_s : source current into the inverting node, in amperes
rf : feedback resistor, in ohms
a : finite open-loop gain, or None for the ideal model
rs : shunt resistance across the source, in ohms
"""
if a is None:
return -i_s * rf, 0.0
g = 1 / rs + (1 + a) / rf # conductance seen at the inverting node
v_minus = i_s / g
return -a * v_minus, 1 / g
vout, r_in = transimpedance(40e-6, 100e3)
print(vout, r_in) # -4.0 0.0
vout, r_in = transimpedance(40e-6, 100e3, a=1e5)
print(round(vout, 5), round(r_in, 5)) # -3.99996 0.99999The gain error from finite A is about 0.001%, so the ideal model is accurate here. The input resistance is about 1 Ω, even though Rf is 100 kΩ.
Choosing Rf
Pick Rf so that the largest expected current produces the largest output swing your supplies and the next stage allow.
| Source | Full-scale current | Rf | Full-scale output |
|---|---|---|---|
| Photodiode, low light | 1 µA | 1 MΩ | −1 V |
| Photodiode, bright light | 40 µA | 100 kΩ | −4 V |
| Current-output DAC | 2 mA | 2.5 kΩ | −5 V |
A larger Rf gives more output per unit of current, which helps with tiny signals. It also makes the circuit more sensitive to the non-ideal effects below.
Where the ideal model needs help
The ideal model predicts the DC gain well. Real transimpedance stages fail in other ways that the model does not show.
Stability with a capacitive source
A photodiode has junction capacitance Cin, from tens to hundreds of picofarads. Together with Rf, this capacitance adds a pole in the feedback path and can cause peaking or oscillation. The usual fix is a small capacitor Cf in parallel with Rf. It limits the closed-loop bandwidth to about:
f ≈ 1 / (2π·Rf·Cf)
With Rf = 100 kΩ and Cf = 10 pF, this is about 159 kHz. A larger Cf gives a more stable circuit and less bandwidth. The ideal model has no capacitors and cannot tell you this, so you need the op amp's gain-bandwidth product to choose Cf.
Input bias current and offset voltage
A real op amp input draws a small bias current IB. It flows through Rf and adds IB·Rf to the output. With IB = 1 nA and Rf = 1 MΩ, the error is 1 mV. That can be a large part of a signal from a 1 nA source. The input offset voltage Vos also appears at the output. If the source has a shunt resistance Rs, the offset is multiplied by 1 + Rf/Rs.
Noise
The resistor Rf produces thermal current noise of √(4kT/Rf), in amperes per √Hz. A larger Rf therefore adds less current noise relative to the signal. That is one reason very small currents use very large feedback resistors.
Summary of results
- The ideal transimpedance amplifier gives
Vout = −Is·Rf. - The source sees an input resistance near
Rf/(1+A), which is a very small value. - The gain error from finite
Ais tiny. The important errors come from bias current, offset, noise and stability.
Exercise
A photodiode produces at most 5 µA, flowing into the inverting input of a transimpedance amplifier. You want the output to reach −2.5 V at full scale. What value of Rf do you need, and what is the output with 1.2 µA?
Show answer
Rf = 2.5 V / 5 µA = 500 kΩ. With 1.2 µA, Vout = −1.2 µA × 500 kΩ = −0.6 V.
Exercise
A transimpedance amplifier uses Rf = 1 MΩ and an op amp with open-loop gain A = 1e5. (a) What resistance does the source see, ignoring any shunt resistance? (b) You add Cf = 2 pF across Rf. What is the approximate bandwidth set by Rf and Cf?
Show answer
(a) Rin = Rf/(1+A) = 1e6 / 100001, which is about 10 Ω. (b) f ≈ 1 / (2π × 1e6 × 2e-12), which is about 79.6 kHz.