Main menu

- Home Page
- Sensors
- Simulation
- Analytics
- Forecasting
- Football Forecasting
- Random Corner
- Projects
- Resources
- Blog
- About/Contact
- Creative Works
- Separator 1
- Privacy & Terms

Sensors

**The Humble Op- Amp **

Operational amplifiers, commonly called op-

It's not all that difficult to build amplifiers out of discrete transistors. Once upon a time, almost all amplifiers were made from discrete transistors, and further back, they were made from vacuum tubes. Because transistors (and tubes) were once very expensive compared to resistors and capacitors, a big part of 'good design practice' revolved around minimizing the number of transistors or tubes in a given design. This resulted in some very simple amplifier circuits, such as the one shown below.

*A Single- Transistor Amplifier*

This single-

*Frequency/Phase Response of Above Amplifier*

If more gain is desired, there are two basic approaches to getting it. First, one can tweak component values and/or transistor models in the above circuit (2N2222 is the canonical 'generic' discrete transistor) to get minor increases in gain, possibly of values up to a few hundred. The other way is to cascade multiple copies of the circuit. The latter approach will in theory let you achieve arbitrarily high gains. In reality, however, effects like signal feedback through the power supply, and intrinsic device noise (both from the transistors and passive components) will place some practical limits on just how high you can crank up the gain 'knob' on your circuit design before it either misbehaves (e.g. oscillates) or the amplified internal noise swamps out any signal.

Although it is easy to get gain with simple circuits like the one above, there are several prices to pay. The first is that the circuit may not be all that stable with respect to environmental factors like temperature or operating supply voltage, or part-*exactly *the value we want, the power supply to be* exactly *5.0000... volts, and the operating temperature to be *exactly* +25C. When we try to implement the circuit in the real world, however, we will find that all of these variables can and do vary, and ways we would often not like, and the circuit performance varies with them. For example, consider the effect of just changing the temperature over the range of -

*Gain vs. Temperature Detail of Simple Amplifier - About 3dB variation from -40C to +125C*

The gain changes about 3dB between -*only* affects the transistor -

Another issue with this circuit is that the gain also varies as a function of the load which it is driving. The simulations above assume zero load, which might be reasonably approximated by a scope probe (10MegOhms). If one attempts to drive a load of 10 kohms, which is not an unreasonably low value for many applications, one will discover that the gain drops from 28dB to 32 dB (a factor of 2). If one loads the circuit down with a 1 kohm load, the gain drops from 38dB all the way down to 18 dB -**Gain to Burn**

The fundamental problem with our simple amplifier is that the gain depends on virtually every aspect of the circuit and how it interacts with its environment. While there are certainly applications for which this sensitivity might not be a big problem (toys?), there will be others for which it will be a showstopper. For these more critical applications, there are design techniques that can be used to make the circuit more stable in the face of environmental and component variation. These techniques, however, tend to require more complex design, and more components, which translates into more cost. Also important is the amount of resources that must go into the design process -

While incremental performance improvement is often obtainable by incremental design changes, significant improvements typically require a major paradigm shift. In the case of making stable amplifiers, that paradigm shift comes from employing *negative feedback*.

In 1927, Harold Black, then working for Bell, came up with the idea of using feedback as a way to make the amplifier's response more ideal, both in terms of accurately controlling the gain and reducing the distortion. The basic feedback concept can be seen in the following figure, where the output (Vout) of a primary amplifier A1 is sampled and fed back through a feedback gain A2 to a point where it is added to the incoming signal (Vin). The sum of these two signals (e) is then used as the input to the primary amplifier.

*Block diagram of Feedback Loop with Forward (A1) and Feedback (A2) Gains. *

The math for determining the overall gain of this system requires is straightforward. The first step is writing an expression for Vout.

Vout = A1 * ( Vin + A2 * Vout)

With a little algebra, this circular expression can be solved for Vout...

Vout = Vin * A1 / (1 -

In the above expression, the term 'A1 * A2' has special significance and is what is known as the *loop gain*. For most feedback amplifier applications, loop gain has two characteristics:

1) Loop gain is negative (A1 * A2 < 0). Negative loop gain is required to create negative feedback. Negative loop gain may be achieved by making either the primary gain negative OR by making the feedback gain negative. If you make both gains negative (or both gains positive), you will end up with a positive feedback loop, which has qualitatively and often dramatically different behavior than that of a negative feedback loop.

2) For typical applications, loop gain will have an absolute value *much *greater than 1 ( |A1*A2| >>1 ). Also the magnitude of A1 will typically be much larger than that of A2, which is usually less than or equal to 1 ( |A2| <=1 ). In typical implementations, A1 will be realized the circuits containing 'active elements' like transistors or opamps (or vacuum tubes) that can provide significant voltage gain, while A2 will be realized with passive elements like resistors and capacitors that can only attenuate signals.

