Monday, February 14, 2011

op-amp

Practical considerations

[edit] Input offset problems

It is important to note that the equations shown below, pertaining to each type of circuit, assume that an ideal op amp is used. Those interested in construction of any of these circuits for practical use should consult a more detailed reference. See the External links and Further reading sections.
Resistors used in practical solid-state op-amp circuits are typically in the kΩ range. Resistors much greater than 1 MΩ cause excessive thermal noise and make the circuit operation susceptible to significant errors due to bias or leakage currents.
Practical operational amplifiers draw a small current from each of their inputs due to bias requirements and leakage. These currents flow through the resistances connected to the inputs and produce small voltage drops across those resistances. In AC signal applications this seldom matters. If high-precision DC operation is required, however, these voltage drops need to be considered. The design technique is to try to ensure that these voltage drops are equal for both inputs, and therefore cancel. If these voltage drops are equal and the common-mode rejection ratio of the operational amplifier is good, there will be considerable cancellation and improvement in DC accuracy.
If the input currents into the operational amplifier are equal, to reduce offset voltage the designer must ensure that the DC resistance looking out of each input is also matched. In general input currents differ, the difference being called the input offset current, Ios. Matched external input resistances Rin will still produce an input voltage error of  Rin·Ios .  Most manufacturers provide a method for tuning the operational amplifier to balance the input currents (e.g., "offset null" or "balance" pins that can interact with an external voltage source attached to a potentiometer). Otherwise, a tunable external voltage can be added to one of the inputs in order to balance out the offset effect. In cases where a design calls for one input to be short-circuited to ground, that short circuit can be replaced with a variable resistance that can be tuned to mitigate the offset problem.
Note that many operational amplifiers that have MOSFET-based input stages have input leakage currents that will truly be negligible to most designs.

[edit] Power supply effects

Although the power supplies are not shown in the operational amplifier designs below, they can be critical in operational amplifier design.
Power supply imperfections (e.g., power signal ripple, non-zero source impedance) may lead to noticeable deviations from ideal operational amplifier behavior. For example, operational amplifiers have a specified power supply rejection ratio that indicates how well the output can reject signals that appear on the power supply inputs. Power supply inputs are often noisy in large designs because the power supply is used by nearly every component in the design, and inductance effects prevent current from being instantaneously delivered to every component at once. As a consequence, when a component requires large injections of current (e.g., a digital component that is frequently switching from one state to another), nearby components can experience sagging at their connection to the power supply. This problem can be mitigated with copious use of bypass capacitors placed connected across each power supply pin and ground. When bursts of current are required by a component, the component can bypass the power supply by receiving the current directly from the nearby capacitor (which is then slowly charged by the power supply).
Additionally, current drawn into the operational amplifier from the power supply can be used as inputs to external circuitry that augment the capabilities of the operational amplifier. For example, an operational amplifier may not be fit for a particular high-gain application because its output would be required to generate signals outside of the safe range generated by the amplifier. In this case, an external push–pull amplifier can be controlled by the current into and out of the operational amplifier. Thus, the operational amplifier may itself operate within its factory specified bounds while still allowing the negative feedback path to include a large output signal well outside of those bounds.[1]

[edit] Circuit applications

[edit] Comparator

Compares two voltages and switches its output to indicate which voltage is larger.
(where Vs is the supply voltage and the opamp is powered by + Vs and Vs.)

[edit] Inverting amplifier


An inverting amplifier uses negative feedback to invert and amplify a voltage. The Rin,Rf resistor network allows some of the output signal to be returned to the input. Since the output is 180° out of phase, this amount is effectively subtracted from the input, thereby reducing the input into the operational amplifier. This reduces the overall gain of the amplifier and is dubbed negative feedback.[2]
  • Zin = Rin (because V is a virtual ground)
  • A third resistor, of value , added between the non-inverting input and ground, while not necessary, minimizes errors due to input bias currents.[3]
The gain of the amplifier is determined by the ratio of Rf to Rin. That is:

