sampleoce206+lab+4

14
1 Lab 4: Op Amps OCE 206 Ocean Instrumentation Author: William Snyder Lab Partner: Brad Clark Professor: Dr. Robert Tyce 3/29/2011

Upload: jim-rumen

Post on 25-Dec-2015

214 views

Category:

Documents


1 download

DESCRIPTION

sample oce lab

TRANSCRIPT

Page 1: SampleOCE206+Lab+4

1

Lab 4:

Op Amps OCE 206 Ocean Instrumentation

Author: William Snyder

Lab Partner: Brad Clark

Professor: Dr. Robert Tyce

3/29/2011

Page 2: SampleOCE206+Lab+4

2

Table of Contents

Introduction

Purpose

Open-Loop Test Circuit

Methods

Results

Discussion

Inverting Amplifier

Methods

Results

Discussion

Non-inverting Amplifier

Methods

Results

Discussion

Follower

Methods

Results

Discussion

Summing Amplifier

Methods

Results

Discussion

Push-pull Buffer

Methods

Results

Discussion

Conclusion

Page 3: SampleOCE206+Lab+4

3

Introduction:

An op Amp or Operational Amplifier is a network of transistors, resistors and capacitors that is capable

of producing a huge amount of controlled gain. Control of the gain of an op amp is achieved by using a

negative feedback loop. Every op amp has two inputs, one output, and power terminals. The two inputs are

labeled positive and negative. The op amp is designed to amplify the signal given to the positive input and

subtract from it, the signal sent to the negative input. A negative feedback loop can be established by feeding

some amount of the output back into the negative input of the op amp to effectively limit the total gain of the

system.

Although op amps are complicated devices, they have a distinct advantage over transistors in that they

function very predictably in a wide range of conditions. In most situations their behavior can be generalized

into two golden rules.

1. The output works to make the voltage difference on the inputs zero

2. The inputs draw no current

Op amps also provide a number of other desirable features including having a high input impedance and a low

output impedance. These characteristics make them a good choice for easily accomplishing many tasks which

would be much harder or impossible with a transistor.

Purpose:

In this lab we will explore the general behavior of op amps, demonstrate some of the most common

applications for op amps in the real world and compare our results to the applicable theory’s and models to

confirm the op amps follow the correct behavior. We will first demonstrate the magnitude and uncontrollable

nature or an Op amps gain without negative feedback. We will then look at using an op amp to amplify a

signal using both an inverting and non inverting amplifier. Finally we will then use an op amp solely to change

the output impedance of a circuit, show how they can sum multiple signals, and demonstrate the ability of the

feedback loop to eliminate crossover distortion caused within the loop.

Open-Loop Test Circuit:

Methods:

The first circuit built was a simple open-loop circuit (fig 1) which demonstrates the enormous amount

of gain that op amps have. The op amp dip package was installed in a breadboard and given power. The input

to the positive terminal of the op amp was then connected to a 10K variable resistor split evenly between +15

and -15 V dc. The resistor was then adjusted to try to get the output to be zero.

Page 4: SampleOCE206+Lab+4

4

Figure1: Simple open loop circuit with variable dc input voltage

Results:

Trimming the resistor very delicately allowed us to achieve almost 0 volts on the input signal (channel

1) however this produced either a 14.2 volt positive signal or a -13.6 volt negative signal on the output of the

op amp (channel 2)(Fig 2).

Fig 2: Left: output( blue) responding to a very small negative voltage on the input ( yellow) Right: output in

(blue) responding to a vary small positive voltage on the input in (yellow)

Discussion:

When the resistor is placed very close to the middle of its range, the resulting voltage on the input of

the op amp was almost zero. Theoretically if the op amp was given an input signal of 0V it would have nothing

to amplify however in reality the signal is only close to zero and without negative feedback to regulate the

gain, the op amp amplifies the signal until it reaches its maximum gain (the maximum voltage it can provide).

It is interesting that the op amp seemed to be able to swing output farther positive than it could negatively.

Page 5: SampleOCE206+Lab+4

5

Inverting Amplifier:

Methods:

An inverting amplifier is a circuit that produces an output gain using an op amp. Unlike in the previous

part of this lab, the output is controlled using a negative feedback loop. An input signal is connected to the

negative input of the op amp over a resistor and a second resistor connects the output back to the input. We

built our circuit with a 1K input resistor and a 10K feedback resistor (Fig 3). This feedback loop sets the gain as

the ratio of the feedback resistor to the input resistor.

���� =��

=10

1 = 10

Fig 3: An inverting amplifier circuit with a theoretical gain of 10x

