How to Design a Transimpedance Amplifier Circuit for measuring a Photodiode

Photodiodes generate an electrical current proportional to the light falling on their active area. That current is often extremely small—typically ranging from picoamps to microamps—and therefore cannot be measured effectively with an ordinary voltage amplifier. 

A transimpedance amplifier, commonly called a TIA, converts this small photodiode current into a measurable voltage. This tutorial walks through the process of designing a TIA, including selecting the feedback resistor, compensation capacitor, op amp, bandwidth, and component types.

How a Transimpedance Amplifier Works

A schematic of a TIA circuit is shown below in figure 1, the TIA circuit consists of:

  • A photodiode connected to the op amp’s inverting input
  • The op amp’s non-inverting input connected to ground or another reference voltage
  • A feedback resistor connected between the op amp output and inverting input
  • A feedback capacitor placed in parallel with the feedback resistor

Figure 1. Schematic of a Transimpedance Amplifier Circuit

The op amp drives its output to keep the inverting input at approximately the same voltage as the non-inverting input. If the non-inverting input is grounded, the inverting input is held near 0 V. This is commonly called a virtual ground. This means the op amps output voltage is dropped across the feedback resistor Rf. Because the op amp's inverting input draws almost no current, the photodiode current must flow through the feedback resistor and the voltage drop across Rf allows us to calculate what that current is. 

Figure 2. Transimpedance amplifier showing current flow

The resulting output voltage is: Vout = Im × Rf

Where:

  • Vout is the amplifier output voltage
  • Im is the photodiode current
  • Rf is the feedback resistance

Measuring Vout and setting the value of Rf, current can be calculated: Im = Vout / Rf

The polarity of VOUT depends on the photodiode orientation. In the example presented here, increasing light produces an increasing positive output voltage. The capacitor Cf in the TIA circuit ensures a stable amplifier feedback network and when it is combined with Rf, it helps filter out unwanted high frequency noise. 

Designing a TIA Circuit: Selecting Rf and Cf

To design a TIA circuit the first step is defining the current range of the photodiode or sensor that you are measuring. For this example let's assume we are working with a UV  photodiode that has a current range of 50nA to 500nA. To handle this current range we want to choose a feedback or gain resistor (Rf) that generates an output voltage that:

  • Will not saturate or get clipped by the op amp
  • Can fit the voltage measurement range of a analog to digital converter (ADC) and its voltage reference. 

For this example we are going to select Rf to be 3.9MOhm, which yields the following voltage output range for the TIA circuit:

The output equation is therefore: Vout = Im × 3.9 MΩ

Photocurrent Output voltage
50 nA 0.195 V
100 nA 0.390 V
200 nA 0.780 V
300 nA 1.170 V
400 nA 1.560 V
500 nA 1.950 V

 

At the lowest current of 50nA, the 3.9MOhm feedback or gain resistor yields an output voltage of 0.195V which makes the op amp design easier because that value is comfortably above 0V. That means we can tie the negative power supply of the op amp to ground without having to worry about the output voltage getting saturated or clipped by the op amp at the low current range of the UV sensor. If we can avoid having to have a negative voltage power rail, we reduce the cost and complexity of our design. With a max output voltage of 1.95V, we can easily find an ADC that can handle that amplitude range since 2.048V and 2.5V are common reference voltage values. As we will cover later, resistor Rf has a big impact on the overall accuracy of the TIA circuit. Be sure to choose a precision resistor with good accuracy and temperature drift specifications. For our example design we are using a 3.9Mohm thin film resistor with an accuracy spec of 0.1% and a temperature coefficient spec of ±25 ppm/°C.

Capacitor Cf in the TIA circuit can help increase measurement repeatability in your TIA circuit by filtering out unwanted high frequency noise. As the frequency of unwanted noise increases, the Cf acts more like a short so the noise passes through the capacitor instead being dropped across the gain resistor Rf. For our example UV sensor design, we are essentially making DC measurements since we will only sample the sensor's current every couple of seconds to minutes. That allows us to choose a value for Cf that creates a filter with a low cutoff frequency. 