The presence of the negative sign is a convention indicating that the output is inverted. For example, if Rf is 10 000 Ω and Rin is 1 000 Ω, then the gain would be -10 000Ω/1 000Ω, which is -10. [4]
Theory of operation: An Ideal Operational Amplifier has 2 characteristics that imply the operation of the inverting amplifier: Infinite input impedance, and infinite differential gain. Infinite input impedance implies there is no current in either of the input pins because current cannot flow through an infinite impedance. Infinite differential gain implies that both the (+) and (-) input pins are at the same voltage because the output is equal to infinity times (V+ - V-). As the output approaches any arbitrary finite voltage, then the term (V+ - V-) approaches 0, thus the two input pins are at the same voltage for any finite output.
To begin analysis, first it is noted that with the (+) pin grounded, the (-) must also be at 0 volts potential due to implication 2. with the (-) at 0 volts, the current through Rin (from left to right) is given by I = Vin/Rin by Ohm's law. Second, since no current is flowing into the op amp through the (-) pin due to implication 1, all the current through Rin must also be flowing through Rf (see Kirchoff's Current Law). Therefore, with V- = 0 volts and I(Rf) = Vin/Rin the output voltage given by Ohm's law is -Vin*Rf/Rin.
Real op amps have both finite input impedance and differential gain, however both are high enough as to induce error that is considered negligible in most applications.

[edit] Non-inverting amplifier


Amplifies a voltage (multiplies by a constant greater than 1)
  • Input impedance
    • The input impedance is at least the impedance between non-inverting ( + ) and inverting ( ) inputs, which is typically 1 MΩ to 10 TΩ, plus the impedance of the path from the inverting ( ) input to ground (i.e., R1 in parallel with R2).
    • Because negative feedback ensures that the non-inverting and inverting inputs match, the input impedance is actually much higher.
  • Although this circuit has a large input impedance, it suffers from error of input bias current.
    • The non-inverting ( + ) and inverting ( ) inputs draw small leakage currents into the operational amplifier.
    • These input currents generate voltages that act like unmodeled input offsets. These unmodeled effects can lead to noise on the output (e.g., offsets or drift).
    • Assuming that the two leaking currents are matched, their effect can be mitigated by ensuring the DC impedance looking out of each input is the same.
      • The voltage produced by each bias current is equal to the product of the bias current with the equivalent DC impedance looking out of each input. Making those impedances equal makes the offset voltage at each input equal, and so the non-zero bias currents will have no impact on the difference between the two inputs.
      • A resistor of value
      which is the equivalent resistance of R1 in parallel with R2, between the Vin source and the non-inverting ( + ) input will ensure the impedances looking out of each input will be matched.
      • The matched bias currents will then generate matched offset voltages, and their effect will be hidden to the operational amplifier (which acts on the difference between its inputs) so long as the CMRR is good.

    • Very often, the input currents are not matched.
      • Most operational amplifiers provide some method of balancing the two input currents (e.g., by way of an external potentiometer).
      • Alternatively, an external offset can be added to the operational amplifier input to nullify the effect.
      • Another solution is to insert a variable resistor between the Vin source and the non-inverting ( + ) input. The resistance can be tuned until the offset voltages at each input are matched.
      • Operational amplifiers with MOSFET-based input stages have input currents that are so small that they often can be neglected.


[edit] Differential amplifier


The circuit shown is used for finding the difference of two voltages each multiplied by some constant (determined by the resistors).
The name "differential amplifier" should not be confused with the "differentiator", also shown on this page.
  • Differential Zin (between the two input pins) = R1 + R2 (Note: this is approximate)
For common-mode rejection, anything done to one input must be done to the other. The addition of a compensation capacitor in parallel with Rf, for instance, must be balanced by an equivalent capacitor in parallel with Rg.
The "instrumentation amplifier", which is also shown on this page, is another form of differential amplifier that also provides high input impedance.
Whenever and , the differential gain is
  and  
When and the differential gain is A = 1 and the circuit acts as a differential follower:

[edit] Voltage follower


