Oscillators

The questions below are due on Friday April 05, 2024; 05:00:00 PM.
 
You are not logged in.

Please Log In for full access to the web site.
Note that this link will take you to an external site (https://shimmer.mit.edu) to authenticate, and then you will be redirected back to this page.

So far when we've seen op-amps in lab, we've been running them in negative feedback. Today, though, we'll take a look at some different ways we can use op-amps without negative feedback, and we'll end with a neat little application of one of these circuits.

1) A First Circuit

For our first circuit of the day, we'll take a look at the following topology (remember that the symbol that looks like a resistor with an arrow pointing into it represents a potentiometer):

Go ahead and lay this out on the breadboard (use one of the little 30-row breadboards today). The particular value of R is up to you, but something between in the tens of kiloOhms is probably reasonable.

DO NOT BEND THE LEGS OF THE POTENTIOMETER!!!! IT SHOULD FIT INTO ONE SIDE OF THE BREADBOARD WITHOUT BENDING THE LEGS AT ALL.

For the op-amp, we're going to use a different package than before. We used the L272 op-amps when powering the motors because those op-amps were designed to be able to source a lot of current (which the motors needed in order to spin). For today, though, we don't particularly need a lot of current. As such, we'll use a different op-amp: a TL082. Like the L272's, there are two op-amps in each TL082 package; but be really careful, because this chip has a different pin layout than the L272's do. The pinout for the TL082s is shown here (and clicking it will open a copy in a new tab):

Like with the other op-amps, a small dot on the surface of the chip marks pin 1. For any of these that you use, make sure to connect V_{\rm CC+} (pin 8) to the "+" terminal of the 9V battery and V_{\rm CC-} (pin 4) to the "-" terminal of the battery.

Note that the packages are labeled with "TL082" so you can tell that you've got the right component. And these packages should fit nicely right across the gap in the middle of the breadboard, like so:

Hook up your scope probes to measure v_+, v_-, and v_{\rm out}. Zoom in and out and slide the signals around until you can clearly see all three signals, on the same scale and with the same reference voltage (i.e., we want to see all three of these signals on the same axes).

Try turning the pot. How do v_+, v_-, and v_{\rm out} change as you do so? What kind of function is this circuit performing? How can we think about this behavior in terms of our op-amp models?

Checkoff 1:
Discuss the results of your experiments so far with a staff member. Demonstrate your working circuit and explain its function.

2) Oscillator

Even though we're going to tear apart that circuit in just a few minutes and replace it with something else, let's make a solemn promise never to forget the lessons we've learned from it (they'll be important for the later parts of the lab).

The next circuit we'll look at today is a neat little circuit that generates an oscillatory signal from a constant ("DC") input (this circuit should look familiar from Tuesday's lecture). When we actually get to building this, we'll again power everything from a single 9V battery. But for now, let's just think about the circuit in theory land.

Check Yourself 1:
How can we make ourselves a stable 4.5V value (relative to the - terminal of the battery) to connect up in the circuit above? What additional components would we need in order to be able to do that?

2.1) A Slight Shift of Perspective

As we've seen throughout the subject, because voltages are differential measurements, we have our choice of what we consider to be our 0-Volt reference node when solving circuits. In the example above, we (somewhat arbitrarily) chose the negative terminal of the battery to be our 0-Volt reference. But that's not the only choice we could have made.

Let's imagine we had instead chosen the + terminal of the battery as our reference. In that case, our circuit would look like the following:

With this change, what would values would v_a, v_b, and v_c need to have in order to be consistent with our original drawing?

  

  

  

Let's imagine we had instead chosen the middle voltage (halfway between the + and - terminals of the battery) to be our 0V reference. In that case, our circuit would look like the following:

With this change, what would values would v_a, v_b, and v_c need to have in order to be consistent with our original drawing?

  

  

  

2.2) Analyzing the Circuit

For the rest of the lab, we're going to take this last viewpoint, choosing the midpoint between the + and - terminals of the battery to be our 0V reference voltage.

Now let's turn our attention to analyzing the circuit. We'll spoil a bit of the surprise by describing the end-to-end behavior of the circuit: if we've chosen our reference voltage as described above, then after letting the circuit run for a little while, the output voltage v_{\rm OUT} will settle in to a steady-state behavior of alternating between \pm4.5V (relative to that reference point) at a fixed frequency, like so:

