Experiment 11: The Need for Negativity - Make: More Electronics (2014)

Make: More Electronics (2014)

Chapter 11. Experiment 11: The Need for Negativity

Now that you’ve seen that an op-amp can amplify, I want to address two questions:

1. How can we determine how much it is amplifying?

2. How can the output become a more accurate copy of the input, so that if we listen to it through a loudspeaker, the noise won’t sound scratchy?

In this experiment I’m going to guide you through the process of answering the first question. I’ll deal with the second question in Experiment 12.

Messing with Measurement

In an ideal world, measuring the amplifying power of an op-amp would be a no-brainer. You’d have a signal generator to create a steady sine-wave input. You’d also have an oscilloscope, which would display the sine wave on its screen. You would check its amplitude visually against a scale on the screen, then check the output. To calculate the amplification factor, you would divide the output amplitude by the input amplitude. Simple!

(The “amplitude” of a signal basically describes how big it is, although this is not an entirely simple matter when dealing with a complex AC wave form. It can be the maximum voltage of each pulse, or the average voltage, or the root-mean-square voltage. I’ll leave you to search for that last one, if you’re interested.)

Unfortunately, most people do not possess a signal generator or an oscilloscope. Can you measure the performance of your op-amp using nothing more than a multimeter? I think you can, although it will not be so easy, because the meter won’t make accurate measurements of a signal produced by a microphone when you say “Aaah” into it.

The answer to this problem is to forget about AC for a moment. If we remove the capacitors that were installed to block DC, the op-amp can amplify a steady DC voltage difference, and you can use your meter to measure that.

Or can you? Here’s another problem: merely touching your meter probe to one of the inputs of the op-amp can cause a tiny change in voltage, and this will be amplified to become a bigger change, along with the signal. As I mentioned in Experiment 2, measuring affects measurement (see Chapter 2). The process of trying to discover the voltage will change the voltage.

Fortunately there are ways around this, and I think the process of solving the problems will be interesting and instructive in itself. So let’s get started.

DC Amplification

At the risk of causing inconvenience, I’m going to ask you to remove and set aside some of the components that you installed previously. The new circuit that I’d like you to build is shown in Figure 11-1. Please make sure that there are no leftover components from the old circuit that will cause confusion.

A basic circuit for measuring the performance of an op-amp.

Figure 11-1. A basic circuit for measuring the performance of an op-amp.

Notice that you must now use two 2.2K resistors in your “A” voltage divider. This is because we’re going to be sinking a little current into this divider, so I want the “A” resistors to have a relatively low value. (In the previous experiment, you could use 100K resistors because the impedance of the op-amp inputs is extremely high, and was applied equally to both voltage dividers.)

You’ll need to go through the same procedure for matching two 2.2K resistors as you used for matching two 100K resistors in the previous experiment. I promise that this will be the last time you’ll need to deal with this little task.

The microphone and the coupling capacitors have been removed, because we’re only interested in DC signal amplification in this experiment. But without a microphone, how are we going to create a difference between the two inputs of the op-amp, to give it something to amplify?

A 5K trimmer is the answer. Notice that it is inserted between the two “B” resistors. By adjusting the trimmer, you change the balance of the voltage divider and vary the voltage to the noninverting input. When you turn the trimmer to and fro, you can think of it as being like a very, very slow microphone input—slow enough that your meter can keep up with it.

§ Reduce the lengths of resistor wires to a minimum in this circuit so that they don’t pick up stray electromagnetic fields that will be amplified by the op-amp. Keep all your resistors snug against the breadboard. Remember, an op-amp will amplify electronic noise as well as any signal that you put into it.

After you have set up the circuit, you touch the red probe on your meter to the op-amp output, while the black probe touches the connection between the “A” resistors. Remember to reset your meter to measure DC volts!

The Ins and Outs of Amplification

You are now measuring the difference between the op-amp output and 4.5VDC. Therefore, if the signal from the op-amp is relatively low, you should see a negative relative voltage. Fortunately, almost all digital meters can display a negative voltage as easily as a positive voltage, but you have to be watchful for the minus sign on your meter display.

You can begin using this circuit just by playing with it, varying the value of the trimmer slowly while observing the voltage on your meter. I’m betting that the voltage will jump from negative to positive, suddenly, halfway through the trimmer’s range. Why does this happen?