Used as a buffer amplifier to eliminate loading effects (e.g., connecting a device with a high source impedance to a device with a low input impedance).
(realistically, the differential input impedance of the op-amp itself, 1 MΩ to 1 TΩ)
Due to the strong (i.e., unity gain) feedback and certain non-ideal characteristics of real operational amplifiers, this feedback system is prone to have poor stability margins. Consequently, the system may be unstable when connected to sufficiently capacitive loads. In these cases, a lag compensation network (e.g., connecting the load to the voltage follower through a resistor) can be used to restore stability. The manufacturer data sheet for the operational amplifier may provide guidance for the selection of components in external compensation networks. Alternatively, another operational amplifier can be chosen that has more appropriate internal compensation.

[edit] Summing amplifier











A summing amplifer sums several (weighted) voltages:
  • When , and Rf independent
  • When
  • Output is inverted
  • Input impedance of the nth input is Zn = Rn (V is a virtual ground)

Astable Multivibrator

The Hartley Oscillator

 

The main disadvantages of the basic LC Oscillator circuit we looked at in the previous tutorial is that they have no means of controlling the amplitude of the oscillations and also, it is difficult to tune the oscillator to the required frequency. If the cumulative electromagnetic coupling between L1 and L2 is too small there would be insufficient feedback and the oscillations would eventually die away to zero. Likewise if the feedback was too strong the oscillations would continue to increase in amplitude until they were limited by the circuit conditions producing signal distortion. So it becomes very difficult to "tune" the oscillator.
However, it is possible to feed back exactly the right amount of voltage for constant amplitude oscillations. If we feed back more than is necessary the amplitude of the oscillations can be controlled by biasing the amplifier in such a way that if the oscillations increase in amplitude, the bias is increased and the gain of the amplifier is reduced. If the amplitude of the oscillations decreases the bias decreases and the gain of the amplifier increases, thus increasing the feedback. In this way the amplitude of the oscillations are kept constant using a process known as Automatic Base Bias.
One big advantage of automatic base bias in a voltage controlled oscillator, is that the oscillator can be made more efficient by providing a Class-B bias or even a Class-C bias condition of the transistor. This has the advantage that the collector current only flows during part of the oscillation cycle so the quiescent collector current is very small. Then this "self-tuning" base oscillator circuit forms one of the most common types of LC parallel resonant feedback oscillator configurations called the Hartley Oscillator circuit.
Hartley Oscillator Coils
Hartley Oscillator Tuned Circuit
In the Hartley Oscillator the tuned LC circuit is connected between the collector and the base of the transistor amplifier. As far as the oscillatory voltage is concerned, the emitter is connected to a tapping point on the tuned circuit coil. The feedback of the tuned tank circuit is taken from the centre tap of the inductor coil or even two separate coils in series which are in parallel with a variable capacitor, C as shown.
The Hartley circuit is often referred to as a split-inductance oscillator because coil L is centre-tapped. In effect, inductance L acts like two separate coils in very close proximity with the current flowing through coil section XY induces a signal into coil section YZ below. An Hartley Oscillator circuit can be made from any configuration that uses either a single tapped coil (similar to an autotransformer) or a pair of series connected coils in parallel with a single capacitor as shown below.

Basic Hartley Oscillator Circuit

Basic Hartley Oscillator Circuit

