Op-Amp Voltage Reference

A voltage divider (or other reference element) plus an op-amp can create a fixed or adjustable voltage reference. 12 min read

In the previous section, we used an ideal op-amp to construct an op-amp voltage buffer, which copies a voltage signal from a high-impedance input to a low-impedance output.

One useful special case is to combine the op-amp voltage buffer with a resistive voltage divider to form a fixed voltage reference:

This combination accomplishes two results:

  1. Reduces an input voltage by the voltage divider fraction .
  2. Delivers an output with low output impedance: just the non-ideal of the op-amp (or 0 if ideal).

As described in Maximum Signal Transfer and Minimizing Interstage Loading, impedances are important when connecting parts of a circuit together. This combination lets you accomplish that by choosing the ratio between R1 and R2 to get the voltage fraction you want, and then independently choosing the values so they don’t load the previous stage.

Solving the Equations  

If the op-amp is ideal, then the non-inverting (+) input does not draw any current, so we can simply consider R1 and R2 to be an unloaded voltage divider, so:

The ideal op-amp voltage buffer copies the input to output perfectly, so:

Combining the two equations above yields:

VCVS Model  

It’s also instructive to see this circuit while modeling the op-amp as a voltage-controlled voltage source (VCVS):

The math follows exactly the same as it did for the op-amp voltage buffer, simply substituting in place of , so we won’t repeat it here.

This VCVS-based model is perhaps unnecessary with such a simple circuit, but if you become comfortable with it in these more basic scenarios, you’ll find it’s a powerful tool for analyzing more complex circuits, including those with BJT and FET transistors.

Use as Voltage Reference  

We’ve called this a “voltage reference” because you will commonly see this sort of arrangement when it’s necessary to transform the DC power supply voltage into a lower power supply. In this configuration, the input will be connected directly to one of the power supply voltages. The reduced output voltage may be used to power other devices, or to provide a reference voltage level to other devices like Analog-to-Digital Converters (ADCs).

Here’s an example showing conversion from a source to a reference, which might go into a lower-voltage ADC:

Exercise Click to open and simulate this circuit. What happens if you change and re-run the simulation?

Observe that the ratio of resistances is the ratio of voltage drops across each of the two resistors:

This provides a cheap and easy way to transform one regulated voltage into another given only two resistors and an op-amp.

Use as Signal Reducer  

Because this circuit simply reduces the input voltage by a constant factor, we can also use it to reduce the amplitude of a signal that’s changing over time:

We can therefore think about this configuration as an “amplifier” with voltage gain .

Exercise Click to open and simulate this circuit. What happens if you change the DC offset of to 0 and re-run the simulation?

This configuration is less common because we’re throwing away part of our signal, and we’re adding noise. However, sometimes that is precisely what’s needed. For example, we may have an analog input signal with large amplitude, and an Analog-to-Digital Converter (ADC) with limited input range. We can use this configuration to reduce the amplitude of the input so that it fits comfortably inside the ADC’s operating range.

Why would we need the op-amp at all in this case? Why not just connect the resistive voltage divider directly to the ADC’s input? The answer, as usual, is impedance. The ADC input may have a relatively large capacitance, which when combined with the large resistors of the voltage divider, would yield an unintentionally long time constant. When intentional, this is often called an antialiasing filter. But it can happen unintentionally, and at too low a frequency, if the input source impedance is too high for the ADC. An ADC input driver (i.e. a voltage buffer) is therefore often recommended.

Use as Voltage Averager  

So far, we’ve only considered cases where the fixed end of R2 is grounded. However, if we relax that constraint and instead connect it to another voltage input (whether fixed or changing), then R1 and R2 will form a voltage divider that outputs a voltage that is in the middle of the two input voltages. If then it will be exactly halfway in the middle, . The symmetrical voltage divider takes the mean of the two inputs.

Let’s look at an example where that might be useful.

In many cases, it’s useful to transmit signals as differential voltages over a pair of wires, rather than single-sided signals over a single wire. This lets us consider the difference (subtraction) between the two wires to be our real signal of interest. If we’re connecting two systems, any mismatch in relative grounds between the two systems would affect both wire’s voltages simultaneously and in the same direction, so we can ignore this offset by only looking at the differential-mode signal.

Here’s an example where we use this averaging effect to recover the common-mode carrier wave from two inputs which include both a common and a differential component:

Exercise Click to open and simulate this circuit. Can you reconstruct the differential-mode signal as well? (Hint: you need to add only one modeling component and a few wires.)

The differential-mode signal is the interesting one. However, recovering the common-mode component can be useful in cases where we want to explicitly correct for the common-mode offset, for example to keep the amplifier running in a good range. These cases come up in the design of a differential-mode amplifier, and you’ll hear this technique called common-mode feedback (CMFB).

Note that if the two voltages you’re trying to average have nonzero source impedance, it may degrade or bias your averaging operation. If that’s the case, you may want to add an op-amp voltage buffer to each input before you average them.

Drawbacks as a Voltage Reference  

Precision of Resistors  

Due to resistor manufacturing tolerances, the accuracy of this approach is limited if a precise output voltage is needed. A potentiometer may be used to make it adjustable for calibration, but adds cost and complexity.

Power Consumption  

The resistors consume power due to Ohm’s Law.

The op-amp also consumes power (see quiescent current).

Even if our voltage reference isn’t supplying any current to or from its load, we’ll have to pay for this power consumption in our power budget.

Ratio Change from Input  

If our input experiences a voltage fluctuation , then our output will also experience a fluctuation proportionally . This might not serve our goal of creating a stable reference voltage.

This is a similar problem to the power supply rejection ratio (PSRR) discussed on non-ideal op-amps, but in this case, the ratio-based behavior is inherent to the external circuit design, rather than internal to the op-amp design.