We will use a capacitor value of 1.5nF, the cutoff frequency of our filter is: 

Fc=1 / (2π x Rf x Cf) = 1 / (2π x 3.9Mohm x 1.5nF) = 27.2 Hz

Designing a TIA Circuit: Selecting an Op Amp

Since a TIA circuit is measuring sensitive low level current signals, we want to select a precision op amp for our design. When selecting our op amp we want to pay close attention to the following common op amp specifications:

  • Input-bias current and offset current: Often we treat the op amp's inputs as an open circuit. But in practice it does take current to bias the amplifier's internal transistors / MOSFETs. These specs are based on the input current needed to bias the op amp. 
  • Input-offset voltage: This spec covers worst case stray voltage levels at the inputs of the op amp. This spec directly impacts the accuracy of the TIA circuit.
  • Offset drift: This spec relates to how offset specs can change with temperature. If your design will be used in a wide temperature range this spec will have an impact on your TIA circuit's accuracy. 
  • Input-current and input-voltage noise: When dealing with low level currents, these noise specs can have an impact on measurement repeatability. Averaging readings together can help cancel out the impact of noise. 
  • Gain-bandwidth product: Be sure to match the bandwidth of the signal you want to measure, with the gain of the op amp otherwise you risk attenuating aspects of the signal you want to measure. 

For our example design we will use the OPA376A precision op amp from Texas Instruments. Our design is cost sensitive so we choose this op amp because it is fairly low cost but still delivers good specs to ensure an accurate TIA circuit. Below is a breakdown of the key specs and features of the OPA376A for our TIA design:

  • Rail-to-rail input and output to ensure our output voltage level does not get clipped by the op amp
  • Worst case offset voltage: 25µV
  • Offset drift: 1µV per degree C
  • Worst case bias current: 10pA
  • Worst case offset current: 10pA
  • 5.5 MHz gain-bandwidth product which is more than enough bandwidth of this design

TIA Circuit Accuracy / Uncertainty Calculation

Here we are going to do an example accuracy calculation of our TIA circuit. This calculation will give us the worst case output voltage error of our TIA circuit. For this calculation we will ignore error contributors from the photodiode and the ADC used to measure the TIA's output voltage so that we can just look at the error of our TIA circuit converting a low level current to a voltage. For this example accuracy calculation we will assume the UV photodiode's current is 100nA. 

  1. The feedback or gain resistor Rf has the following worst case error: Rferr = resistor accuracy x ideal voltage = 0.1% x 0.39V = +/- 390µV
  2. Error from op amp's offset current and bias current specs, just considering the inverting input: IBOerr = Bias + Offset / 2 = 10pA + 10pA/2 = 15pA. Convert it into voltage error: IBOerr = 15pA x 3.9MOhm = 58.5µV
  3. Error from op amp's offset voltage spec: VOerr = 25µV
  4. Combined worst case voltage error at 100nA: Verr = Rferr + IBOerr + VOerr = 390µV + 58.5µV + 25µV = 473.5µV
  5. Worst case output voltage uncertainty: (0.0004735V / 0.39V) x 100 = 0.12%

The worst case error of 0.12% is not surprising since the resistor Rf, the biggest error contributor, has an accuracy spec of 0.1%. We did not include noise specs in our accuracy calculation because noise impacts measurement repeatability rather than accuracy. Once again, the resistor is gong to be the largest contributor to noise generation in the TIA circuit. You also have to be aware of external noise contributors to your TIA circuit such as near by motors, switching power supplies, and RF signals. To ensure good measurement repeatability, average multiple readings together to cancel out noise affects. 

Testing the Accuracy of our TIA Circuit