The upper graph in Figure 11-2 is derived from my own actual readings in this circuit. The meter measured the output in volts, but I have converted them to millivolts so that the units in the input graph are the same as the units in the output graph.

The lower graph shows a calculated linear progression of voltage on the noninverting input of an op-amp. The upper graph shows the output, relative to a voltage midway between the two sides of the op-amp’s power supply.

Figure 11-2. The lower graph shows a calculated linear progression of voltage on the noninverting input of an op-amp. The upper graph shows the output, relative to a voltage midway between the two sides of the op-amp’s power supply.

As you can see, the output jumps from one extreme to the other. This is because the op-amp is applying an extreme amount of amplification. As the trimmer nears the midpoint of its resistance, the tiniest change in voltage creates a huge reaction.

If you replaced the 5K trimmer with perhaps a 5-ohm trimmer (if you could find one!) you might be able to flatten the gradient of the output a bit, but still the shape of it probably wouldn’t match the shape of the input very well, and the extreme amplification of the circuit would tend to amplify a lot of electrical noise. This didn’t matter when all you wanted was to see an LED light up, but it’s not useful for the faithful reproduction of an audio signal. We need the output to be exactly the same shape as the input—in other words, they should have a linear relationship.

The way we achieve this is with negative feedback. While positive feedback was useful to clean up the output of a comparator, we need negative feedback to exert some discipline on the output from an op-amp.

Take a look at the graph in Figure 11-3, where a linear input causes an almost precisely linear output. This is exactly what we want and is surprisingly easy to achieve. To see it for yourself, make the following revisions to your circuit:

§ Remove the jumper that connects the two “A” resistors with the op-amp’s inverting input.

§ Add two more resistors, identified as “F” and “G” in Figure 11-4. The photograph in Figure 11-5 shows how this can be breadboarded.

The central area of the green input curve is now reproduced correctly in the output curve, as a result of negative feedback.

Figure 11-3. The central area of the green input curve is now reproduced correctly in the output curve, as a result of negative feedback.

The previous schematic has been modified to introduce negative feedback, by adding two new resistors.

Figure 11-4. The previous schematic has been modified to introduce negative feedback, by adding two new resistors.

The previous schematic to adjust and measure negative feedback, breadboarded. The red and black wires are connected with a meter that measures voltage.

Figure 11-5. The previous schematic to adjust and measure negative feedback, breadboarded. The red and black wires are connected with a meter that measures voltage.

Resistor F is a 1M negative-feedback resistor, which taps into the output from the op-amp and feeds it back to the inverting input. Here’s the concept:

§ When you were using a comparator, you achieved positive feedback by routing some of its output back to the noninverting input.

§ Now you are using an op-amp, you are achieving negative feedback by routing the output back to the inverting input.

Resistor G is a 10K “grounding resistor.” It doesn’t actually go to negative ground, just to the midpoint between the “A” resistors. This is because the op-amp is still using that midpoint as the reference voltage.

Take care to make the changes in the circuit. Now when you turn the trimmer, you should find that the meter shows the output voltage increasing very smoothly. It doesn’t jump from one extreme to the other anymore. In Figure 11-3 there are some tiny deviations in the orange line (which may or may not be visible in the version reproduced here), but I think these are just caused by imperfections in the measuring process. On a breadboard, every socket has some small resistance, and merely wiggling the components will change the measurements that you make, at least to a small degree.

So how does negative feedback work?

Electronic Ritalin

An op-amp is capable of applying a huge amplification ratio—as much as 100,000:1. But negative feedback reduces the ratio like this:

§ If the noninverting input is a little more positive than the inverting input, the op-amp output goes up.

§ Some of the output feeds back to the inverting input. This reduces the difference between the two inputs.

§ The reduced difference between the inputs causes a reduction in the op-amp output.

In other words, when the op-amp overreacts, negative feedback calms it down.

What if the noninverting input has a fraction less voltage than the inverting input? In that case, the output swings negative—and some of that feeds back to the inverting input, bringing it down so that, once again, the difference between the two inputs is reduced.

There is an additional factor, here, which is the grounding resistor, labelled G in Figure 11-4. This diverts some of the negative feedback to the midpoint of the “A” voltage divider. In other words:

§ The negative feedback stops the output of the op-amp from getting out of hand.

