Chapter 3

Working with Op Amps

In This Chapter

arrow Familiarising yourself with op amps

arrow Exploring how feedback circuits work with op amps

arrow Looking at voltage comparators and summing amplifiers

arrow Considering popular op-amp packages

Have you ever played Operation, the game in which you use electrified tweezers to remove plastic body parts from little holes in a body? The edges of the holes are metal conductors, and so if you touch the edge of the hole with the tweezers while trying to remove the plastic piece inside, a buzzer sounds and the patient’s nose (a red light bulb) lights up.

An operational amplifier (op amp for short) is a little like this game, in that the slightest variation in the input (your hand holding the tweezers) is amplified into a huge variation in the output (the flashing red nose and jarring buzzer).

Op amps are among the most common types of integrated circuits (ICs) – probably second in popularity only to the 555 timer chip we describe in Chapter 2 of this minibook. In this chapter, you find out what an op amp is and how you can use one in different circuits. So scrub up and get ready to operate!

Looking at Operational Amplifiers

An op amp is a super-sensitive amplifier circuit that’s designed to amplify the difference of two input voltages. Thus, an op amp has two inputs and one output. The output voltage is often tens or even hundreds of thousands of times greater than the difference in the input voltages. Therefore, a very small difference in the two input voltages – perhaps a few hundredths or even a few thousandths of a volt – can result in a large output voltage.

Although an op amp is a type of IC, op amps were invented long before ICs. Op-amp circuits are a natural for ICs, however, and so not long after the introduction of the first ICs, IC versions of op amps became available. Today, op amps are among the most popular types of ICs.

technicalstuff.eps The name operational amplifier may be a bit confusing. Originally, the op-amp circuit was created for use as an amplifier in telephone distribution systems. Later, computer engineers discovered that they were able to adapt it easily to do mathematical operations such as addition, subtraction, multiplication and division. The term operational amplifier was coined around that time, because the circuits are amplifiers that can perform (mathematical) operations. (For more information, see the nearby sidebar ‘How the op amp came to be’.)

Internally, the simplest op amps consist of several dozen transistors, and more complicated varieties have many more. In this chapter, we ignore completely the internal circuitry of an op amp and treat it as what it is: a handy device you can use without understanding how it works. You can thank the engineers who, many decades ago, worked out all the internal details that make an op amp do its magic.

9781118589717-fg030301.eps

Figure 3-1: Schematic symbol for an op amp.

Many types of op-amp chips are manufactured today, but all have the five connections shown in Figure 3-1. The following list describes the function of each of these connections:

check.png +V and –V: The power supply for an op amp is provided via two pins usually labelled +V and –V. (These pins may be labelled Vs+ and Vs– instead, but their functions are the same.) Most op amps require a positive and a negative voltage power supply, with voltages usually ranging from ±6 V to ±18 V. This type of power supply is called a split supply. The ± symbol indicates that both positive voltage and negative voltage are required: ±6 V, for example, means that +6 V and –6 V are required.

You can build a split supply easily by using two batteries connected end to end, as shown in Figure 3-2. Here, two 9 V batteries are connected to create a ±9 V supply. Note that the +9 V and –9 V are measured relative to ground, which is accessed between the two batteries.

9781118589717-fg030302.eps

Figure 3-2: A split ±9V supply for an op amp.

tip.eps Some op amps don’t require split-voltage power supplies. Op amps that use single power supplies have a ground terminal instead of a –V terminal.

check.png Vout: The output of the op amp is taken from the Vout terminal. The voltage at the output terminal can be positive or negative, depending on the voltage difference between the two input terminals. The maximum voltage is usually a few volts less than the supply voltage at the +V and –V terminals. Thus, if the power supply for an op amp is ±9 V, the maximum output is around ±7 V or 8 V.

Most op amps can handle only a small amount of current through the output terminal – usually, in the neighbourhood of 25 mA or less. As Figure 3-3 shows, the output is passed through an external resistance, designated RL. The other end of this resistance is connected to ground. Thus, the output current that flows through the op amp must eventually end up at ground.

remember.eps The load resistance isn’t necessarily in the form of a simple resistor; any other circuit can provide load resistance, such as the base-emitter circuit of a transistor or even the input of another op amp.

9781118589717-fg030303.eps

