Amplifier analog design - how to effectively do it when gain varies so much?

For example, I was thinking about building a small current sensing device that has an display to measure small current draws on some of my circuits. The design would be such that a very small resistance (~1m Ohm) is placed in-line and the voltage take across it amplified. However, I have always had trouble with amplifier circuits.

As you know, the gain constant of a transistor varies greatly even within the same batch of devices. I know that certain designs can be made such that their transfer functions depend only slightly on the gain constant, but are all gain applications implemented in this way?

Operation Amplifiers can be a bit simpler because their open-loop gain is so high - but similar to any amplifier circuit the gain is a direct function of the values of resistances (which vary largely!).

So how can amplifier circuits be used effectively in a particular application that requires the exact gain coefficient of the circuit (i.e. the current sensing design I mentioned earlier). Of course you can measure the resistance values before you implement them into your design - but what about commercial designs? The software edited based on the resistance values for every unit manufactured - at least it seems very impractical.

• "... the gain is a direct function of the values of resistances (which vary largely!)." Can you clarify what you mean by this? Most resistors these days come in at least 1% tolerances. I've used 0.1% resistors for pennies each. Is that not exact enough? Jul 11, 2014 at 1:16

One option not mentioned is to use packaged difference amplifiers or instrumentation amplifiers, where all the internal resistors are very effectively trimmed to high accuracy. This effectively minimized the risk of mismatched resistors, which can really kill common mode rejection (which is often a bigger problem than non-exact gains).

If high precision gain is a real must, an instrumentation amplifier sets the gain using only one resistor, and that can be as high precision as you're willing to pay for. Alternatively, a lower resistor and a trimmer pot can be used for adjustment

• +1. I addition, typical gain-sensitive measurement designs don't even use the gain trim resistor method - the preferred approach is fixed-gain in-amps with laser trimmed gain pairs on the die. Aug 16, 2013 at 5:20

If one adds negative feedback to an amplifier in such a fashion that an infinite-gain amplifier would have a gain of $x$, but the actual gain of the amplifier is not infinite but is instead $y$, the gain of the system is likely to be on the order of:

$$\dfrac{1}{1/x+1/y}$$

You can see that as $y$ approaches, the $1/y$ term drops out and the gain is simply $x$. If $y$ is large relative to $x$, the net gain won't be quite equal to $x$, but even larges variations in $y$ will cause only small variations in the net gain.

If one constructs an amplifier with a suitably-biased input signal feeding the base of an NPN transistor whose emitter is tied to ground via resistor and whose collector is tied to the positive rail via another resistor, then the "ideal transistor" gain would be equal to the ratio of those two resistors, since the voltage on the emitter would track the voltage on the base, and the current through the collector would match the current through the emitter. If the resistors were e.g. 1K and 10K, then increasing the base voltage by a 100mV would cause an extra 100uA to flow through the 1K resistor, which would in turn cause an extra 100uA to flow through the 10K resistor, thus causing it to drop an extra volt.

In practice, real transistors don't behave quite like ideal transistors, but if the resistors are chosen to yield a gain which is small relative to the transistor's beta, the effect of the transistor's beta on the output behavior will be relatively slight.

Op amps take this concept further, by using cascaded combinations of transistors so as to yield an inherent gain which is sufficiently high that variations in it become a non-factor. The very high levels of gain often make it necessary for op amps to introduce some internal high-frequency negative feedback which will artificially attenuate gain so as to avoid unwanted oscillations; depending upon the particular components one is using, such limitations may be characterized tightly or loosely, but unless one is using an op amp near the limits of its performance they generally won't matter too much.

If correct gain is important across PVT (Process, Voltage, and Temperature variations) the opamps with negative feedback is critical. It is not the only solution, but is the most used and most easily understood solution.

Relying on the open loop gain of opamps, or the various parameters of transistors, is usually a non-starter unless you end up doing some tweaky analog kludge or re-invent negative feedback.

• I agree with the second comment. What I meant was it's easier to limit the gain of an op amp rather than work around a very specific gain of a transistor that may be around 50-300 or so. Aug 15, 2013 at 16:54

The key to making amplifiers work is negative feedback. As you noted in your question, open-loop gain is not a "good" parameter because it varies too much. However, the open-loop gain of most op-amps is too high to be usable anyway. By a happy conincidence, both of these problems can be solved with negative feedback.

In the schematic below, the op-amp is set up in an inverting configuration (meaning that that the output gets more negative as the input gets more positive) with negative feedback to produce a voltage gain of 100: R2 and R5 form a voltage divider between the output and the input, and the op-amp's inverting input is taken from the divider's output. Note that the gain of this circuit depends almost exclusively on the values of R2 and R5. The values of all other components have a very small effect on the gain. If a positive output, or more gain, is needed, a second inverting amplifier stage can be attached to the output of the first.