§ The grounding resistor stops the negative feedback from getting out of hand.

Gain

The term “gain” is usually used to mean the same thing as “amplification ratio,” as it’s less of a mouthful.

It’s possible to prove mathematically that the gain of the amplifier can be derived from an utterly simple formula, using the values of the “F” resistor and the “G” resistor:

Gain = 1 + ( F / G )

In case this isn’t entirely clear, take a look at Figure 11-6, where I have redrawn just the pieces of the the feedback circuit that are relevant. You now see that resistors F and G are really just another voltage divider.

A section of the op-amp test circuit has been redrawn to clarify the function of the two resistors that control negative feedback.

Figure 11-6. A section of the op-amp test circuit has been redrawn to clarify the function of the two resistors that control negative feedback.

In the top half of the figure, I’ve shown the actual voltages as you might measure them. In the bottom half of the figure, I’ve shown these voltages converted so that they will be easier to use in the calculation that follows. If the output from the op-amp is 6.5VDC and the other end of the “G” resistor is 4.5VDC, this is the same, relatively speaking, as if the output is 2VDC and the other end of the “G” resistor is 0VDC.

Do you remember the formula for calculating the voltage at the midpoint of a voltage divider? Turn back to What About the Voltage? and you’ll find it, although I’m using F and G, here, instead of R1 and R2, to identify the resistors. If VM is the voltage at the midpoint:

VM = V * (G / ( F + G ) )

I am using letter V to mean the voltage from the op-amp output, at the left end of the pair of resistors. I can’t call it VCC (as I did in the previous version of the formula) because we only use VCC to mean the full power-supply voltage. Here, V just means the voltage at the left end, relative to the voltage at the right end.

If I plug in the actual values from Figure 11-6 (expressing them in kilohms), I get this:

VM = 2 * (10 / ( 1,000 + 10) )

This is about 0.02 volts.

But now suppose I change the feedback resistor from 1M to 100K. The formula looks like this:

VM = (2 * (10 / 100 + 10) )

This is about 0.2 volts.

In other words, when I reduced the value of the feedback resistor (keeping the “ground” resistor the same), the negative feedback went up by a factor of about 10, and the gain of the amplifier went down by a similar amount.

Now imagine that instead of reducing the value of the “F” negative feedback resistor, I increase it. In fact, suppose it becomes almost infinitely high. In that case, the negative feedback voltage becomes close to 0. That was the situation when the feedback network wasn’t installed at all, and the only connection between the output and the input was empty air. This is why the op-amp behaved in such an extreme manner: it had no negative feedback at all.

Here’s the general rule:

§ When the feedback resistor decreases in value relative to the ground resistor, the negative feedback increases, and the gain of the op-amp decreases.

§ When the feedback resistor increases in value relative to the ground resistor, the negative feedback decreases, and the gain of the op-amp increases.

Background: Negative Origins

Negative feedback sounds like a simple idea, but it was extremely radical when it was developed at Bell Labs in the 1930s. In fact, initially the patent office was reluctant to issue a patent that seemed to have no application. Amplifiers are supposed to amplify, so why would you want a system that makes an amplifier amplify less? In fact, as you have seen, there’s a very good reason. It is a simple way to control the output and force it to match the shape of the input.

The concept of negative feedback was developed for amplifiers before the actual op-amp existed. In fact, the op-amp wasn’t even named until 1947, at which point it was used in analog computers to perform mathematical operations (which was how it came to be named as an “operational amplifier”).

So long as vacuum tubes were used, the multiple components required in an op-amp took up a lot of space and generated a lot of heat. Op-amps were not fully developed and did not become widely used until the 1960s, when the advent of the integrated circuit chip made them cheap and practical.

Pushing the Limits

Looking back at Figure 11-3, the orange line levels off at each end. This seems to suggest that its smooth linear performance breaks down, and indeed it does, but for a very good reason. The output voltage range of the op-amp cannot be greater than the voltage being delivered between the high end and the low end of the power supply. In fact the maximum and minimum output voltages will always be slightly less than the range between the supply voltages, because the op-amp has to siphon off a little power for itself to perform its magic. Consequently, if you increase the input beyond a certain point, you don’t get a higher output voltage. When this happens with an audio signal, you hear distortion.

