Analysis using spreadsheets can sometimes fill a gap in circuit simulation programs by providing a quick and reliable way to determine circuit performance along with the flexibility to display results as desired. In this case the spreadsheet provided a quick way of ensuring that a photodiode amplifier with variable gain would perform properly over its entire adjustment range.
The need for a photodiode amplifier with variable gain that can be set with a potentiometer (RF) in the feedback loop will occasionally arise, for instance in a product design requiring compensation for unit-to-unit variability in its optical power. The potentiometer can be mechanical or digital under the control of a serial bus such as the serial peripheral interface (SPI) or I2C. In either case, however, designers need to consider the noise and stability of the amplifier over the range of RF. The spreadsheet can help determine the optimum compromise compensation by calculating the phase margin over the entire range of RF.
Photodiode amplifiers are second-order systems with a zero at frequency:
set by the gain feedback resistor RF and the sum of all the amplifier’s input capacitances Ci, including the photodiode junction capacitance and associated parasitics. The pole at frequency:
is due to RF and the compensation capacitor CF required for amplifier stability (Fig. 1).
In most applications, RF and CF are fixed with values chosen to provide 45° phase margin, which will ensure stability while preserving desired bandwidth. For a variable gain amplifier, however, the value of CF must be chosen so it maintains the stability of the amplifier throughout the full range of RF. By entering the appropriate equations into a spreadsheet that uses a column of values for RF, designers can quickly determine if a candidate value for CF provides the desired results.
Using the known values for input capacitance Ci, the amplifier’s unity gain crossover frequency fu, and the candidate CF, you can calculate the following:
Pole frequencies f1 and f2,
Damping factor zeta = \\[Eq. 3\\]
Phase margin in radians = \\[Eq. 4\\]
Phase margin in degrees = \\[Eq. 5\\]
% overshoot = \\[Eq. 6\\]
Phase margin and overshoot are correlated, so this final equation gives designers a means of validating the spreadsheet’s results. Simply generate a step function for the light source driving the photodiode and amplifier and observe the output voltage’s overshoot. Extracting the value for zeta then allows calculation of the phase margin.
The results shown in graphical form come from an example amplifier with fu at 16 MHz and estimated Ci of 560 pF, the sum of all expected capacitances including diode capacitance, contributions from cables connecting the photodiode, and the amplifier’s input capacitance (Fig. 2).
To obtain the gain span desired, the design needed RF to vary from 4500 Ω to 27,000 Ω. Entering these values and running the spreadsheet (Fig. 3) yielded phase margin in degrees and percent overshoot as shown. When RF was at its minimum value of 4500 Ω, the phase margin is 45° and the overshoot is 24%, as expected.