Figure 3-3: The output from an op amp passes to ground through a load resistance.

check.png V+ and V: The two inputs of an op amp are the V+ and V terminals. These terminals are sometimes identified by + and – signs inside the triangle. The inputs are called differential inputs because the output voltage, which appears on the Vout terminal, depends on the difference between the voltage of the + and – terminals.

For most op amps, the maximum allowable input voltage is a bit less than the maximum power supply voltage: ±12 V is a typical limit. Remember, though, that an op amp amplifies the difference between the two input voltages. In many cases, the two input voltages are very close, and so the difference is very small.

remember.eps This fact is worth emphasising: the polarity of the op-amp output depends on the polarity of the difference between the V+ and V inputs. Thus, if V+ is greater than V, the output is a positive voltage, but if V+ is less than V, the output is a negative voltage.

In many op-amp circuits, one input is connected to ground. If the V+ input is grounded, the output polarity is always the opposite of the polarity of the input voltage on the Vterminal. In other words, negative voltage on V gives positive voltage on Vout and positive voltage on Vgives negative voltage on Vout. For this reason, the Vinput is often called the inverting input, because its polarity is inverted in the output.

If, on the other hand, the V input is connected to ground, the polarity of the output is the same as the polarity of the input voltage applied to V+. Thus, if V+ is positive, Vout is positive; if V+ is negative, Vout is negative. For this reason, the V+ input is called the noninverting input, because its polarity is the same in the output – that is, the Vinput voltage is not inverted.



Understanding Open Loop Amplifiers

As its name suggests, one of the most basic uses of an op amp is as an amplifier. If you connect an input source to one of the input terminals and ground the other input terminal, an amplified version of the input signal appears on the out terminal.

An important concept in op-amp circuits is voltage gain, which simply represents the amount by which the difference between the two input voltages is multiplied to produce the output voltage. If the input voltage difference is 2 V and the output voltage is 12 V, for example, the voltage gain of the amplifier is 6.

If you simply apply an input signal to one of the input terminals of an op amp, as shown in Figure 3-4, the circuit is called an open loop amplifier. We reveal the reason for this name in the next section’s discussion on closed loop amplifiers, but for now just realise that this type of circuit goes by the name open loop.

9781118589717-fg030304.eps

Figure 3-4: An op amp configured as an open loop amplifier.

In the open loop op-amp circuit, the V+ input is connected to ground, and an input signal is placed on the V input. In this arrangement, the voltage to be amplified is the same as the voltage of the V input. Although Figure 3-4 shows the input as alternating current (AC), the open loop op-amp circuit works for direct current (DC) as well.

The voltage gain in an open loop op-amp circuit is extraordinarily high – in the order of tens or even hundreds of thousands. Suppose that you’re using an op amp whose open loop voltage gain is 200,000 and that the power supply is ±9 V. In that case, an input voltage of +0.000025 V results in an output voltage of +5 V. An input voltage of +0.00004 V gives you an output voltage of 8 V.

remember.eps The output voltage can never exceed the power supply voltage. In fact, the maximum output voltage usually is about 1 V less than the power supply voltage. So if you’re using a pair of 9 V batteries to provide a ±9 V power supply, the maximum output voltage is ±8 V. As a result, the most that an open loop op-amp circuit with an open loop gain of 200,000 can reliably amplify is 0.00004 V. If the input voltage difference is any larger than 0.00004 V, the op amp is said to be saturated, and the output voltage goes to the maximum.

No matter how much money you invest in a top-quality voltmeter, it isn’t sensitive enough to measure voltages that small. Particle physicists at CERN may worry about smaller voltages, but for all practical purposes 0.00004 V is the same as 0 V.

As a result, one of the basic features of an open loop op-amp circuit is that if the input voltage difference is anything other than zero, the op amp is saturated and the output voltage is the same as its maximum. So if the maximum output voltage is ±8 V, the output is one of only three voltages: +8 V, 0 V or –8 V.



Open loop op-amp circuits may not sound very useful, but they have many useful applications. You see one example in ‘Comparing Voltages with an Op Amp’, later in this chapter.

Considering Closed Loop Amplifiers

As we explain in the preceding section, open loop op-amp circuits aren’t very useful as amplifiers because they’re so easily saturated.