In Figure 11-7 the upper graph shows an input signal, in green, with the output signal, in orange, superimposed. The height of the orange arrow, divided by the height of the green arrow, tells you how much gain we’re getting. This particular op-amp seems to have a lot of negative feedback, so it only has a gain of around 6:1. What happens if we reduce the negative feedback? Now the input signal is not subjected to so much control, so it gets a bit bigger. The op-amp tries to amplify it, but the output reaches the maximum voltage before the signal reaches its peak. Consequently, the peak is chopped off.

In the upper graph, the input (green line) creates an amplified output (orange line) that just reaches the limit of the amplifier. In the lower graph, the amplitude of the input has increased, but because the output cannot exceed the limit allowed by the power supply, the amplifier clips the output. Dotted lines show where an accurately amplified reproduction of the input would be if there was enough voltage to create it.

Figure 11-7. In the upper graph, the input (green line) creates an amplified output (orange line) that just reaches the limit of the amplifier. In the lower graph, the amplitude of the input has increased, but because the output cannot exceed the limit allowed by the power supply, the amplifier clips the output. Dotted lines show where an accurately amplified reproduction of the input would be if there was enough voltage to create it.

In this situation, the op-amp starts to behave like a transistor that saturates. It still amplifies the weaker parts of the signal, but when it gets to the peaks, it gives up. We say that the op-amp is being overdriven, and the result is known as clipping, because the peaks of the signal are clipped off. (I mentioned this briefly in Make: Electronics.) If it’s an audio signal, it acquires a harsh, jagged sound, like a guitar being played through a fuzz box. In fact a fuzz box works by overdriving an amplifier.

No Pain, No Gain!

Now I want to get back to the topic of measuring the gain of an op-amp. Remember:

§ The gain is the ratio of the output voltage to the input voltage.

Figure 11-8 shows some input voltages and output voltages that I measured myself, for various settings of the trimmer potentiometer in the circuit in Figure 11-4. These were the numbers that I used to draw the graphs in Figure 11-3. Then I used the graphs to calculate the gain of my op-amp.

These measured values were used to draw the previous graph showing op-amp performance with negative feedback.

Figure 11-8. These measured values were used to draw the previous graph showing op-amp performance with negative feedback.

You can do the same thing with your op-amp. I’ll take you through the process step by step. There will be four phases:

Phase 1

You’ll make measurements to build your version of the first two columns of the table in Figure 11-8.

Phase 2

You’ll calculate your version of the third column of the table. Because you can’t actually measure the small input voltage to the op-amp without disturbing it, calculating the values is the alternative. Nothing more difficult than basic arithmetic will be necessary.

Phase 3

Using the numbers in your table, you will draw two graphs, like the ones that I drew.

Phase 4

You’ll obtain the gain of the op-amp by comparing the slopes of the graphs.

The whole process will take about fifteen minutes. Are you ready? Let’s find out what your op-amp is really doing.

Phase 1: Output Voltages

Touching the probes of your meter to the output side of the op-amp won’t disturb it significantly, so you can measure the output voltage directly. Remember, though, you have to determine the change in resistance of the trimmer that corresponds with each change in the output. Here’s how:

Step 1

Pull the trimmer out of the circuit and measure the resistance between its wiper (the center terminal) and the terminal that connects with the righthand 100K “B” resistor, on the negative side. (See Figure 11-4.) Adjust the trimmer until you measure 1.5K (1,500 ohms).

Don’t touch the metal ends of the leads while you make the measurement. This is easier if you use a couple of alligator patch cords. The alligator clip at one end of a patch cord holds a meter probe, and the alligator clip at the other end of that patch cord attaches to a terminal of the trimmer.

Step 2

Write down the resistance of the trimmer that you just measured.

Step 3

Put the trimmer back into the breadboard, keeping it the same way around as before.

Step 4

Measure the voltage of the op-amp output by resetting your meter to DC volts and positioning the probes, as shown in Figure 11-4. Make sure you have the red probe and the black probe in the positions shown. Take care to observe if there is a minus sign before the digits.

Step 5

Write down the output value, but change it from volts to millivolts by multiplying by 1,000—that is, moving the decimal point three spaces to the right. You’re going to compare the output voltage with the input voltage later, so they must both be in the same units. For instance, if your measurement was −3.5V, you would write down −3500 millivolts.

Step 6