Results:

When we tested this circuit experimentally at 1 KHz we found that the output was inverted and we had

a gain of -11.8x (Fig 4). This gain was calculated by dividing the peak to peak value of the output (channel 2)

by the peak to peak measurement of the input signal (channel 1).

Table 1: Input, output and calculated gain values

Input signal pk-pk Output Signal pk-pk Gain

576 mV 6.8 V -11.8x

Page 6: SampleOCE206+Lab+4

6

Fig 4: An inverted output signal (blue) with an 11.8x gain over the input signal (yellow)

We also tested this circuit at 1 MHz to demonstrate the limitations of the op amp at high frequencies.

The sin wave output developed an arbitrary phase shift instead of simply inverting and the gain was reduced

to about -3.5x (Fig 5).

Table 2: Input, output and calculated gain values

Input signal pk-pk Output Signal pk-pk Gain

576 mV 2 V -3.5x

Fig 5: The output signal (blue) of an inverting amplifier running below its ideal frequency range, input signal in

yellow

Page 7: SampleOCE206+Lab+4

7

To measure the input impedance of the circuit a 1K test resistor was added to determine the current

being drawn by the circuit represented as a black box(Fig 6). The input impedance is then calculated using:

���� = ������ + ������

���� =������

�����

Fig 6: Input impedance model

The calculated input impedance was 1056k.

To measure output impedance the circuit was loaded with a 1K resistor R and the change in voltage

across the circuit was measured. This essentially computes a thevenin equivalent resistance for the circuit (Fig

7) where:

�� = ���

�����

����� + ���

Fig 7: Thevenin equivalent model

When you do this you find that the difference between Vr and Vth is tiny, making their ratio 1.0. This

essentially means that the loaded circuit is dominated by the test load R making the output impedance very

low.

Table 3: Input and output impedances for an Inverting Amplifier

Input Impedance 1056K

Output Impedance Almost 0

Discussion:

The theoretical and measured values for the gain of this circuit differed by more than 10%. One

possible source of this error is the variance in the actual value of the resistors. Although the exact errors in

the values of the resistors was not recorded, allowing for a 5% error in the resistors as denoted by a gold band

on the resistors would change the gain, allowing a theoretical maximum of 11x. Although this cannot account

for the entire error found, I do not believe it was a setup error as the circuit behaved as expected in all other

aspects. If it had been accidentally wired as a non-inverting amplifier the gain would have made more sense

but the signal would not have been inverted.

The input and output impedances found make sense. Because the two inputs of the op amp attempt

to reach the same voltage, the inverted input on this circuit is known as a virtual ground. Their for any signal

Page 8: SampleOCE206+Lab+4

8

going into the circuit sees only the input resistor of 1K before it reaches the virtual ground. The low output

impedance was expected as it is a general characteristic of op amps due to the large amount of power that

they can provide.

Non-inverting Amplifier:

Methods:

A non-inverting amplifier op amp circuit is similar to an inverting amplifier in that it uses negative

feedback to limit the gain of the op amp. The difference is that the input now goes into the positive input of

the op amp. The gain is set using a voltage divider from the output to ground connected to the negative input

terminal (Fig 8). In this circuit the theoretical gain is given by:

���� = 1 +��

��

= 1 +10

1 = 11

Figure 8: A non inverting amplifier circuit with a theoretical gain of 11x

Results:

This circuit was tested at 1 KHz and it was found to behave exactly as expected. A sin wave input

produced a sin wave output with a gain of 11.07x (Fig 9). This gain was calculated by dividing the peak to peak

value of the output (channel 2) by the peak to peak measurement of the input signal (channel 1).

Table 4: Input, output and calculated gain values

Input signal pk-pk Output Signal pk-pk Gain

600 mV 6.64 V 11.07x

Page 9: SampleOCE206+Lab+4

9

Fig 9: The output signal of a non-inverting amplifier(blue), input in yellow

A 1Mohm resistor was used to test the input impedance of the circuit using the same method as with

the inverting amplifier. When you attempt to measure the input impedance of the circuit you find that the

voltage across the test resistor is tiny, meaning the input impedance is astronomically large.

Table 5: Input and output impedances for a non-Inverting Amplifier

Input Impedance >> 1Mohm

Output Impedance Almost 0

Discussion:

This circuit behaved mostly as expected. The 11.07x gain is very close to the theoretical gain of 11.

The large input impedance makes sense because the input is connected directly to the op amp and the op amp

‘s datasheet lists its input impedance on the order of 1012

ohms. The output impedance was not measured