remember.eps To make an op amp useful as an amplifier, you have to use it in a feedback circuit, which reduces the gain to a more manageable amount so that input voltages that are usable (and even measurable!) can be amplified reliably.

No doubt, you’re familiar with the concept of feedback. You’ve probably been sitting in an auditorium listening to someone talk into a public-address system when suddenly a piercing screech comes out of the speakers. That screech is feedback. In the case of the public-address system, the microphone picks up some of the output from the speakers and sends it back through the amplifier again. The result is the annoying high-pitched squeal.

Not all feedback is bad, though. In an op-amp amplifier circuit, negative feedback is used to reduce the enormous open loop amplification gain to a more manageable gain, such as 10. To do so, a portion of the output signal is fed back into the input via the V terminal through a feedback resistor. This type of circuit is called a closed loop amplifier, because a closed circuit path exists between the output and the input. (Now you understand why an op-amp circuit without the feedback loop is called an open loop amplifier.)

Investigating inverting amplifiers

The most common op-amp configuration is called an inverting amplifier, because the voltage of the output is opposite the voltage of the input. Figure 3-5 shows a basic inverting amplifier circuit.

9781118589717-fg030305.eps

Figure 3-5: An op amp configured as an inverting amplifier.

In an inverting amplifier circuit, the input signal works its way through a resistor on its way to the V input, and the output is looped back into the V input through a second resistor. In Figure 3-5, these resistors are designated R1 and R2. You can easily calculate the overall voltage gain of the circuit by using this formula:

9781118589717-eq0303001.eps

Here, the gain is designated ACL (CL stands for closed loop).

If R1 is 1 kΩ and R2 is 10 kΩ, the voltage gain of the circuit is –10. Then if the input voltage is +0.5 V, the output voltage is –5 V (0.5 × –10).

remember.eps The negative sign is required because Figure 3-5 is an inverting amplifier circuit, and so positive inputs give negative outputs, and vice versa.

Reversing inputs: Noninverting amplifiers

A closed loop amplifier can also be designed as a noninverting amplifier in which the output voltage isn’t reversed. To do that, you simply reverse the inputs, as shown in Figure 3-6. Instead of connecting the input voltage to V through a resistor and grounding V+, you ground V through a resistor and connect the input voltage to V+. The feedback circuit is the same; the output is connected to the Vinput through resistor R2.

9781118589717-fg030306.eps

Figure 3-6: An op amp configured as a noninverting amplifier.



The formula for calculating the gain for a noninverting amplifier is a little different from the formula for an inverting amplifier:

9781118589717-eq0303002.eps

If R1 is 1 kΩ and R2 is 10 kΩ, the gain is 11. Thus, an input voltage of +0.5 V results in an output voltage of +5.5 V.

Using an Op Amp as a Unity Gain Amplifier

A unity gain amplifier is an amplifier circuit that doesn’t amplify. In other words, it has a gain of 1. The output voltage in a unity gain amplifier is the same as the input voltage.

You may be thinking that such a circuit is worthless. After all, isn’t a simple piece of wire a unity gain circuit? Yes, but a unity gain amplifier provides one important benefit: it doesn’t take any current from the input source (that’s one of the golden rules of the ideal op amp; see the earlier sidebar ‘The ideal op amp’). Therefore, it completely isolates the input side of the circuit from the output side of the circuit. Op amps are often used as unity gain amplifiers to isolate stages of a circuit from one another.

Unity gain amplifiers come in two types:

check.png Voltage followers: Circuits in which the output is exactly the same voltage as the input.

check.png Voltage inverters: Circuits in which the output is the same voltage level as the input but with the opposite polarity.

If you think about it for a moment, you may be able to come up with the circuit for unity gain followers and inverters on your own. As we explain in the earlier section ‘Considering Closed Loop Amplifiers’, the formula for calculating the gain of both an inverting amplifier and a noninverting amplifier requires you to divide R2 by R1, and so all you have to do is choose resistor values that results in a gain of 1.

The following sections explain how to create unity followers and unity inverters.

Configuring a voltage follower

A unity gain voltage follower is simply a noninverting amplifier with a gain of 1. Recall that the formula for calculating the value of a noninverting amplifier is:

9781118589717-eq0303003.eps