When the circuit is oscillating, the voltage at point X (collector), relative to point Y (emitter), is 180o out-of-phase with the voltage at point Z (base) relative to point Y. At the frequency of oscillation, the impedance of the Collector load is resistive and an increase in Base voltage causes a decrease in the Collector voltage. Then there is a 180o phase change in the voltage between the Base and Collector and this along with the original 180o phase shift in the feedback loop provides the correct phase relationship of positive feedback for oscillations to be maintained.
The amount of feedback depends upon the position of the "tapping point" of the inductor. If this is moved nearer to the collector the amount of feedback is increased, but the output taken between the Collector and earth is reduced and vice versa. Resistors, R1 and R2 provide the usual stabilizing DC bias for the transistor in the normal manner while the capacitors act as DC-blocking capacitors.
In this Hartley Oscillator circuit, the DC Collector current flows through part of the coil and for this reason the circuit is said to be "Series-fed" with the frequency of oscillation of the Hartley Oscillator being given as.
Hartley Oscillator Frequency Formula
Note: LT is the total cumulatively coupled inductance if two separate coils are used including their mutual inductance, M.
The frequency of oscillations can be adjusted by varying the "tuning" capacitor, C or by varying the position of the iron-dust core inside the coil (inductive tuning) giving an output over a wide range of frequencies making it very easy to tune. Also the Hartley Oscillator produces an output amplitude which is constant over the entire frequency range.
As well as the Series-fed Hartley Oscillator above, it is also possible to connect the tuned tank circuit across the amplifier as a shunt-fed oscillator as shown below.

Shunt-fed Hartley Oscillator Circuit

Shunt-fed Hartley Oscillator Circuit


In the Shunt-fed Hartley Oscillator both the AC and DC components of the Collector current have separate paths around the circuit. Since the DC component is blocked by the capacitor, C2 no DC flows through the inductive coil, L and less power is wasted in the tuned circuit. The Radio Frequency Coil (RFC), L2 is an RF choke which has a high reactance at the frequency of oscillations so that most of the RF current is applied to the LC tuning tank circuit via capacitor, C2 as the DC component passes through L2 to the power supply. A resistor could be used in place of the RFC coil, L2 but the efficiency would be less.

The RC Oscillator

 

In the Amplifiers  tutorial we saw that a single stage amplifier will produce 180o of phase shift between its output and input signals when connected in a class-A type configuration. For an oscillator to sustain oscillations indefinitely, sufficient feedback of the correct phase, ie "Positive Feedback" must be provided with the amplifier being used as one inverting stage to achieve this. In a RC Oscillator the input is shifted 180o through the amplifier stage and 180o again through a second inverting stage giving us "180o + 180o = 360o" of phase shift which is the same as 0o thereby giving us the required positive feedback. In other words, the phase shift of the feedback loop should be "0".
In a Resistance-Capacitance Oscillator or simply an RC Oscillator, we make use of the fact that a phase shift occurs between the input to a RC network and the output from the same network by using RC elements in the feedback branch, for example.

RC Phase-Shift Network

Basic RC Phase-Shift Network


The circuit on the left shows a single resistor-capacitor network and whose output voltage "leads" the input voltage by some angle less than 90o. An ideal RC circuit would produce a phase shift of exactly 90o. The amount of actual phase shift in the circuit depends upon the values of the resistor and the capacitor, and the chosen frequency of oscillations with the phase angle ( Φ ) being given as:

Phase Angle

Phase-Shift Equation
In our simple example above, the values of R and C have been chosen so that at the required frequency the output voltage leads the input voltage by an angle of about 60o. Then the phase angle between each successive RC section increases by another 60o giving a phase difference between the input and output of 180o (3 x 60o) as shown by the following vector diagram.
Vector Diagram of RC Oscillator

Then by connecting together three such RC networks in series we can produce a total phase shift in the circuit of 180o at the chosen frequency and this forms the bases of a "phase shift oscillator" otherwise known as a RC Oscillator circuit.
We know that in an amplifier circuit either using a Bipolar Transistor or an Operational Amplifier, it will produce a phase-shift of 180o between its input and output. If a RC phase-shift network is connected between this input and output of the amplifier, the total phase shift necessary for regenerative feedback will become 360o, ie. the feedback is "in-phase". Then to achieve the required phase shift in an RC oscillator circuit is to use multiple RC phase-shifting networks such as the circuit below.

Basic RC Oscillator Circuit

Basic RC Oscillator Circuit


