How to Use the Op Amp Gain and Offset Utility Page

Problem:
How do I use the op amp gain and offset utility page?

Solution:
First, a review of terms that will help this discussion make sense.

Why All The Cases?

Take, for example, gain with no offset (AC coupled):

These are two of the "cases" in the table. So, you ask - why use a calulator for gain when the equations are so simple? I counter with a question: do you know the best set of resistors for your gain? If you need a gain of 5.75, for example, do you know off the top of your head to use 1.15k and 200 Ohms? I sure don't! Real resistors have tolerances, of course, so even a calculator that gets you the best set of resistors does not guarantee a perfect gain. But it is good to get as close as you can to begin with, and it is easy to buy precision resistors. A quick check of several vendors shows 0.1% and better are available in both the E24 and E96 sequences. The added cost is small compared to the cost of additional A/D bits to compensate for range lost due to imprecise interface circuitry.

Now, consider the cases that add offset to the design. For many years, I would just use two op amps to do it, particularly if the answer was not self-evident. In the vast majority of cases, though, a very good - perhaps ideal solution exists which can be implemented in a single op-amp. The schematic may or may not be easy to draw, but the design equations may not be obvious at all. In one case, the derivation of one deceptively simple case consumed three days, including false starts and "blind alleys" of simultaneous equations. We did the work - so you don't have to!

How to Determine the Case

You got here by clicking on this image:

The pieces of information in the boxes represent the minimum amount of information you need to figure out what design case you have. You need to know your input range, output range, and a value of reference voltage for cases with offset.

The input range is determined by knowing:

Similarly, the output range is determined by knowing:

Vin zero and full scale are usually dictated to you by an input device or stage. Similarly, Vout zero and full scale are probably determined by the subsequent stage. Your op amp interface is the "glue" between the two.

BUT WAIT!!! All I know is the gain! --- you might be saying. OK, fair enough. Your application is probably AC coupled. But you better know the amplitude of your input signal - or you might end up hitting the voltage rails of your op amp if you give it too much gain! DO YOUR HOMEWORK - find that amplitude, do your calculations based on the maximum. Once you have the amplitude - say 1 Vpp - then center it on zero volts. For 1 Vpp:

Next - center your output amplitude on zero volts. You do know your output amplitude, don't you? It is the input amplitude multiplied by the gain. Let's say you want a gain of ten on the signal above. You output amplitude, then, is 10 Vpp, and:

These are the values you enter in to determine the case. Because this example was AC coupled, you probably don't have a Vref. If you do, it is only used internal to the stage to set the DC operating point - and won't affect the selection of case.

A Little Parting Advice

In the example above, the output amplitude range is +/-5 Volts. Hopefully, it goes without saying that you cannot get this range from a single 5 Volt supply. What is more annoying is that you also cannot do it from a +/- 5V supply, although some rail-to-rail devices will come close.

Another, more subtle problem may come with large voltage swings at high frequencies. Make sure that the rate of change of your waveform does not exceed the slew rate of the op amp. Its output voltage will only rise so fast - no faster.