To create a unity gain voltage follower, you just omit R2 and connect the output directly to the inverting input, as shown in Figure 3-7. R2 is zero and so the value of R1 doesn’t matter, because zero divided by anything equals zero. So R1 is usually omitted as well, and the V input isn’t connected to ground.

9781118589717-fg030307.eps

Figure 3-7: An op amp configured as a unity gain voltage follower.

Configuring a unity inverter

The formula for calculating gain for an inverting amplifier is:

9781118589717-eq0303004.eps

In this case, all you have to do is use identical values for R1 and R2 to make the amplifier gain equal to 1. Figure 3-8 shows a unity gain inverter circuit using 1 kΩ resistors.

9781118589717-fg030308.eps

Figure 3-8: An op amp configured as a unity gain inverter.

Comparing Voltages with an Op Amp

A voltage comparator is a circuit that compares two input voltages and lets you know which of the two is greater. Suppose that you have a photocell that generates 0.5 V when it’s exposed to full sunlight, and you want to use this photocell as a sensor to determine when it’s daylight. You can use a voltage comparator to compare the voltage from the photocell with a 0.5 V reference voltage to determine whether or not the sun is shining.

Creating a voltage comparator from an op amp is easy, because the polarity of the op-amp’s output circuit depends on the polarity of the difference between the two input voltages. Figure 3-9 shows the basic circuit for an op-amp voltage comparator.

9781118589717-fg030309.eps

Figure 3-9: An op amp configured as a voltage comparator.

In the voltage-comparator circuit, a reference voltage is applied to the inverting input (V) and then the voltage to be compared with the reference voltage is applied to the noninverting input. The output voltage depends on the value of the input voltage relative to the reference voltage, as follows:

Input Voltage

Output Voltage

Less than reference voltage

Negative

Equal to reference voltage

Zero, in theory

Greater than reference voltage

Positive

remember.eps The voltage level for the positive and negative output voltages is about 1 V less than the power supply. Thus, if the op-amp power supply is ±9 V, the output voltage is: +8 V if the input voltage is greater than the reference voltage, 0 V if the input voltage is equal to the reference voltage and –8 V if the input voltage is less than the reference voltage.

You can modify the circuit to eliminate the negative voltage if the input is less than the reference by sending the output through a diode, as shown in Figure 3-10. In this circuit, a positive voltage appears at the output if the input voltage is greater than the reference voltage; otherwise, no output voltage exists.

9781118589717-fg030310.eps

Figure 3-10: Using a diode in a voltage-comparator circuit.

To create a voltage comparator that creates a positive voltage output if the input voltage is less than a reference voltage, use the circuit shown in Figure 3-11. Here the reference voltage is applied to the inverting (V) input and the input voltage is applied to the noninverting (V+) input.

9781118589717-fg030311.eps

Figure 3-11: A voltage comparator that tests for a voltage that’s less than a reference voltage.

The final voltage-comparator circuit you need to know about is the window comparator, which lets you know whether the input voltage falls within a given range. A window comparator requires three inputs: a low reference voltage, a high reference voltage and an input voltage. The output of the window comparator is a positive voltage only if the input voltage is greater than the high reference voltage or less than the high reference voltage. If the input voltage is between the two thresholds, then the output is zero.

You need two op amps to create a window comparator, as shown in Figure 3-12. As you can see in the figure, one op amp is configured to produce positive output voltage only if the input is greater than the high reference voltage (VREF(HIGH)). The other op amp is configured to produce positive output voltage only if the input is less than the low reference voltage (VREF(LOW)).

The input voltage is connected to both op amps; the output voltage is sent through diodes to allow only positive voltage before being combined. The resulting output has positive voltage only when the input voltage falls outside the low and high reference voltages.

tip.eps Notice in Figure 3-12 that the power supply connections aren’t shown separately for each op amp in the circuit. Omitting the power supply connections is common practice when multiple op amps are used in a single circuit. If the power supply connections were shown for all the op amps, the power supply connections would complicate the schematic unnecessarily. And no one needs unnecessary complications in life.

9781118589717-fg030312.eps

Figure 3-12: You can use two op amps to create a window comparator.

Adding Voltages: Summing Amplifiers

You can use an op amp to add or subtract two or more voltages. A circuit that adds voltages is called a summing amplifier. A summing amplifier has two inputs and an output whose voltage is the sum of the two input voltages but with the opposite polarity. If one of the inputs is +1.5 V and the other is +1.0 V, for example, the output voltage is –2.5 V.