The RC Oscillator which is also called a Phase Shift Oscillator, produces a sine wave output signal using regenerative feedback from the resistor-capacitor combination. This regenerative feedback from the RC network is due to the ability of the capacitor to store an electric charge, (similar to the LC tank circuit). This resistor-capacitor feedback network can be connected as shown above to produce a leading phase shift (phase advance network) or interchanged to produce a lagging phase shift (phase retard network) the outcome is still the same as the sine wave oscillations only occur at the frequency at which the overall phase-shift is 360o. By varying one or more of the resistors or capacitors in the phase-shift network, the frequency can be varied and generally this is done using a 3-ganged variable capacitor.
If all the resistors, R and the capacitors, C in the phase shift network are equal in value, then the frequency of oscillations produced by the RC oscillator is given as:
Frequency of Oscillations
  • Where:
  • ƒ  is the Output Frequency in Hertz
  • R   is the Resistance in Ohms
  • C   is the Capacitance in Farads
  • N   is the number of RC stages. (in our example N = 3)
Since the resistor-capacitor combination in the RC Oscillator circuit also acts as an attenuator producing an attenuation of -1/29th (Vo/Vi = β) per stage, the gain of the amplifier must be sufficient to overcome the losses and in our three mesh network above the amplifier gain must be greater than 29. The loading effect of the amplifier on the feedback network has an effect on the frequency of oscillations and can cause the oscillator frequency to be up to 25% higher than calculated. Then the feedback network should be driven from a high impedance output source and fed into a low impedance load such as a common emitter transistor amplifier but better still is to use an Operational Amplifier   as it satisfies these conditions perfectly.

The Op-amp RC Oscillator

When used as RC oscillators, Operational Amplifier RC Oscillators are more common than their bipolar transistors counterparts. The oscillator circuit consists of a negative-gain operational amplifier and a three section RC network that produces the 180o phase shift. The phase shift network is connected from the op-amps output back to its "non-inverting" input as shown below.

Op-amp RC Oscillator Circuit

Op-amp RC Oscillator Circuit

As the feedback is connected to the non-inverting input, the operational amplifier is therefore connected in its "inverting amplifier" configuration which produces the required 180o phase shift while the RC network produces the other 180o phase shift at the required frequency (180o + 180o). Although it is possible to cascade together only two RC stages to provide the required 180o of phase shift (90o + 90o), the stability of the oscillator at low frequencies is poor.
One of the most important features of an RC Oscillator is its frequency stability which is its ability too provide a constant frequency output under varying load conditions. By cascading three or even four RC stages together (4 x 45o), the stability of the oscillator can be greatly improved. RC Oscillators with four stages are generally used because commonly available operational amplifiers come in quad IC packages so designing a 4-stage oscillator with 45o of phase shift relative to each other is relatively easy.
RC Oscillators are stable and provide a well-shaped sine wave output with the frequency being proportional to 1/RC and therefore, a wider frequency range is possible when using a variable capacitor. However, RC Oscillators are restricted to frequency applications because of their bandwidth limitations to produce the desired phase shift at high frequencies.

Crystal-Controlled Oscillators



In applications where extremely stable operating frequencies are required, the oscillators that we have studied so far come up short. They can experience variations in both frequency and amplitude for several reasons:
  • If the transistor is replaced, it may have slightly different gain characteristics.
  • If the inductor or capacitor is changed, the operating frequency may change.
  • If circuit temperature changes, the resistive components will change, which can cause a change in both frequency and amplitude.
In any system where stability is paramount, crystal-controlled oscillators are used. Crystal-controlled oscillators use a quartz crystal to control the operating frequency.
The key to the operation of a crystal-controlled oscillator is the piezoelectric effect, which means that the crystal vibrates at a constant rate when it is exposed to an electric field. The physical dimensions of the crystal determine the frequency of vibration. Thus, by cutting the crystal to specific dimensions, we can produce crystals that have very exact frequency ratings. There are three commonly used crystals that exhibit piezoelectric properties. They are Rochelle salt, quartz, and tourmaline. Rochelle salt has the best piezoelectric properties but is very fragile. Tourmaline is very tough, but its vibration rate is not as stable. Quartz crystals fall between the two extremes and are the most commonly used.
Quartz crystals are made from silicon dioxide (). They develop as six-sided crystals as shown in Figure 18.20 of the text. When used in electronic components, a thin slice of crystal is placed between two conductive plates, like those of a capacitor. Remember that its physical dimensions determine the frequency at which the crystal vibrates.