because this circuit is essentially the same as the inverting amp when looking into the output. Its output

impedance should be very tiny just as the inverting apm’s was.

Follower:

Methods:

The follower is a special case of the non-inverting amplifier. Instead of dividing the output before

feeding it back into the negative feedback input of the op amp, the output is connected directly to the

negative input (Fig 10). This causes the op amp to essentially negate itself out and produces a voltage gain of

1x.

Page 10: SampleOCE206+Lab+4

10

Fig 10: Follower circuit with a theoretical gain of 1x

Results:

The input and output signals were found to look exactly identical in this circuit. It is easily seen without

any calculation that the gain is 1x (Fig 11).

Table 6: Input, output and calculated gain values

Input signal pk-pk Output Signal pk-pk Gain

600 mV 600 mv 1x

Fig 11: Identical input (yellow) and output (blue) signals of follower circuit

Page 11: SampleOCE206+Lab+4

11

Discussion:

The useful function of this circuit is not quite as clear cut as the math is, what is the purpose of an

amplifier with no gain? This circuit, being similar to the non inverting amplifier just examined maintains the

same input and output impedance characteristics. This circuit has a huge input impedance and a tiny output

impedance, allowing you to eliminate the impact of loading effects on the signal output.

Summing Amplifier:

Methods:

The summing amplifier is an inverting amplifier that sums and amplifies the total voltage of multiple

inputs (Fig 12). This is particularly useful for adding a dc offset to an input signal. Using the formulas defined

for the inverting amplifier, the gain of this circuit can be calculated to be 1x for the input signal. An adjustable

dc offset can be added to this using a 10K variable resistor wired between 15 and -15 Vdc.

Fig 12: A summing amplifier circuit designed to add a variable dc offset to an input signal

Results:

The output was as expected, an inverted sin wave (gain of -1x) that can be moved up or down by

turning the potentiometer (Fig 13).

Table 7: Input, output and calculated gain values

Input signal pk-pk Output Signal pk-pk Gain

2.16 mV 2.16 mv -1x

Page 12: SampleOCE206+Lab+4

12

Fig 13: The output of a summing amplifier (blue) showing the inverted sum of the input signal (yellow) and a

variable dc offset (input not shown)

Discussion:

While this circuit is useful for adding a dc offset to a signal, it actually can be applied in a much more

general sense. It will add any number of signals sent to it in the ratio specified by the ratio of the input

resistors on each signal.

Push-pull Buffer:

Methods:

The push-pull buffer circuit demonstrates the ability of op amps to eliminate junk added to a signal

after the output of the op amp by placing the feedback source after the junk. This essentially accounts for the

change before the signal is changed. In this case we are trying to eliminate the crossover distortion caused by

the .6V operating cost of the transistors. The circuit was built in two separate ways, first with the feedback

loop before the push pull stage (Fig 14), then with the loop containing the push pull stage (Fig 15). When

testing this circuit we attached a speaker to the output signal for both cases to also listen to the signal.

Fig 14: An inverting amplifier circuit followed by an independent push pull buffer.

Page 13: SampleOCE206+Lab+4

13

Fig 15: An inverting amplifier with a push pull buffer enclosed within the feedback loop

Results:

When viewing the results on a scope, it is very clear that the crossover distortion disappears

immediately when the location of the feedback loop is changed. The difference between the signal with

crossover distortion and the “clean” signal was also very clear through the speaker. It produces an unpleasant

wobble in the tone.

Fig 16: the output (blue)of the circuit in fig 14 showing significant crossover distortion due to the push pull

buffer, input in yellow

Page 14: SampleOCE206+Lab+4

14

Fig 17: The output (blue) of the circuit in fig 15 showing the elimination of the crossover distortion, input in

yellow

Discussion:

This circuit is able to eliminate the crossover distortion because whenever the transistor is waiting for

its .6V it sends zero volts over the feedback loop, this in turn makes the op amp amplify the voltage until it

reaches .6V and it again begins receiving a feedback signal to regulate its gain.

Conclusion:

Op amps are an incredibly versatile tool for building useful circuits. As we demonstrated, they have a

large and uncontrollable gain without negative feedback; however making use of this feedback they become

very flexible. We were able to use an op amp to amplify a signal using both an inverting and non inverting

amplifier, change the output impedance of a circuit without affecting gain, sum multiple signals, and eliminate

crossover distortion and in most cases found their behavior to agree with the theoretical models. Beyond this

there are many other applications for op amps, they can be used to build comparators, analog to digital and

digital to analog converters, filters, differentiators, integrators, and many other useful circuits.