If you assume that the magnitude of A1 is much greater than A2 (|A1| >> |A2|) and that the loop gain is much greater than one ( |A1*A2| >> 1) , you can approximate the above equation by:

Vout = Vin * 1 / (-

This means that the relationship between Vout and Vin is no longer dependent on the gain of primary amplifier, and is controlled only by the gain of the feedback loop. Since the feedback loop's gain (or attenuation, depending on how you want to think about it) is usually less than one, it can be implemented with resistors and other passive components which can have good unit-

Let's consider the application of negative feedback to a high-

*Four- stage amplifier with Lots of Gain*

The Bode plot for the above amplifier is shown below. One can see that while the gain peaks around 84dB, it varies considerably over the simulated frequency range. The degree of gain variation in this amplifier could make it very difficult to use as-

*Frequency response of Four- stage Amplifier - Varies quite a bit (~75dB) over the Simulated Frequency Range*

We are going to make one seemingly very small change to the circuit -

*Four- stage Amplifier with Addition of Feedback through R15 (A2 = 0.1)*

Now if we simulate the modified circuit's performance, we see that the overall system gain (amplifier with feedback) is very close to 20dB, or a factor of 10 over 4 decades of frequency (10Hz-

Response of Amplifier with Feedback -

This is the elegance of using negative feedback in complex systems -*excess gain,* which can be used to compensate for inconsistencies in the system.**DC- Accurate Amplification**

The examples above use amplifiers of the AC-

Fortunately, in those situations where DC gain and accuracy is important, there is a circuit building block called the differential pair, one implementation of which is shown below. The key to this circuit's operation is splitting a fixed amount of current (I1 current source) between two symmetric amplifier sections. when the base voltages of Q1 and Q2 are equal, the current (2mA) is split evenly between the two transistors, so each transistor emitter carries 1mA. Because Q2's base is at 0V (grounded), this balanced condition occurs when Q1's base voltage is also 0V. The two emitter currents (minus a small amount of base current) flow down through their respective collectors, and the load resistors, which provide output voltages V)+ and VO-

*Differential Pair is a Fundamental Building Block for DC Accurate Amplifiers*

One feature of the differential pair is that if both input voltages (Q1, Q2 bases) are moved up or down over a limited range (common-

*Outputs of Differential Pair in response to input signal.*

Note that in addition to providing gain, the two outputs are 180 degrees out of phase with each other. The differential pair can therefore be used to provide both positive and negative gain depending on which input the original signal is fed into and which output is tapped.

If we combine a differential pair input stage with a high-

*System Description of Opamp*

The Figure below shows a highly simplified and idealized opamp circuit. Q1 and Q2 form the differential pair. Q3,Q4, Q5 are a current-

Very Idealized Opamp Circuit

As you can see in the Bode plot below, the gain of our simplified opamp is quite high (>110dB), but goes down sharply as frequency increases. A big part of the variation is due to the presence of CCOMP (1000pF) in the above circuit. This compensation capacitor was added to deliberately reduce gain with increasing frequency -

Bode Plot of simplified Opamp

Now let's wrap a feedback loop around our simple opamp. In the circuit below, the input signal is applied to the VIN+ (non-

*Simplified Opamp with 0.1 Feedback Gain from 9k/1k Resistive Divider*

When we simulate the above circuit, we see the Bode plot below -

*Bode Plot of Simple Opamp with Feedback Loop Wrapped Around it*

Running a time-

*Time- domain behavior of Opamp with Feedback*

**Feedback Cures a Host of Ills**

We have shown how negative feedback can tame an amplifier's wildly varying frequency response. It can also help cure linearity problems as well. Consider the simple power amplifier circuit shown below. Such a circuit might be used as the final stage in a headphone driver.

Push-

The big problem with above circuit, however, is that it is highly non-*crossover distortion* , and results because there is a point on each waveform when neither transistor is driven hard enough to become active.

Push-

If you played a typical music track through this output stage, it would probably sound pretty horrible, unless your idea of good music involves lots of distortion effects. One way of reducing this problem is to put the amplifier in a feedback loop with an opamp, as shown below. This time to simplify things, we are going to just use one of the LTSPICE library opamps, an LT1013, as opposed to building one ourselves.

Opamp and feedback used to Reduce Crossover Distortion.

In the time-

*Behavior at Key Points in Power amplifier with Feedback Loop*

**System Design vs. Circuit Design**

When doing design at the transistor level, there are two common concerns -

By being able to 'wrap-

29 NOV 2016