The Wien-Bridge Oscillator

 



The Wien-bridge oscillator is a commonly used low-frequency oscillator. This circuit achieves regenerative feedback by introducing no phase shift (0°) in the positive feedback path. As shown in Figure 18-4, there are two RC circuits in the positive feedback path (output to noninverting input).



FIGURE 18-4 Wien-bridge oscillator.

Thecircuit forms a low-pass filter, and the circuit forms a high-pass filter. Both RC filters have the same cutoff frequency (). Combined, they create a band-pass filter. As you know, a band-pass filter has no phase shift in its pass-band. As shown in Figure 18.7 of the text, the circuit oscillates at the intersection of the high-pass and low-pass response curves. It is common to see trimmer potentiometers added in series with and . They are used to fine-tune the circuit’s operating frequency.
The negative feedback path is from the output to the inverting input of the op-amp. Note the differences from a normal negative feedback circuit. Two diodes have been added in parallel with , as well as the potentiometer labeled . The potentiometer is used to control the of the circuit. The diodes also limit the closed-loop voltage gain of the circuit. If the output signal tries to exceed a predetermined value by more than 0.7 V, then the diodes conduct and limit signal amplitude. The diodes are essentially used as clippers.
Earlier we said that the Wien-bridge oscillator is a common low-frequency oscillator. As frequency increases, the propagation delay of the op-amp can begin to introduce a phase shift, which causes the circuit to stop oscillating. Propagation delay is the time required for the signal to pass through a component (in this case the op-amp). Most Wien-bridge oscillators are limited to frequencies below 1 MHz. Refer to Figure 18.9 of the text for a summary of Wien-bridge oscillator characteristics.

The Colpitts Oscillator

 



The Colpitts oscillator is a discrete LC oscillator that uses a pair of tapped capacitors and an inductor to produce regenerative feedback. A Colpitts oscillator is shown in Figure 18-5. The operating frequency is determined by the tank circuit. By formula:



FIGURE 18-5 Colpitts oscillator.
The key to understanding this circuit is knowing how the feedback circuit produces its 180° phase shift (the other 180° is from the inverting action of the CE amplifier). The feedback circuit produces a 180° voltage phase shift as follows:
  1. The amplifier output voltage is developed across .
  2. The feedback voltage is developed across .
  3. As each capacitor causes a 90° phase shift, the voltage at the top of (the output voltage) must be 180° out of phase with the voltage at the bottom of (the feedback voltage).
The first two points are fairly easy to see. is between the collector and ground. This is where the output is measured. is between the transistor base and ground, or in other words, where the input is measured. Point three is explained using the circuit in Figure 18-6.



FIGURE 18-6
Figure 18-6 is the equivalent representation of the tank circuit in the Colpitts oscillator. Let’s assume that the inductor is the voltage source and it induces a current in the circuit. With the polarity shown across the inductor, the current causes potentials to be developed across the capacitors with the polarities shown in the figure. Note that the capacitor voltages are 180° out of phase with each other. When the polarity of the inductor voltage reverses, the current reverses, as does the resulting polarity of the voltage across each capacitor (keeping the capacitor voltages 180° out of phase).
The value of the feedback voltage is determined (in part) by theof the circuit. For the Colpitts oscillator,is defined by the ratio of . By formula:
or
The validity of these equations is demonstrated in Example 18.1 of the text.
As with any oscillator, the product of must be slightly greater than 1. As mentioned earlier and . Therefore:
As with any tank circuit, this one will be affected by a load. To avoid loading effects (the circuit loses some efficiency), the output from a Colpitts oscillator is usually transformer-coupled to the load, as shown in Figure 18.14 of the text. Capacitive coupling is also acceptable so long as:


where is the total capacitance in the feedback network