Pull out the trimmer and adjust it while measuring the resistance of its right (negative) side until it has increased by 250 ohms. Go back to step 2, above, and repeat.

Each time you change the trimmer resistance, you must increase it by exactly 250 ohms. Continue making measurements until the trimmer resistance reaches 3,750 ohms (3.75K). It’s important that your trimmer values range from 1.5K to 3.75K, so that you can compare your table directly with mine.

Phase 2: Input Voltages

You can calculate the input voltage from the resistances and the supply voltage. This would all seem very easy if I could demonstrate it for you with a meter on a lab bench. I can’t, so the next-best way is to show you in a diagram, which I have drawn in Figure 11-9. This is a piece of the circuit from Figure 11-4 that contains the “B” voltage divider.

The voltage to the noninverting input of the op-amp can be calculated if you know the values shown above.

Figure 11-9. The voltage to the noninverting input of the op-amp can be calculated if you know the values shown above.

What we want to know is VM, the voltage at the midpoint. This is the same as the voltage that is applied to the noninverting input of the op-amp. We’re going to get it from the three values in the diagram identified as VCC, R1, and R2, because R1 and R2 form a voltage divider. Notice that R1 is the value of the lefthand resistor plus the resistance of the lefthand segment of the trimmer potentiometer, while R2 is the value of the righthand resistor plus the resistance of the righthand segment of the trimmer potentiometer.

Here is the procedure:

Step 1

Measure VCC. Set your meter to measure volts, and measure the voltage of the power supply between the positive bus of the circuit and the negative bus. If your 9V battery is reasonably fresh, you should get a value of at least 9.2V. Whatever it is, make a note of it. I’m calling it VCC, because that’s the abbreviation most commonly used for a power-supply voltage.

Step 2

I’m going to call the value of the lefthand resistor RL and the value of the righthand resistor RR. They should both be the same, because you chose them to be the same when you installed them in the circuit. But to make sure, pull each one out of the circuit and measure it now. Note the values in ohms (not kilohms). They should be slightly less or slightly more than 100,000. Put the resistors back in the circuit.

Step 3

Remove the trimmer from the circuit, and measure its total resistance between the two end terminals, in ohms, ignoring the center terminal. Remember not to touch the leads or the probes with your fingers while you are making the measurement.

My 5K trimmer turned out to have a resistance of 5,220 ohms (according to my meter). Yours may be slightly more or slightly less. The value doesn’t matter so long as you know what it is. I’m going to call this number RT (Resistance of Trimmer).

Step 4

To find R2, you add RR (the real exact value of your 100K resistor) to the resistance between the center terminal and the right-hand terminal of the trimmer. This resistance varied while you were performing the previous part of the experiment because you kept readjusting it. But initially you used 1.5K, or 1,500 ohms, so we’ll start with that, in which case:

R2 = RR + 1500

Step 5

To find the resistance of the lefthand segment of the trimmer, we just subtract the resistance of the righthand segment from RT. In the illustration above, the righthand segment had a resistance of 1,500. So:

R1 = RL + RT - 1500

Step 6

Now we can apply the same old formula to find the voltage at the center of a voltage divider:

VM = VCC * (R2 / (R1 + R2) )

The variables have different meanings from before because I am applying them to the “B” voltage divider, where VM is the noninverting input voltage to the op-amp. Remember, VCC is the power-supply voltage, which you measured in Step 1. You established R2 in step 4 and R1 in Step 5. So, you just plug these values into the formula. I can’t do it for you because I don’t know the exact resistances of your 100K resistor and your 5K trimmer. But you measured them yourself, so, you know what they are.

Step 7

VM is what the noninverting input voltage must have been when your trimmer was set to 1.5K. But wait—the op-amp was not amplifying that voltage. It was amplifying the difference between that voltage and the reference voltage. Well, what was the reference voltage (at the midpoint of the “A” divider)? It should have been exactly half of the power supply. So, to find the difference between the op-amp inputs (which I will call VI), you have to finish up like this:

VI = (VCC / 2) - VM

Just divide VCC by 2, then subtract VM, and that’s the difference between the two inputs. It is properly called the voltage differential, and should be a negative number, so remember to include the minus sign. Write it in the third column of your table, on the first line. In my copy of the table, I entered the value −47.3mV. Is yours something like that?

