Quantcast
Channel: op amp – Gas station without pumps
Viewing all articles
Browse latest Browse all 68

Thirteenth day of circuit class and first op-amp lab

$
0
0

If you’re wondering what happened to the 12th day of circuits class, that was discussed in Quiz too long and too hard. On Wednesday, I did some do-now problems to check on some basics and to provide a hook for the day’s topics.  I asked for the voltage gain (Vout/Vin) for the following circuits:

First question: a voltage divider they are familiar with, and which almost everyone got right.

First question: a voltage divider they are familiar with, and which almost everyone got right.

do-now-2-2013-feb-6

A different voltage divider circuit, stressing the fact that voltage is between two points. Only about half the class got this, because I had not given enough examples of voltages other than to ground. Students who had the correct answer had two different ways of getting there: starting from Ohm’s Law, or simple proportional reasoning. I pointed out that a third way would be to compute the voltages of the two voltmeter leads using the voltage divider formula.

do-now-3-2013-feb-6

A reminder of the one op-amp circuit they’d seen (last Friday). Only about half the class remembered this one, so I did another derivation of it using a finite-gain amplifier instead of an ∞-gain op amp, showing what happens as gain goes to infinity. I think that I should do more of that, since many of the students are uncomfortable with infinity.

do-now-4-2103-feb-6

A hook for the main material of the day: non-inverting amplifiers. Only one student correctly guessed the gain of this circuit (one of the top students in the class—I think he “cheats” by reading the assignments when they are assigned to be read—I wish more students would do that).

After reviewing the unity-gain buffer, but before getting into the non-inverting amplifiers, I made a digression into what would happen if we swapped the two inputs to the unity-gain buffer.  Doing the algebra for the gain computation with a finite-gain amplifier and taking the limit, we again get a solution where the output voltage is equal to the input voltage.  I then stepped them through what would happen if there was a small perturbation in the input, which does not result in the amplifier settling down to the new value, but keeps getting bigger until the output slams into one of the power rails.  I used this to discuss positive feedback and the difference between a stable and an unstable design, but did not give them any tools for analyzing stability other than hand-simulating what happens if you add a small perturbation to the input.

Finally I got to the non-inverting amplifier, and stepped them through the reasoning behind the gain computation.  I think most of them followed it, though some are still disturbed that the voltage divider in the circuit has “Vout” and “Vin” labels reversed from how they are used to thinking of voltage dividers.  I have to wean the students away from the notion that formulas contain sacred variable names, and into thinking about them as having slots that get filled according to context.  That is, I have to have them attach semantics to the formulas, rather than relying on name-based pattern matching.

I was originally going to do inverting amplifiers as well, but I think I’ll leave those until next week.  I also decided not to have the students try to do a single-supply design for their first op-amp lab, but to use a dual-supply design, which is a little simpler conceptually.  I’ll have to rewrite the lab handout for next year, as I had originally planned to do a single-power-supply design.  I realize now that is too ambitious for the first op-amp assignment.  There was a mention in the lab handout of a DC-blocking capacitor on the output, but that is not needed in the dual-supply design, so just confused a couple of the students.

After the non-inverting op amp, I introduced them to the notion of block diagrams, and together we developed the following block diagram:

Block diagram for audio amp

Block diagram for audio amp

We didn’t do it all at once, of course, and it took some prompting to get the various parts all there. We started easily enough with the microphone and the loudspeaker, then added the amplifier. I had to prompt them a bit to remember that the microphone was best thought of as having a current output, but that the amplifiers we knew how to design were voltage amplifiers. Since their second lab converted the microphone current to a voltage, they got the I-to-V converter pretty quickly. We tried to guesstimate the gain needed by saying we wanted the loudspeaker to swing rail to rail (±3V) on a loud input, and I asked the students what they had measured on lab 2 as the AC voltage swing. A couple of students had something in their lab notebooks. I pointed out (again) the value of keeping good lab notebooks, since you never know what detail you might need later on. We used one of the estimates to pick a gain of about 50 for the amplifier.

I then pointed out a problem: the I-to-V converter they used in Lab 2 had a 1V DC offset, and if they put that into the amplifier, they would pin the output at the upper power rail, since it couldn’t go to 50V. After a bit of reminder that DC was a frequency of 0Hz, they came up with the need for a high-pass filter, and could even remember the voltage divider circuit to get it. But figuring out the corner frequency stumped them, because none of them remembered the frequencies of human hearing. Eventually someone came up with 20Hz to 20kHz, which goes a bit higher than humans hear, but is a typical stereo specification. We only cared about the low-frequency end anyway. I pointed out that knowing what sort of signal one was dealing with was an essential part of the design process, and one of the first questions they should ask when doing a design. They eventually settled on 10Hz as a reasonable corner frequency, though anything between 1Hz and 30Hz would probably do, given that their speakers have very poor bass response anyway (they are very fine 10W speakers for about $1 each, but they are still small speakers).

