phy 351/651 – laboratory 8 operational amplifiers ii

13
PHY 351/651 LAB 8 Page 1 PHY351/651 OPERATIONAL AMPLIFIERS II - LAB 8 PHY 351/651 – LABORATORY 8 Operational Amplifiers II Reading Assignment Horowitz, Hill Chap. 3.11 – 3.12 (p103-116) Data sheets LF356 and LM311N Overview In the previous lab you learned about the Golden Rules of op amps and then used them to understand and build several basic but important op amp circuits. In this lab, and the corresponding reading assignment, you go beyond the Golden Rules and learn about some realistic characteristics of op amps, and, in the process, become familiar with more advanced op amp operations. To motivate this week’s lab activities, let’s first look at the operation of a generalized op amp circuit making explicit reference to the role of feedback in its operation, Figure 1a. We will assume that this op amp is ideal in the sense that it has infinite input impedance (Golden Rule 2) and zero output impedance, but we also make here our first realistic assumption about op amps, namely that they have finite differential voltage gain A (we’ll assume for now that the gain is frequency independent, but will drop this assumption later on in the lab; also, I should note that A is more commonly called the open-loop gain " ). Furthermore, as shown in Figure 1, we’ll restrict our attention for now to the case that feedback is applied to the inverting port of the op amp. Now, we learned previously that the op amp will adjust its output "$% to make zero the difference in potential between the positive input terminal (at & ) and negative input terminal (at ). This was Golden Rule 1. Let’s try to be more specific about this feedback process. First, we know that the op amp’s output will be proportional to the difference between the potential at its input terminals (it’s a differential amplifier). For the case of finite gain, we thus can write the op amp’s output voltage as "$% = ( & ). In order for the op amp to act back and null the difference in its input potential, at least a fraction of the op amp’s output must be returned to one of the input terminals; this is done through the feedback loop, where represents the fraction of the output signal that is returned to the inverting input. To be concrete, imagine the following scenario: (1) A signal ,- is applied to the non-inverting input of the op amp, creating an input difference. (2) The input difference is multiplied by the op amp so that "$% = ( ,- ). (3) A fraction of the output is fed to the inverting input so that = "$% . (4) The new difference is taken and then multiplied so that "$% = ( ,- "$% ). (5) This process goes on indefinitely until the input difference is nulled. But notice that we now have an expression for "$% in terms of ,- : "$% = / 0&/1 ,- (1). For the case of the voltage follower, Fig. 1b, all of the output signal is fed-back to the input; that is, =1. In this case, "$% = / 0&/ ,- , which in the limit that →∞ (i.e. an ideal op amp),

Upload: others

Post on 28-Feb-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

PHY351/651LAB8Page1

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

PHY 351/651 – LABORATORY 8

Operational Amplifiers II Reading Assignment Horowitz, Hill Chap. 3.11 – 3.12 (p103-116) Data sheets LF356 and LM311N Overview In the previous lab you learned about the Golden Rules of op amps and then used them to understand and build several basic but important op amp circuits. In this lab, and the corresponding reading assignment, you go beyond the Golden Rules and learn about some realistic characteristics of op amps, and, in the process, become familiar with more advanced op amp operations. To motivate this week’s lab activities, let’s first look at the operation of a generalized op amp circuit making explicit reference to the role of feedback in its operation, Figure 1a. We will assume that this op amp is ideal in the sense that it has infinite input impedance (Golden Rule 2) and zero output impedance, but we also make here our first realistic assumption about op amps, namely that they have finite differential voltage gain A (we’ll assume for now that the gain is frequency independent, but will drop this assumption later on in the lab; also, I should note that A is more commonly called the open-loop gain 𝐴"). Furthermore, as shown in Figure 1, we’ll restrict our attention for now to the case that feedback is applied to the inverting port of the op amp.

Now, we learned previously that the op amp will adjust its output 𝑉"$% to make zero the difference in potential between the positive input terminal (at 𝑉&) and negative input terminal (at 𝑉'). This was Golden Rule 1. Let’s try to be more specific about this feedback process. First, we know that the op amp’s output will be proportional to the difference between the potential at its input terminals (it’s a differential amplifier). For the case of finite gain, we thus can write the op amp’s output voltage as 𝑉"$% = 𝐴(𝑉& − 𝑉'). In order for the op amp to act back and null the difference in its input potential, at least a fraction of the op amp’s output must be returned to one of the input terminals; this is done through the feedback loop, where 𝛽 represents the fraction of the output signal that is returned to the inverting input.

To be concrete, imagine the following scenario: (1) A signal 𝑉,- is applied to the non-inverting input of the op amp, creating an input difference. (2) The input difference is multiplied by the op amp so that 𝑉"$% = 𝐴(𝑉,- − 𝑉'). (3) A fraction of the output is fed to the inverting input so that 𝑉' = 𝛽𝑉"$%. (4) The new difference is taken and then multiplied so that 𝑉"$% = 𝐴(𝑉,- − 𝛽𝑉"$%). (5) This process goes on indefinitely until the input difference is nulled. But notice that we now have an expression for 𝑉"$% in terms of 𝑉,-:

𝑉"$% =/

0&/1𝑉,- (1).

For the case of the voltage follower, Fig. 1b, all of the output signal is fed-back to the input; that is, 𝛽 = 1. In this case, 𝑉"$% =

/0&/

𝑉,-, which in the limit that 𝐴 → ∞ (i.e. an ideal op amp),

PHY351/651LAB8Page2

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

yields the familiar expression for an op follower: 𝑉"$% = 𝑉,-. Similarly, for the case of the non-inverting amplifier (Fig. 1c), Eq. 1 yields 𝑉"$% =

/(56&57)0&/ 56&57

𝑉,-. You should convince yourself that this result in fact reduces to the familiar expression for the output of a non-inverting amplifier for the case of an ideal op amp.

This preceding discussion serves the following purposes: (1) To give you a more quantitative picture of the role of feedback in the operation of an op amp circuit; and (2) To give you a sense

of how a specific non-ideality (i.e. finite op amp gain here) modifies the performance of an op amp circuit. But this discussion also serves to beg further questions:

Ø For example, how do other non-idealities, like finite op amp response time and finite op amp input and output impedance, affect op amp performance?

Ø How does the operation of the op amp change if the feedback signal is fed into the non-inverting input? This would be an example of positive feedback.

In this week’s lab, you will begin investigating these questions. Specifically, the learning objectives of the lab are:

1. To become more familiar with op amp terminology, including parameters that characterize realistic op amp behavior like slew rate, settling time, open loop output impedance, and op amp instability.

2. To go beyond the Golden Rules and gain additional experience in op amp circuit design.

Figure1:(a)Generalizedop-ampcircuitwithfeedbackintotheinvertinginput.(b)Unityfollowerwhereallof𝑽𝒐𝒖𝒕isfedbacktotheinput(i.e.𝜷 = 𝟏).(c)Non-invertingamplifierwhere𝜷isgivenbythevoltagedivisionduetothefeedbackresistors𝑹𝟏and𝑹𝟐.

PHY351/651LAB8Page3

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

3. To learn how to use op amp circuits to shape and generate waveforms.

Equipment o PB-503 proto-typing board o BK Precision or DG1022 Function Generator

o Either the Instek GDS-806s or Tektronix TDS digital oscilloscope. o LF356/7 JFET Input Operational Amplifiers

o LM311N Single Comparator o LN81RCPHL Light Emitting Diode (LED)

o Various resistors, capacitors and possibly attenuators o NI USB-6003

o Hand-held digital multi-meter, banana cables, coaxial cables, and BNC-to-mini-grabber adapters

Activity 1 – Op Amp Slew Rate and Settling Time

Slew rate As we discussed in the overview, op amps adjust their output voltage in response to a difference in input voltage. We assume that an ideal op amp would be able to adjust its output instantaneously. Unfortunately, due to internal engineering that we will discuss more in Activity 2 (most notably capacitive “compensation” that limits the open loop bandwidth of an op amp), real op amps can only change their output voltage at a finite maximum speed. This limiting speed is known as the slew rate S; and the effect leads to the distortion of sinusoidal signals when the output signal’s peak amplitude 𝐴@ and frequency f satisfy the following inequality:

𝐴@ ≥BCDE

2

In the first part of Activity 1, you will measure the slew rate of your LF356 op and compare it to the values specified in the op amps data sheet. You will then verify (or not) that the inequality expressed in Eq. 2 does capture the onset of distortion of sinusoidal signals through your LF356.

While the data sheet for the LF356 that I provided you does not specify the conditions under which the slew rate was measured (if you see that it does, let me know), a typical procedure is the following:

1. Configure the op amp as a unity follower (Fig. 2a).

2. Apply a square wave to the follower’s input (Fig. 2a).

3. Measure the rise time 𝑡I,JKof the output signal (Fig. 2b).

4. Divide the step height of the input square wave by 𝑡I,JK to calculate the slew rate S. 5. Take measurements of S for various square amplitudes and note any change.

To next measure the onset of sinusoidal signal distortion, follow these steps:

PHY351/651LAB8Page4

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

1. Apply a sinusoidal wave to the input of the follower at a reasonable amplitude, on the order of Volts, so as not to distort the signal due simply to saturation of the op amp’s transistors.

2. Keep the amplitude fixed and then start increasing the frequency f of the input signal until you begun to see noticeable distortion in the output signal – to be more quantitative, rather than look at it just in the time domain, you could use one of your VIs to also look

at the signal in the frequency domain; then look at how the harmonics of the signal change as the frequency is increased.

**For your lab report:

• Derive 𝛽 for the non-inverting amplifier of Fig. 1c.

• Derive (or provide a physical argument for) the relationship captured by Eq. 2.

• Take a screen shot (or provide data in graphical format) for the measurement of the rise time of the follower in response to a square wave.

• Compare the measured slew rate with the slew rate specified in the data sheets for the LF356.

• Provide the value of frequency for which distortion of the sinusoidal signal became noticeable. Compare with what you expect from Eq. 2.

Settling Time The time it takes for an op-amp to get within a specified range of its final value is known as the settling time (Fig. 2b). The effects leading to finite settling time have the same origin as the effects that limit the slew rate, namely the frequency response of the op amp’s internal capacitive compensation circuit (this circuit will have poles in its frequency response that yield oscillatory behavior; it may be helpful here to think in analogy to the response of an underdamped simple harmonic oscillator and the ringing that results when the oscillator is driven by a square wave impulse). One can show (see Horowitz and Hill section 7.07) that the settling time should be

Figure2:(a)MeasurementschematicforActivity1todeterminetheslewratefortheLF356infollowerconfiguration.(b)AdaptedfromHorowitzandHillFig.7.10.Aschematicoftheoutputofanopampinresponsetoaninputvoltagestepillustratingthesettlingtimeandrisetimeoftheoutputresponse.

PHY351/651LAB8Page5

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

proportional to the closed-loop gain𝐴LM of the circuit:

𝑡JK%%NK~(5 − 10) ∙ 𝐴LM/(2𝜋𝑓%) (3),

where 𝑓% is the unity-gain bandwidth (𝑓% = 𝐺𝐵𝑊). It pays to think for a minute about why the settling time might be proportional to the circuit gain. In this second part of Activity 1, you will look at the relationship between settling time and closed-loop gain for the LF356 in non-inverting amplifier configuration. While it would be difficult for you (given the equipment) to perform measurements of the settling time to the accuracy specified in the LF356’s datasheet, you should verify that Eq. 3 hold qualitatively. To get started, follow these steps:

1. Start with the op amp in unity gain configuration and apply a small square wave signal to the input (~ 100 mVpp amplitude). Record the output signal using one of the digital oscilloscopes (either VI or physical). And estimate the settling time to an accuracy that you specify.

2. Then, incrementally increase the closed-loop gain of the amplifier. For instance, you could try 𝐴LM~10, 20, &50. For each case, estimate the settling time.

***For your lab report:

• Provide justification for Eq. 3 for the settling time.

• Discuss your results and whether they are in agreement with the spirit of Eq. 3.

• Provide a screenshot of the output signal response for the unity gain measurement. Indicate how you determined the settling time and what degree of accuracy you chose.

Activity 2 – Frequency Compensation, Op Amp Output Impedance and Op-Amp Instability

During the last lab, I stated that operational amplifiers are engineered to have an approximately fixed gain-bandwidth product (GBW) over a particular range of operating parameters. I should have been more careful: some op amps are engineered in this way; these are called frequency compensated amplifiers. And some are not engineered this way; those are called uncompensated. Figure 3a provides a Bode plot of the open-loop gain for three different commercial amplifiers, one of which is compensated (the OP741), while the other two are uncompensated. The main thing to take away from Fig. 3a is that the gain of a compensated op amp generally rolls off at a constant 20 dB/decade (also equivalent to 6dB/octave) over a large range of signal frequencies in a similar manner to a low-pass RC circuit. Such a roll-off is in fact generally engineered by including additional feedback capacitance in one of the op amp’s internal amplifier stages (See Horowitz and Hill, section 4.34).

Figure 3b provides Bode plots of the open-loop gain and several different values of closed-loop gain for an amplifier similar to the LF356. These were generated using Eq. 1, and they assume a 20 dB/Decade roll-off for the open-loop gain A of the LF356. The main point of Fig. 3b is to illustrate that when the op amp is compensated so that A decreases at 20 dB/decade, the GBW is roughly constant over a large range of frequency and closed-loop gain.

PHY351/651LAB8Page6

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

Aside from providing standardized op amp frequency response (within a family of op amps), the main reason for implementing frequency compensation is to improve op amp stability. By stability, I mean the propensity for an op amp to self-oscillate at a particular frequency. Using frequency compensation, op amps can be made much more stable or less likely to start oscillating in a given frequency range. To understand why this is so and, more generally, to understand under what conditions an op amp becomes unstable, we need to look more closely at feedback in an op amp circuit.

To understand how a circuit like the op amp follower (Fig. 1b) or the non-inverting amplifier (Fig. 1c) can start to self-oscillate, it is helpful to take a look at the generalized op amp circuit in Fig. 4a. In this circuit, you’ll notice that I’ve drawn a cut in the feedback loop. The reason for this is purely to aid our understanding of how such a loop could start oscillating at all. What we want to do is imagine that a signal (𝑉,-) is injected into the inverting terminal and then see (using op amp rules and circuit laws) what the signal looks like when it returns to the inverting input (𝑉,-[ ). Loosely speaking, if the signal 𝑉,-[ 𝑖𝑠 in-phase with 𝑉,-, and, if 𝑉,-[ ≥ 𝑉,-, then the loop is unstable and can start oscillating (the return signal just adds to the input signal indefinitely… or until something blows up).

Mathematically, we can determine the return signal to be

Figure3:(a)TakenfromHorowitzandHill,Figure4.80.Aplotofopen-loopgain𝑨(𝝎)(or𝑨𝒐(𝝎))forthreedifferentcommercialoperationalamplifiers,illustratingthedifferenceinfrequencyresponsebetweencompensatedop-amps(the741)anduncompensatedones(the748and739).(b)Aplotoftheopen-loopvoltagegain(𝜷 = 𝟎)andseveralvaluesofclosed-loopvoltagegain𝑨𝑪𝑳fortheLF-356.Thevaluesofclosed-loopgainare10(𝜷 = 𝟎. 𝟏),100(𝜷 = 𝟎. 𝟎𝟏),1,000(𝜷 = 𝟎. 𝟎𝟎𝟏),and10,000(𝜷 =𝟎. 𝟎𝟎𝟎𝟏).Besuretounderstandtherelationshipbetween𝑨𝑪𝑳and𝜷.Theplotsin(b)weregeneratedusingEquation1,andassumingthefollowing:DCopen-loopgain𝑨(𝟎) = 𝟐×𝟏𝟎𝟓,gain-bandwidthproduct𝑮𝑩𝑾 = 𝟓𝐌𝐇𝐳,anda20dB/decaderoll-offofthecompensatedLF356.

10# 10$ 10% 10&0

20

40

60

80

100

SignalFrequency(Hz)

AmplifierGain(dB)

𝛽 = 0.1

𝛽 = 0.01

𝛽 = 0.001

𝛽 = 0.0001

𝛽 = 0(a) (b)

PHY351/651LAB8Page7

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

𝑉,-[ = −𝛽 𝜔 𝐴 𝜔 𝑉,- + 𝛽 𝜔 𝐴(𝜔)𝑉&, where I’ve noted explicitly the reality of frequency dependence (𝜔) in both the loop transfer function 𝛽 and op amp transfer function (or gain) 𝐴. When the loop is closes, 𝑉′,- = 𝑉,-,and this can be solved to 𝑉,-[ =

1 o / o0&1 o / o

𝑉&. From this expression for 𝑉,-[ you can see mathematically that, in order for an oscillation to be possible, one simply needs 𝛽 𝜔 𝐴 𝜔 to approach -1 at any frequency. You can imagine that such a criterion could be hard to avoid if one does not take care in designing the frequency response of his or her circuit. Hence the reason for engineering frequency-compensated op amps; their gain is

intentionally reduced, with a known roll-off, to reduce the likelihood that the 𝛽 𝜔 &𝐴 𝜔 will conspire to result in an oscillation around whatever feedback loop you create.

Unfortunately, even compensated op amps (like the LF356) can still be coaxed fairly easily into

Figure4:(a)Schematicofgeneralizedopampinnegativefeedbackconfiguration.The“cut”inthefeedbackloopistoaidintheanalysisofthestabilityoftheloop.(b)AnopampfollowerdrivingacapacitiveloadC.Circuitincludesthefiniteoutputimpedance𝑹𝒐oftheopamp.ThiscircuitispronetooscillatewhenCislargebecauseofthelargephaseshiftthatresultsfromtheRCcircuitformedby𝑹𝒐andC.

PHY351/651LAB8Page8

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

instability. A great example of this is when one tries to use a simple unity follower to drive a capacitive load (Fig. 4b). For the ideal unity follower, 𝛽 = 1 (all of the signal is fed back to the inverting input). But, this is no longer the case for a real op amp, in which case you must consider the effect of its finite output impedance (for reference, the output resistance of the LF356 is 𝑅q~50Ω ). Including the capacitive load, one finds for this case that 𝛽 = 0

(0&,o5sL).

The output resistance of the op amp and the capacitive load thus form an RC circuit that will shift the phase of any signal that comes out of the op amp. More importantly, for signal frequencies 𝜔 ≫ 1/𝑅"𝐶, the phase shift of the signal will be -𝜋/2! Combined with the RC-like roll off of 𝐴(𝜔), which also gives a phase shift of -𝜋/2, 𝛽 𝜔 and𝐴 𝜔 will conspire to give your signal a −𝜋 shift over a large frequency range. The follower thus will oscillate at its unity gain frequency ( 𝛽 𝜔 𝐴 𝜔 = 1).

To make a long story short, in the lab activity, you will make a unity-gain op amp follower oscillate by using it to drive a capacitive load. To proceed it might be helpful to follow these steps:

1. Construct the circuit in Fig. 4b. Choose a capacitor of any value you like. But keep in mind that you are going to want a −𝜋/2 phase shift from the RC circuit at a reasonable low frequency (within the bandwidth of the circuit and within your measurement circuit’s sampling time).

2. Ground the non-inverting input (+).

3. Measure the output voltage from your circuit (𝑉"$%[ ) to look for self-oscillations of the circuit. It is up to you to decide which instrument or VI to use to make this measurement. Hint: Using an oscilloscope might not be the easiest way.

4. If for your initial capacitor value you don’t see oscillations, then try different values until you see it start to oscillate.

5. Once you see it oscillating, you can try implementing a simple remedy to stop the oscillations: insert a small resistance between the capacitive load and the feedback loop to decouple the capacitive load from the loop.

*For Your Lab Report:

• Provide a screen shot of the self-oscillating circuit. Be sure to specify the frequency at which the oscillations occur and what value of capacitive load you chose. Discuss whether the frequency you observe makes sense based up on your choice of capacitance and what you know about the output impedance of the op-amp (and its frequency response).

• Discuss whether the implementation of a decoupling resistor helps eliminate the oscillations.

• Show that 𝛽 = 0(0&,o5sL)

for a capacitively-loaded op amp follower when you include the output resistance of the op amp.

PHY351/651LAB8Page9

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

Activity 3 – The Op Amp Comparator

Comparators, like the one in Fig. 5a, are used in many different applications – essentially whenever you want to know whether one signal is bigger than other - from analog-to-digital conversion to waveform generation to systems monitoring. In this activity, you will build the simple op-amp comparator in Fig.5a and look at one of its weaknesses. And, in Activity 4, you

will have the opportunity to improve upon this design by implementing a Schmitt trigger, Fig. 5b. It’s worth pointing out at this point that these are the first op amp circuits that you’ve worked with that do not involve the use of negative feedback. What consequences do you think that this has?

The circuit in Fig. 5a should look familiar from your latest reading assignment. Thus before you start this activity, if you and your lab partners aren’t sure how it works, go back to the reading assignment and work together to understand its operation. Once you are confident you understand the operation, you should then design your circuit (i.e. choose the values of 𝑅0and 𝑅C) so that the light-emitting diode (LED) at the output of the op amp lights up whenever 𝑉,- >6𝑉.

Once you have gotten your simple threshold detector to work, it’s time to explore one of the weaknesses of this circuit. To do this, set your input voltage so that 𝑉,- = 6𝑉. Next, apply on top of this DC off-set, a small sinusoidal signal at a frequency that your eye can track (like 5 Hz).

(a) (b)

Figure5:(a)Op-ampbasedcomparator.Circuitisarrangedsothatif𝑽𝒊𝒏 >𝑽&,thentheLEDconductsandemitsredlight.Thiscircuitsuffersfromtheproblemofundergoingmultipletransitionsnearthevoltagethresholdduetothepresenceofnoise.(b)However,bytheadditionofpositivefeedbackthroughtheso-calledSchmitttriggerconfiguration,thecircuitbecomeshystereticsothatthepositivetransition(LEDturningon)occursatadifferent𝑽𝒊𝒏thanthenegativetransition(LEDturningoff).

PHY351/651LAB8Page10

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

What you should see is that the diode turns on and off at the signal frequency. Try tuning 𝑉,- away from the threshold, and then increase the sinusoidal signal amplitude. You should see the same type of bouncing behavior.

While the experiment you just did is highly contrived, you can imagine that the bouncing behavior that you observed could present serious problems for the use of your comparator in the presence of noise. (For example, if you are relying upon your comparator to monitor the signal

from some diagnostic sensor and warn you when a particular unsafe operating condition is reached, you definitely do not want the comparator output bouncing around due to the presence of noise. Or if you are trying to detect very precisely the moment a sensor output exceeded a threshold, the presence of noise could result in multiple transitions through the threshold greatly reducing your ability to resolve the timing of the event.)

***One thing to keep in mind: When you apply the AC signal to bounce the comparator, be sure to decouple the AC source from the DC source. If you questions about how to do this, ask the instructor. ***

***Also, while it probably doesn’t need to be said at this point, you should choose your resistors so as not to overload the power supply that you use (and also be careful not to overload your resistors).

***For Your Lab Report:

• Discuss the operation of the op amp comparator in Fig. 5a.

• List the values of 𝑅0and 𝑅C that you chose and discuss why you chose them.

• Discuss how well your circuit worked – e.g. Did the LED light above 6V input? What amplitudes for the input AC signal did you use to bounce the comparator? Etc.

Figure6:FromHorowitzandHill,Figure4.63,anillustrationofthehysterersisintheoutputresponseofacomparatorwithaSchmitttrigger.Whentheinputvoltageexceeds5.0V,theoutputgoeslow(0V)andremainsthereuntiltheinputdropsbelow4.76V,atwhichpointtheoutputincreasesto5V.

PHY351/651LAB8Page11

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

Activity 4 – The Schmitt Trigger Fortunately, the bouncy comparator that you encountered in Activity 3 can be remedied in a fairly easy manner using what is known as the Schmitt trigger (Fig. 5b). As you should have read, the Schmitt trigger uses positive feedback to generate hysteresis (Fig. 6) in the comparator’s response. Essentially, because of the positive feedback, the threshold for the comparator to switch depends upon which state the circuit is in (the output of the circuit thus depends both on the input of the circuit and on the recent value of the output!). Thus the input voltage at which the circuit switches back to the low state (for example, the LED turns off) is different than the input voltage for the circuit to switch to the high state (LED turned on). As a result of two different thresholds, the presence of noise is less likely to cause bounce between the two states. If this isn’t clear, take a look at Fig. 6 for a minute and discuss with your lab partners. For this activity, construct the circuit in Fig. 5b. Choose the resistors so that the LED turns on when 𝑉,- rises above ~6 V and it turns off when 𝑉,- drops below ~4 V. You will probably need to change the values of 𝑅0 and 𝑅C in addition to choosing a value of 𝑅}.

Note: If you have trouble getting the LED to light (and turn off) when you expect it to, remove the LED and first measure the output voltages and the thresholds for the transitions.

***For your Lab Report:

• List the values of resistance that you chose for implementing the Schmitt trigger. And discuss why you chose these values – you should try to provide quantitative analysis of the op amp circuit. If you get stuck, you can quickly find the analysis online. If you take this route, be sure to cite your source.

• Discuss how well your circuit worked.

Activity 5 - Waveform Shaping with the Schmitt Trigger In addition to using a comparator with Schmitt trigger for threshold detection, one can use these circuits for the shaping of waveforms, specifically turning an analog sine wave into a series of square pulses. In this activity, you will construct the circuit of Figure 7a, using the LM311N voltage comparator to convert sinusoidal input signals into 5V peak square waves. As shown in Fig. 7a, one of the nice things about the LM311N is that it can be operated off of a single supply of 5V and thus is compatible with TTL circuits.

***For Your Lab Report:

• Provide a discussion of the circuit in Fig. 7a.

• Explore a range of input signal amplitudes and frequencies. Discuss these results in your write up, and show several representative screen-shots of the sine-wave to square-wave conversion.

Activity 6 – The Relaxation Square-Wave Oscillator

As you probably know, oscillators play an important role in many applications, from time-keeping and frequency-tracking to use in signal generators and analyzers. While the topic of engineering oscillators would constitute a course in itself (or, more likely, multiple courses), we can get a basic understanding of how one might work by considering a common type of

PHY351/651LAB8Page12

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

oscillator, namely the relaxation oscillator. In this activity, you will design and build an op-amp-based relaxation oscillator and characterize its operation. While most relaxation oscillators these days are not built with individual op amps (many are actually built using an IC called the 555 timer), the exercise should prove instructive, giving you additional experience in

building/analyzing op amps circuits and understanding how to design a basic oscillating system.

The relaxation operator that you will build is shown in Fig. 7b. This circuit essentially uses a Schmitt trigger to provide positive feedback to the op amp in order to create a hysteretic response that results in the charging and discharging of an appropriately connected RC circuit. Let’s work through the steps of how this might work.

1. First, imagine that when you power up the circuit in Fig. 7b, 𝑉& > 𝑉' (it could just as likely be the other way around, but that wouldn’t change how the circuit operates). This

LM311N5V

LF356

(a)

(b)

𝑅"𝑅#

Figure7:AdaptedfromDiefenderferFigures10.3and10.14.(a)ASchmitttriggerusedasasine-wavetosquare-waveconverter.(b)Arelaxationoscillatorbaseduponanop-ampinacomparatorconfigurationwithSchmitttrigger.

PHY351/651LAB8Page13

PHY351/651 OPERATIONALAMPLIFIERSII-LAB8

imbalance would cause the op amp output to saturate at ~𝑉&& (the supply voltage).

2. This would then cause the capacitor C to start charging up with its voltage increasing as 𝑉L = 𝑉&&(1 − 𝑒'%/5L); additionally, through the feedback loop, it would cause the non-inverting input to take the value 𝑉& =

5756&57

𝑉&&.

3. Once the capacitor charged up so that 𝑉L =57

56&57𝑉&&, the output would then swing

negative to -15V. This would cause the capacitor to start discharging, with voltage decreasing as 𝑉L = −𝑉&&(1 − 𝑒'%/5L) +

5756&57

𝑉&&𝑒'%/5L . As well, the non-inverting

input voltage would change through the feedback loop to 𝑉& = − 5756&57

𝑉&&.

4. Once the capacitor discharged so that 𝑉L = − 5756&57

𝑉&&, the output would swing positive again to 𝑉&&, and then the whole cycle would repeat indefinitely. One can show that the result would be a square wave with period given by

𝑇 = 2𝑅𝐶 ln 56&C5756

(4).

For this activity, build the circuit in Fig. 7b. Choose the values of resistance and capacitance to produce a square wave at a frequency of your choice. (To give you an example, I chose 𝑅C =2𝑅0 = 2𝑅 = 2𝑘Ω, and 𝐶 = 3.3𝜇𝐹.) If you have time, try a range of parameters and see how the output looks in both the time domain and the frequency domain.

**For Your Lab Report:

• Include a screen shot of the square-wave oscillations in the time domain (and, if you want, in the frequency domain).

• Discuss how the period of the oscillations compares with what you expect from Eq. 4.

• For PHY 651 students, derive Eq. 4. If you get stuck, you can find the analysis online. (Cite your source.)

• For everyone, think about and answer the following question: What initiates the oscillations of a self-oscillating system (You can answer this in the context of the oscillating circuits that you looked at this in lab. Or you can discuss the phenomenon more generally.)