All this calculation seems a bit tiresome—but, you only have to do it once more. Because you moved your trimmer in precisely equal steps of 250 ohms when you were making measurements in Phase 1, you can be fairly sure that the input voltage also increased in equal steps. In other words, the input voltage must have increased in a straight line. Therefore, you only need to calculate the lowest and the highest input voltages, after which you will draw a straight line between them.

So, now, go back to Step 4 and recalculate a new value for R2, like this:

R2 = RR + 3750

And in Step 5, calculate a new value for R1 like this:

R1 = RL + RT - 3750

Now use the new values for R1 and R2 in Step 6, find the new value for VI in Step 7, and write it in the third column of your table, on the last line.

Phase 3: Graphing It

I asked you to graph the beta value of your transistor in Experiment 2 so that you would have a bit of practice before reaching this point in the book. Remember, you can get free graph paper online by searching for a term such as “print graph paper.”

Mark the horizontal scale in thousands of ohms, and the vertical scale in thousands of millivolts, to make your version of the top half of the graph that I drew in Figure 11-3. Use the numbers from the second column of your table to draw your graph.

Now make your version of my graph in the bottom half of Figure 11-3, using numbers from the third column of your table.

Phase 4: The Gain

You need to compare the slopes of your two graphs. This only makes sense where the graph lines are reasonably straight, and you’ll remember from Figure 11-3 that the output graph is curved at each end. So, I’ll choose a center section. But this is important: choose the same range of resistance values in your input graph.

The segments that I took from my graphs are shown in Figure 11-10. You’ll see that for each segment, the resistance range goes from 2.25K to 3.25K. You can use a different range, so long as it is the same for the output graph and the input graph.

Gradients of input and output voltages. See text for details.

Figure 11-10. Gradients of input and output voltages. See text for details.

The slope (which I will call S) of a straight-line graph can be defined as the vertical increase (V) divided by the horizontal increase (H):

S = V / H

So, you can calculate the slope of the output graph (call it S1), and divide it by the slope of the input graph (S2), to get the gain of the op-amp:

Gain = S1 / S2

If you calculate the two slopes of your graph lines and divide one by the other, you’ll get the answer. But because the horizontal increase is the same in each case, they cancel out, and the simple version of the formula looks like this, where V1 is the vertical increase in your output graph and V2 is the vertical increase in your input graph:

Gain = V1 / V2

So long as V1 and V2 are both measured in the same units, this will work. (You remember I asked you to write down all your values in millivolts?)

In Figure 11-10, my range of V1 goes from -1,140 to +2,800. Remember, the first number means “1,140 millivolts below the midpoint voltage,” while the second number means “2,800 millivolts above the midpoint.” Therefore the total increase was 2,800 + 1,140, which is 3,940mV.

Similarly for V2, the range was -14.3 to +29.7. That is a total of 14.3 + 29.7, which is 44.0mV.

Now, finally, I can calculate the gain!

Gain = 3940 / 44

The answer is about 89.6. I’ll round that to 90, because my measurements were not accurate enough to justify a decimal place. What result did you get from your calculations? And more to the point—do you think it’s right?

Is It Right?

At the end of a chain of arithmetic like this, I always wonder if I made a mistake. Well, I can compare the answer with what I know the gain should have been. Remember, I said that if F is the value of the negative-feedback resistor, and G is the value of the “ground” resistor (as shown in Figure 11-4):

Gain = 1 + ( G / F )

Because the “G” resistor is 1M (1,000,000 ohms) and the “F” resistor is 10K (10,000 ohms) the theoretically correct value for the gain is 101:1.

I think 90:1 is pretty close, considering the primitive methods that were used.

Too bad you didn’t have the signal generator and the oscilloscope that I mentioned at the beginning. But even if you did, and you were working in a well-equipped electronics lab, you would still be making measurements, doing some simple math, and taking precautions to minimize inaccuracies. These kinds of procedures are inescapable in science and engineering. That’s why I included them here.

Of course, it’s more fun just to put things together and see them work. If that’s what you would prefer—go ahead, I don’t mind! You can skip the sections of this book where measurements are involved, and just have the pleasure of building the circuits and applying power.

The trouble is, you won’t know why they work. You won’t be able to measure their performance, or to design circuits of your own. If you’re serious about electronics, some basic calculations and measurements will be necessary, especially when dealing with analog signals and amplification.