Resistor Thermal Noise  

We choose the ratio of our resistances to give us our desired voltage division ratio, but there are tradeoffs to choosing the actual values of or . If the resistances are too low, they consume too much power. It turns out that if the resistances are too high, then we’ll get too much resistor noise voltage (which increases as the absolute resistance values increase).

Adding a Capacitor  

A capacitor can be added between and ground in order to help mitigate the last two of the drawbacks above.

In particular, adding a capacitor helps stabilize the voltage relative to ground. This means that it is better at rejecting power supply noise, as this simulation demonstrates:

Exercise Click to open and simulate this circuit. How does the output voltage ripple amplitude compare when the capacitor is connected ( ) versus when the capacitor is disconnected ( )?

Adding a capacitor can potentially let us use larger resistor values, reducing power consumption without sacrificing so much noise performance, because the capacitor acts as a low-impedance reservoir at high frequencies.

For these reasons, it’s quite common to see this circuit with a capacitor in place.

A larger capacitor will result in a lower cutoff frequency and better noise rejection. However, larger capacitors are physically larger and more expensive. Larger capacitors also make it take longer for this circuit to reach its steady-state voltage after being turned on or off. That turn-on or turn-off delay can have unexpected consequences if it’s not considered by the designer.

Zener Diode Voltage Reference  

Instead of using two resistors to determine the output voltage, we can use a Zener diode and one resistor. A Zener diode is a silicon p-n junction diode that has been specially engineered to go into reverse breakdown at a well-defined voltage.

To briefly summarize different types of diodes:

Zener diodes are inexpensive can be purchased in a wide range of specified reverse breakdown voltages , which typically has a tolerance of or so.

Here’s an example using a 1N4733A Zener diode, which is specified as :

Exercise Click to open and simulate this circuit. How much does the voltage reference change as is swept from 0 to 15 volts?

The resistor R1 is still needed to allow current to flow into the reverse-biased D1. Choosing R1 too low can lead to excess power consumption and thermal failure of the diode and/or resistor. Choosing a larger R1 is probably fine, but the output voltage will change a bit, as the diode’s is specified at a particular test current level. You can simulate this effect quickly by adding a second DC parameter sweep on R1.R.

This is often combined with adding a capacitor as well. The Zener diode provides rejection of power supply variations at DC, while the capacitor improves this further at high frequencies.

For advanced readers: we can improve this even further by inserting yet another resistor between the zener diode’s cathode and the op-amp’s non-inverting input, and then connect the capacitor between the op-amp’s non-inverting input and ground. Adding additional resistance here lowers the cutoff frequency in this configuration:

Exercise Click to open and simulate this circuit. Observe that the the output amplitude of noise coming from the power rail is substantially diminished by increasing .

Overall, using a Zener diode, one or two resistors, one capacitor, and an op-amp, we can get an inexpensive and fairly stable voltage referfence, so long as the voltage we’re looking for corresponds to one that has Zener diodes regularly available!

If it doesn’t, we can modify this circuit by adding a resistive voltage divider, for example using a potentiometer:

Exercise Click to open and simulate this circuit. Does the output voltage change linearly as the potentiometer setpoint parameter R2.K is adjusted?

We now have a voltage reference that is user-adjustable over a wide range and is reasonably stable against variations in input voltage.

Why the Voltage Buffer is Necessary  

It may seem like we’ve just taken our voltage reference and added an op-amp voltage buffer at the end. Indeed we have, but for good reason!

Let’s consider the last circuit, the adjustable Zener-based voltage reference. What happens if we load from the output: for example, using the voltage reference to power another component?

We can model this by adding a load resistor , and sweeping its resistance over many orders of magnitude. First, let’s try this without the op-amp voltage buffer:

Exercise Click to open and simulate this circuit. Observe the S-shaped curves in output voltage as the load resistance changes on the x-axis.

Not good! Without the buffer, the output voltage changes dramatically as a function of both the load resistance RL.R and as a function of the potentiometer setpoint R2.K.

The loading effect is only mild at the extremes of the potentiometer R2.K = 0 or R2.K = 1, when the potentiometer’s adjustable terminal is shorted to either endpoint. However, the loading effect is much more pronounced anywhere between those extremes.

This is strongly non-ideal behavior for a voltage reference, and that’s why we’ll generally include the buffer in applications like this.

Let’s repeat the same experiment with the op-amp voltage buffer:

Exercise Click to open and simulate this circuit. Observe that the output voltage is flat (horizontal) as the load resistance changes on the x-axis.

The above simulation shows what we want a voltage reference to look like: does not change even as we adjust over many orders of magnitude.

It may be tempting to try to save the cost of an op-amp and eliminate the voltage buffer, but as these two simulations clearly demonstrate, the result is a circuit that is severely dependent on the load and on the setpoint. Both are undesirable characteristics for a voltage reference.

Integrated Circuit Voltage References  

Instead of a Zener diode as a reference, we can also use IC voltage references like the LM317, TL431, or 7805. These can outperform a Zener diode by providing a more stable reference that is less sensitive to input voltage. In fact, these are generally capable of supplying substantial output current directly, and can provide fixed or adjustable voltage references. They generally contain an internal bandgap voltage reference an op-amp all in one small 3-pin package (input, output, ground).

Conceptually, the same principles shown in this section apply to these integrated devices:

If you put in the time to understand the simple op-amp voltage reference in this section, the internal block diagrams of these IC voltage references will begin to make sense.

What’s Next  

We’ve thoroughly examined the op-amp voltage buffer with a gain of 1 and its applications as a voltage reference. Now, let’s crank up the volume! We’ll look at amplifiers with a voltage gain starting with the Op-Amp Non-Inverting Amplifier configuration.