Let's try to dig a little bit deeper and think about why the circuit behaves this way. The questions below are intended to help guide you through that process.

When v_{\rm OUT} = +4.5{\rm V}, what is v_+ (the voltage at the + input of the op-amp), in Volts?
v_+ (in Volts) =~

When v_{\rm OUT} = -4.5{\rm V}, what is v_+ (the voltage at the + input of the op-amp), in Volts?
v_+ (in Volts) =~

Check Yourself 2:
Thinking back to the first circuit we looked at, how must v_+ and v_- be related to each other when the output v_{\rm OUT}=4.5{\rm V}?

How must they be related to each other when v_{\rm OUT}=-4.5{\rm V}?

At some point, v_{\rm OUT} will switch between these two values. In the instant where that switch occurs, how must v_+ and v_- be related to each other?

Check Yourself 3:
Sketch out a graph of v_{\rm OUT}, v_+, and v_- as functions of time, all on the same axes, assuming that the circuit has already reached its steady state (oscillating with a fixed frequency).

If you're having trouble or want someone to double-check your thought process, let us know.

Using your graph, what is the period of oscillation of the circuit, in terms of C, R_1, R_2, and any other constants you may need? You may use exp(x) or e**x to represent e^x, and ln(x) to represent \ln(x).

T =~

2.3) Tuning the Oscillator

Now let's (finally) go ahead and build it. In a second, we're going to use the output of this circuit to drive an LED to make it blink at a fixed rate. But before we get to adding the LED, let's choose appropriate values of R_1, R_2, and C.

Let's say we want the LED to blink at 5Hz. Pick values of R_1 and C to make that happen. Choose values that make your frequency be within 5% of 5Hz.

R_1 =~

C =~

Go ahead and build this using the values you chose above. Use the scope to measure v_+, v_-, and v_{\rm OUT} all relative to the spot we're calling 0V in the diagram from above. Put everything on the same scale and with their grounds at the same point so that you can compare them easily.

One you're sure it's working as expected, let's use it to drive an LED. Grab yourself an LED and a small-ish resistor (maybe around 200\Omega), and connect those up in series, between the op-amp's output and our 0V reference point (not the - terminal of the 9V battery).

Use the scope to verify that it's flashing at around 5Hz.

Checkoff 2:
Demonstrate your working circuit to a staff member, and talk through your analysis of the circuit. How do your theoretical results compare against what you see on the scope, and how do those results explain the operation of the circuit?

3) Optical Theremin

For our last experiment of the day, we'll tweak our circuit a little bit to make ourselves a little musical instrument. Our instrument will be a (dramatically-simplified) variant of a theremin, which is a musical instrument that you play without touching it. Real theremins work by using antennas to measure changes in capacitance as a performer moves their hands around, effectively measuring the position of their hands in the air and using that to control pitch and volume of an output wave.

We'll do something substantially simpler than a real theremin, but it will still be a neat little instrument that we can play by moving our hands around in the air. Our little "theremin" will work by using a photoresistor to detect changes in light as we move our hand closer or farther from it.

Replace R_1 in your circuit with a photoresistor, and choose a value of C such that the frequency in ambient light will be about 400Hz. Do this with theory, not by just trying stuff until something works (we'll expect you to be able to talk about your process during the checkoff).

Use the scope to measure the output wave as you move your hand up and down above the photoresistor. You should see its frequency change.

Then, instead of our 200\Omega resistor and LED from before, we're now going to use the op-amp to drive a speaker. When you've done this, you should hear a sound, and the pitch should change as you move your hand nearer or closer to the photoresistor.

You should also connect a button in series with your battery (between the battery and your circuit) so that the circuit is only powered—and thus, sound only plays—when the button is pressed.

Try playing a little tune with your theremin, and then you're ready for the checkoff!

Checkoff 3:
Show your working circuit to a staff member and maybe like talk about how you chose the capacitance. Describe the principles of operation here, and why the pitch changes as you move your hand around the photoresistor.

You can keep your little theremin if you want (including the battery and the speaker and everything).

If you don't want to keep it, you can throw away any fixed resistors and capacitors and return everything else to the cart.