Splitting the Difference

If you’re wondering where the main source of inaccuracy was in this experiment, which led me to a value of 90:1 instead of 101:1, my guess is that the “A” voltage divider was the culprit. The “G” resistor sank voltage into the midpoint of the “A” divider. This must have raised the value in the voltage divider slightly, so that it was not exactly half of the supply voltage. I don’t know for sure, because trying to measure it would (once again) change it slightly.

The most obvious way to reduce the inaccuracy is to use a proper split power supply. And, indeed, if you look at an assortment of op-amp schematics, many of them will assume that you have such a supply.

For instance, the circuit in Figure 11-4, which was drawn in a layout suitable for breadboarding, could be redrawn in a more conventional format as shown in Figure 11-11. The “B” voltage divider is still necessary to apply a variable voltage to the noninverting input, but the “A” voltage divider has disappeared. In its place you see a ground symbol (at bottom-center of the figure). This symbol means that you connect this part of the circuit with the neutral ground on your split supply, to create the reference voltage.

The previous schematic used a layout appropriate for a breadboard, and assumed that only a 9V battery was available as the power supply. That schematic is redrawn here in conventional format, assuming availability of a split power supply. Note the ground symbol, which implies a potential of 0V.

Figure 11-11. The previous schematic used a layout appropriate for a breadboard, and assumed that only a 9V battery was available as the power supply. That schematic is redrawn here in conventional format, assuming availability of a split power supply. Note the ground symbol, which implies a potential of 0V.

This can be confusing, because in many circuits where a regular, single power supply (not a split supply) is used, a ground symbol identifies negative ground. The general rule is, the ground symbol always means 0 volts.

This is about as far as I’m going to go into the theory of op-amps. Really I have just scratched the surface, but this is primarily a hands-on book. For instance, I don’t have space to prove why the gain is found by 1 + ( F/G ). (You can look that up in any electronics book that has a section on op-amps.) If you have followed me step by step so far, you’ll have a big advantage in that you have actually seen how an op-amp works, which I hope will make the explanations in other books easier to understand.

The Basics

At this point I’m going to do what most books do at the beginning: show you the two most common, simplified, basic op-amp circuits. The reason I didn’t go through this before is that my approach is always to do some hands-on experiments first. The basic op-amp circuits aren’t much use to you until you know about the extra components that must be added, to get them to do something.

The two basic circuits are shown in Figure 11-12 and Figure 11-13. In Figure 11-12 the signal goes straight into the noninverting input. This is the configuration that we have used so far. The feedback resistor, which I called F, is usually referred to as R2. I called it F because R1 and R2 already have been used for two other purposes in this book, creating confusion. But you should know how the rest of the world refers to feedback and “ground” resistances.

The gain of the op-amp is now:

Gain = 1 + ( R2 / R1 )

Which is the same as the formula Gain = 1 + ( F / G ) that I used earlier.

The simplest possible representation of an op-amp circuit where the signal is applied to the noninverting input.

Figure 11-12. The simplest possible representation of an op-amp circuit where the signal is applied to the noninverting input.

In Figure 11-13 you will find an alternate configuration, which I haven’t mentioned before. The signal goes through resistor R1 to the inverting input, which it shares with the feedback resistor, R2. The noninverting input connects with neutral ground to provide the reference voltage. As before, when the value of R2 is high relative to R1, you get less negative feedback and more amplification, but the output is turned upside down, literally—because the signal was applied to the inverting input. A higher voltage on the inverting input creates a lower output, and vice versa. Consequently, the formula for finding the gain is preceded with a minus sign:

Gain = −(R2 / R1)

The simplest possible representation of an op-amp circuit where the signal is applied to the inverting input.

Figure 11-13. The simplest possible representation of an op-amp circuit where the signal is applied to the inverting input.

In either of these schematics, if R2 is omitted, the negative feedback resistance becomes almost infinite, and consequently the gain becomes almost infinite, too. This was the mode in which you used the op-amp in the first experiment. Without negative feedback, the op-amp will overreact to the tiniest variations between its input terminals.

Basic with No Split