Figure 3 shows a picture of the TIA circuit we designed featuring the 3.9MOhm resistor (Rf), 1.5nF capacitor (Cf), and the OPA376A op amp. We have replaced the UV sensor with a precision current source and a high accuracy digital multimeter is measuring the TIA's output voltage. 

Figure 3. TIA circuit accuracy testing

Figure 4 shows two precision multimeters, one measuring the ~100nA current source (bottom) that is simulating our UV sensor current and the other is measuring the TIA's output voltage (top). If we assume the multimeter measurements are ideal, we can calculate the TIA uncertainty:

  • Measured current Im=99.886nA
  • The ideal TIA Vout = Im x Rf = 99.886nA x 3.9MOhm = 0.389555V
  • Using the measured voltage to calculate error: Verr = (1 - (0.389355V / 0.389555V)) x 100 = 0.051% error

Figure 4. Measurements to test the accuracy of our TIA circuit

As we would expect, the tested error of one sample of our design is less than the worst case error. If we would have gotten a result that was close to or greater than the worse case error that would have pointed to a design flaw or unknown error contributor in our TIA circuit.  

TIA PCB Layout Best Practices

Careful PCB layout for a design that is dealing with such low level current is critical. This is because unforeseen error contributors, such as sources of noise and leakage, can have large impact on the accuracy and repeatability of the measured TIA output. The op amp’s inverting input is the most sensitive node in the circuit. Keep the connection between the photodiode, op amp input, feedback resistor, and feedback capacitor as short as possible. A smaller node area reduces effects of parasitic capacitance, coupled digital noise, and EMI. Do not route noisy digital, power, or RF signals near or on the PCB layer directly underneath or above your TIA circuit. 

At low current levels you want to avoid capacitive coupling or leakage currents in your PCB design. Capacitive coupling can occur by having the ground plane too close to sensitive signal paths. Leakage currents can arise from contamination and moisture on PCB. As an example, a 1 GΩ leakage path with 1 V across it produces: 1 V / 1 GΩ = 1 nA. That leakage is much larger than the op amp’s bias or offset current specs. Useful PCB design precautions include:

  • Clean flux residue thoroughly, avoid no-clean flux residue around the inverting node
  • Keep the board dry, even fingers touching around the circuit can leave oily residue that can create a path for current
  • If you have a solid ground plane on the layer directly under your design you may want to do a cutout of the ground plane around the inverting input pin of the op amp to reduce capacitive coupling. This is especially true when working with higher bandwidth designs
  • Consider a guard ring around the inverting node signal paths to reduce capacitive coupling. The guard ring should be at a similar voltage potential as the inverting node, in our example that would be ground

Summary

A transimpedance amplifier converts a small sensor current into a voltage that can be measured by an ADC. The TIA's transimpedance gain is primarily determined by the feedback resistor, while the parallel feedback capacitor improves stability and limits the circuit’s noise bandwidth.

In the example presented here, a 3.9 MΩ feedback resistor converts the photodiode’s 50 nA to 500 nA current range into approximately 0.195 V to 1.950 V. A 1.5 nF feedback capacitor produces a cutoff frequency of approximately 27.2 Hz, which is appropriate for a slowly changing environmental UV measurement. The OPA376A was selected for its low offset voltage, low input-bias current, rail-to-rail operation, and cost. The calculated worst-case TIA uncertainty at 100 nA was approximately ±0.12%, with the feedback-resistor tolerance being the largest contributor. Testing one assembled circuit with a precision current source produced an error of approximately 0.051%, which is comfortably within the calculated worst-case limit. 

Finally, component selection alone does not guarantee good low-current performance. The photodiode, inverting input, and feedback components should be placed close together, and the high-impedance summing node should be kept short, clean, dry, and separated from noisy signals. Careful PCB layout, guarding, power-supply bypassing, and averaging of repeated measurements help the completed TIA achieve both good accuracy and repeatability.

References

Back to blog