I think that I’ll continue to have the development of the block diagram as an in-class discussion (not try to put it into the lab handouts), so that the students can develop it themselves with guidance from me, rather than being handed it.  This decomposition of a design problem into smaller easily solved problems is one of the essential parts of engineering, and most of the bioengineering students have not had much experience with it.

I ordered them to pair up right away and come to lab with designs already done and ready to implement and debug. I think that too many of them have been under-prepared for labs, having just looked over the lab handouts the night before. From now on, I’m going to make sure they do some serious work on each lab before they touch wire to breadboard on it. (This will be particularly important on the last two labs, where they’ll be soldering the instrumentation amplifiers—unsoldering components is no fun at all.)

Today’s lab went great! Everyone got a working audio amplifier (generally with a gain of 40× or 50×), and could see the gain on a dual-trace oscilloscope (superimposing the signals at the mic and the output with different volts/division setting, which was particularly satisfying for showing the gain of 50).  They also observed clipping of the output with loud input signals, and the inability of the op amp to drive the 8Ω load of the loudspeaker all the way (it has only a ±23mA output capability).  I reassured them that we would design an amplifier later in the quarter capable of delivering loud sounds.

A few students came in with non-functional designs, but they were all quite close, and a few minutes of discussion at the whiteboard about how the resistors for the non-inverting amplifiers needed to be designed got them back on the right track when the circuits they built failed. I refused to look at designs until they had wired them up—I’m making “Try it and see!” the mantra for the class.  Perhaps we should put it on the t-shirts.

Some students also had a little trouble converting their schematics to wires on the board, but a little debugging and tracing wires was enough for me to point out discrepancies between what they showed me in the schematic and what I saw on the breadboard.  This was enough to get them back on track without my having to touch their boards.

I thought that this lab would be one of the toughest ones so far, but it turned out be the smoothest sailing.  Everyone finished on time with working circuits demoed!  Perhaps the op amps are not as hard as I expected for them, perhaps the design assignment the day before left them more prepared, perhaps they’re beginning to get the hang of things now after a somewhat rocky start.  Whatever the reason, I was really proud of what they managed to do today.  This is only lab 5 for them, and they are already doing more in the lab than the EE 101 students achieve by the end of the quarter!

Next week they’ll do a “tinkering” lab without a clearly specified objective, but with some strong constraints. In the course of the lab, they’ll learn about phototransistors (though not all the characteristics of them) and FETs as switches.  The lab is very thrifty, making use of the hysteresis oscillator board that they soldered up for the capacitance-touch sensor as a component without modifying what is on the board. They’ll also learn about a different style of engineering: tinkering, where one plays around with stuff to see what can be done.  I don’t think that most of them have had much opportunity to tinker in the past, and it is an excellent way to develop the mental models that allow one to reason about circuits without tedious calculations.  (Some calculations may still be needed, of course.)  Some of them may get frustrated with the  somewhat undirected nature of the play, I’ll undoubtedly get a headache from loud squealing of loudspeakers at high frequencies, and someone may burn a finger on an overheating FET, but I think that next week’s lab may be the most fun one of the quarter, and it should prepare them well for the class-D power amplifier later in the quarter.

Tomorrow I’ll start on group-work quiz corrections (the last student is taking the quiz in the morning), and have them try to finish the quiz corrections over the weekend. If the quiz corrections are problematic still, we’ll use Monday for more group work on them and possibly some Socratic lectures (they’ve had all the material they need—they just need some guidance on how to apply it).

More likely, on Monday we’ll do some work on gnuplot, so that students who need to redo one of the labs that involve model fitting will have a better handle on what they are doing.  If we do that, I’ll ask students to bring in their laptops, so that they can do some interactive work on gnuplot scripting.  I thought that the first script I gave them would be sufficient example, but I didn’t realize at the time the difficulty they would have in generalizing the example, so I’ll step them through a worked example, with them gradually building a script that does what they need. I hope to be able to address the scope-of-variables problem that I think is tripping some of them up, as well as detecting other conceptual stumbling blocks.

Although I started this week very depressed about the quiz results and having sleepless nights worrying about how to modify my teaching to get the concepts across, I’m now feeling very positive about the class.  The op amp lab went great, and I see ways that I think have a very good chance of getting the students comfortable with the material.  In about two weeks, I’ll give them another quiz (similar to the one that was so painful for everyone on Monday, with perhaps a couple of op amp questions), with the reasonable expectation that they’ll be able to nail it.


Filed under: Circuits course Tagged: audio amplifier, circuits, electret microphone, engineer, high-pass filter, op amp, oscilloscope, teaching, unity-gain buffer

Viewing all articles
Browse latest Browse all 68

Trending Articles