The basic circuits assume that you have a split power supply. Some books will suggest that you can create this by using a pair of 9V batteries. The concept is illustrated in Figure 11-14. You connect the positive terminal of one battery with the negative terminal of the other, and this point becomes your theoretical neutral ground. The remaining “spare” terminal on each battery becomes a source of plus 9V and negative 9V, respectively.

Two 9V batteries can be used to create a split power supply, although this arrangement has some disadvantages (described in the text).

Figure 11-14. Two 9V batteries can be used to create a split power supply, although this arrangement has some disadvantages (described in the text).

Well, this sounds simple, so why didn’t I suggest it at the beginning? Several reasons:

1. I felt that using voltage dividers to create an intermediate voltage was a useful concept to learn.

2. For all I know, you may prefer to use an AC adapter, and I didn’t think it was reasonable to ask you to use two AC adapters.

3. Batteries cannot be matched to each other, and the 0V midpoint voltage will not be exactly 0V.

4. Creating a 0V reference requires adding another bus to your breadboard, which becomes confusing and is difficult to represent in a breadboard-style schematic.

5. I don’t think you really get better performance by using two batteries in this way. Batteries always suffer from voltages that vary depending how old they are and how much current you draw from them.

In any case, the general need for a split power supply has been reduced by some well-known workarounds, which remove the hassle of choosing an accurately matched “A” pair and “B” pair of resistors.

Figure 11-15 shows a real-life version of Figure 11-12 without a split power supply, using component values that are suitable for an audio signal. Two 68K resistors form a voltage divider to provide a reference voltage, but this is the only place where you need a divider, and the resistors do not have to be accurately matched. The input can be relative to any voltage, because the 1µF input coupling capacitor isolates the circuit from the DC component of the input. Similarly, a 10µF output coupling capacitor separates the output from subsequent components. The only remaining problem is the 10K ground resistor, which should connect with neutral ground in a split power supply, but the 10µF capacitor isolates it so that neutral ground is not necessary.

An op-amp configured for audio amplification with a single-voltage power supply and the signal connected with the noninverting input.

Figure 11-15. An op-amp configured for audio amplification with a single-voltage power supply and the signal connected with the noninverting input.

By using a feedback resistor ranging in value from 100K to 220K, in combination with a 10K ground resistor, you obtain a gain ranging from 11:1 to 23:1. The lower amplification value is suitable when someone is speaking close to the microphone, while the higher value would be appropriate for monitoring background noises in a room.

Figure 11-16 shows a circuit that makes similar compromises, this time for amplification from the inverting input, using a single-voltage power supply. Compare this with the theoretical version in Figure 11-13.

An op-amp configured for audio amplification with a single-voltage power supply and the signal connected with the inverting input.

Figure 11-16. An op-amp configured for audio amplification with a single-voltage power supply and the signal connected with the inverting input.

Quick Facts About Op-Amps

It’s time to sum up, so that you can come back to this section and refresh your memory about some of the tricky concepts:

§ An op-amp is a similar to a comparator. They both have the same schematic symbol. They both have a pair of inputs, and they both compare the voltages on the inputs to produce an output.

§ One of the inputs is a noninverting input, while the other is an inverting input.

§ Op-amps and comparators both use feedback to modify one of the inputs. However, a comparator uses positive feedback to create a clean high or low output, while an op-amp uses negative feedback so that its output is an accurate copy of its input.

§ Negative feedback is always applied to the inverting input.

§ Positive feedback enables a comparator to ignore small variations in its input. This is known as hysteresis. In an op-amp, hysteresis is very undesirable, because the op-amp must amplify (not ignore) every little detail in its input.

§ The primary application for op-amps is to amplify alternating signals, such as audio signals. Comparators are mostly used with DC inputs.

§ The input signal for an op-amp can be applied to the noninverting input, but may alternatively be applied to the inverting input. The op-amp amplifies the difference, either way. However, if you apply the signal to the inverting input, the output will be inverted (which is why it is named the “inverting” input).

§ The voltage on the input that you are not using for the signal has to be controlled in some way, to serve as a reference voltage.

§ The output from a comparator, usually employing a pullup resistor, can be compatible with digital chips. The output from an op-amp is usually not suitable for a digital input, because it is an analog signal that contains many small variations.

§ A comparator usually needs a pullup resistor to produce an output. An op-amp usually generates its own output.

Now that I’ve gone through all the op-amp theory, it’s time for some practice: building a functional audio amplifier.