Figure 3-13 shows a basic circuit for a summing amplifier. For the summing amplifier to work, resistors R1, R2 and R3 need to all be the same value.

If all the resistors in a summing amplifier are the same, the output voltage is the sum of the input voltages. This is the usual way to configure a summing amplifier, though you can vary the resistor values if you want.

If the resistors have different values, each of the input voltages is weighted according to the value of the resistor on its input circuit, which has the effect of multiplying each input voltage by a certain value before the voltages are summed. The exact value by which each input is multiplied depends on the mix of resistors you use.

9781118589717-fg030313.eps

Figure 3-13: A basic summing amplifier circuit.

If R1 is 1 kΩ and both R2 and R3 are 10 kΩ, for example, the input voltage applied through the 1 kΩ resistor is multiplied by 10 before being added to the voltage applied through the 10 kΩ resistor. Thus, if the input at R1 is +1 V, and the input at R2 is +2 V, the output voltage is –12 V.

The formula for calculating the output voltage based on the input voltages and the resistor values is:

9781118589717-eq0303005.eps

We leave you to work out the maths for various combinations of resistor values and input voltages. Here, though, are a few examples to give you an idea of how the circuit behaves when R1 is 1 kΩ and both R2 and R3 are 10 kΩ:

VIN (1)

VIN (2)

VOUT

+1 V

+1 V

–11 V

+1 V

+5 V

–15 V

0 V

+5 V

–5 V

+2 V

–5 V

–15 V

–1 V

–5 V

+15 V

tip.eps One drawback of the summing amplifier is that it inverts the polarity of the input, but you can easily feed the output of a summing amplifier into the input of a unity gain inverter, as shown in Figure 3-14. Here, the second op amp inverts the polarity of the output from the summing amplifier, which has the effect of returning the output voltage polarity to the polarity of the original inputs. (For more information about the voltage-inverter portion of this circuit, refer to ‘Using an Op Amp as a Unity Gain Amplifier,’ earlier in this chapter.)

9781118589717-fg030314.eps

Figure 3-14: You can combine a summing amplifier with a voltage inverter to preserve the input polarity.

A common use for a summing amplifier circuit is as an audio mixer. When this type of circuit is used as an audio mixer, each input is connected to a microphone. The summing amplifier combines all the microphone inputs by adding the voltages from each microphone, and the resulting output is sent on to another amplifier stage.

The resistors in each input circuit are often potentiometers, which allows you to vary the signal level from each input source. When you increase the resistance on one of the input circuits, less of that input is represented in the output mix – especially useful if one of your singers is a bit off-key.

You can extend a summing amplifier circuit with additional inputs. Figure 3-15 shows a circuit with four inputs that uses potentiometers to control the level of each input. You can add as many inputs as you want, but you need to ensure that the total combined voltage from all inputs doesn’t exceed the power supply voltage (minus a volt or two).

9781118589717-fg030315.eps

Figure 3-15: A simple audio mixer with four inputs.

Working with Op-Amp ICs

All the examples in this chapter assume that you’re using a generic op amp in your circuits, but when you start building a real-world op-amp circuit you need to use a real op amp. Fortunately, op-amp ICs are plentiful and nearly all electronic component shops sell several types of inexpensive op-amp ICs.

The most popular op-amp IC is the LM741, which comes in a standard eight-pin DIP package. Figure 3-16 shows the pin connections for this op amp.

9781118589717-fg030316.eps

Figure 3-16: Pinouts for the LM741 op amp.

You can also get ICs that contain two or more op amps in a single package. One of the most common is the LM324 quad op amp, which contains four op amps in a single 14-pin DIP package. Unlike the LM741, the LM324 uses single-power-supply op amps. Thus, instead of a split + and – voltage supply, you provide just a positive voltage power supply and a ground.

Figure 3-17 shows the pinouts for an LM324. As you can see, the first op amp is accessed via pins 1–3, the second via pins 5–7, the third via pins 8–10 and the fourth via pins 12–14. The positive voltage power supply is connected to pin 4 and pin 11 is connected to ground.

9781118589717-fg030317.eps

Figure 3-17: Pinouts for the LM324 quad op amp.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset