Gas station without pumps

2015 May 5

First op-amp lab was quick

Filed under: Circuits course — gasstationwithoutpumps @ 21:12
Tags: , , , ,

On Monday I provided a little feedback on the design reports for the electrode lab.  The big issues were

  • Students not reporting the models they were fitting to the data.
  • Students not reporting the parameters of the fits after doing the fitting.
  • Students choosing overly complicated models (like R+(R||C) for data showing constant impedance)
  • Students not modeling important phenomena (like the (R||C) input impedance of the voltmeters)

Little issues included

  • Using “due to the fact that” rather than “because”
  • Omitting leading zeros before a decimal point.  Numbers should never start with punctuation.

After that brief intro, I worked with the students to develop a block diagram for an audio amplifier using the electret microphone and loudspeaker that they had already characterized.  This had been part of their homework, but I expected them not to have really grasped the point of a block diagram.

Another thing I went over in class, because I’d seen problems with it in previous reports and prelabs ,was reminding students that V=IR is not a ritual magic incantation. Reciting it doesn’t make solutions to problems right, if it is just randomly applied.  I reminded them that the voltage has to be across the resistor that the current is through—picking random voltages or currents in the circuit is meaningless.  I showed them an example taken from the prelab they were turning in at the end of class.

When I did the grading for the prelab homework Monday night, I saw that many of the students managed to copy the block diagram we had done in class, but none had appropriately labeled the signals between the blocks.  I think I need to provide some more and better examples in the book.  (Ah, I see I already have marginal notes to myself to add a couple in Chapter 2.)

The V=IR error was very common, mostly with V was taken to be the power supply voltage, rather than the voltage across the resistor that biases the microphone.

Students also had a lot of trouble with computing the AC voltage of the signal out of the microphone, based on the loudness of the sound input and the sensitivity of the microphone. I knew this was a difficult assignment, but I thought that it would be relatively easy, because they had supposedly already created a worksheet for themselves as part of Lab 4 (the microphone lab).  Either they forgot everything they learned there, or they never really got the idea of the worksheet they created.  One student asked in class on Monday, quite reasonably, for a worked example.  I’m going to have to come up with one that doesn’t just do all the work for them—I know these students can fill out worksheets, but what I need to get them to do is to solve problems when the steps aren’t all set out for them.

The afternoon lab section (many of them working together) did much better on the prelab than the morning section—the difference between the sections has been noticeable from the beginning, but it seems to be getting bigger, not smaller.  For some reason the descaffolding is working better with the smaller section.  Individuals in the morning lab are doing quite well, but there are more floundering students in that section, and I don’t know how to get them back on track.

Even though the morning lab is struggling more than the afternoon lab, I think that both are doing better than previous year’s classes at this point of the quarter.  With only one or two exceptions, everyone in both lab sections got their op amp circuit designed, wired, and demonstrated within the 3-hour class period.  That means that Thursday’s lab can be a tinkering lab for most of the students, where they can try various ways of improving the design:

  • Switching from a symmetric dual power supply to a single power supply.
  • Paralleling two op-amp chips to get twice the current capability.
  • Adding a potentiometer for variable gain.
  • Adding a unity-gain buffer to separate the loudspeaker driver from the gain amplifier.
  • Adding a tone-control circuit, like the Baxandall tone control on http://www.learnabout-electronics.org/Amplifiers/amplifiers42.  They can’t use exactly that circuit, as they have only 10kΩ potentiometers, not 100kΩ ones.  The idea can be adapted, or the students could do simple treble-cut or bass-cut circuits.
  • Using a loudspeaker as a microphone. I think that should work, as I get about a 500µV signal from my loudspeaker when I talk into it.  The don’t need any DC bias for the loudspeaker mic, and they may even be able to eliminate their high-pass filter, as the loudspeaker mic can be set up to have its output already centered at 0V.

I’ll talk about some of these possibilities in class tomorrow (plus stroking the students a bit about getting the lab done quickly). I attribute he good performance on the lab to them having put in more time on the prelabs, even if they didn’t get the answers to the questions exactly right.  Thinking about the design ahead of time (and getting a little feedback) goes a long way toward clearing up confusion they have had.

There are 4 more amplifier labs coming:

  • Instrumentation amps with a strain-gauge pressure sensor (measuring breath pressure and blood pressure using an arm cuff).  Will need to be 2-stage, since the INA126PA chips we are using aren’t rail-to-rail amplifiers.
  • Transimpedance amplifier fora photodiode to measure pulse.  This will also need to be multistage, since the first stage will have to have limited gain to avoid saturation.  After high-pass filtering much more gain will be needed.
  • Class-D power amplifier.  This is always the toughest lab of the year.  Even small mistakes can result in shoot-through current that gets the FETs hot enough to melt the breadboards (I have two breadboards that I’ve melted holes in).
  • EKG using only op amps (making their own 2-op-amp instrumentation amp, plus high-pass filtering and a second gain stage.  They’ll be using all 4 of the op amps in the quad op amp package for this amplifier.

I’m about a week behind on grading redone assignments—weekends are spent grading design reports, Monday nights grading prelabs, weekends plus Tuesdays adding to the book a chapter ahead of the students, and I squeeze in the redone assignments Wednesday or Thursday night, if I don’t crash too early.

2015 April 16

Microphone labs went OK

Filed under: Circuits course — gasstationwithoutpumps @ 21:19
Tags: , , ,

The microphone labs this week went OK (much better in the afternoon session than the morning session).  On Tuesday the students collected data for an I-vs-V plot of the electret microphone, both using a power supply and a pair of voltmeters and using just the PteroDAQ system on the KL25Z board (see New modeling lab for electret microphone for the basics of the PteroDAQ portion of the lab).  Most groups got all the data they needed on Tuesday, but some were still struggling with it on Thursday.

On Wednesday, I went over the model fitting in gnuplot used to produce the fits for the 4 models I gave them: linear resistance, constant current, a “blended model” that is asymptotically the same but switches smoothly between them, and one that adds one more parameter to get a slope for the saturation region(again, see New modeling lab for electret microphone for the models) .  Some students in the class asked for a copy of the script I developed in class, but I turned them down—the goal is to get them to develop their own scripts, and they had examples of most of what I did from the previous week’s class, which included a worked example.

In previous years, I used to give out all the things developed in class as worked examples, but I’ve stopped doing that, because far too many students just blindly copied and ran scripts without understanding them (often not even changing the parameter values that were different between what I did in the example and the data they collected).  One point of this class is to get students to stop thinking of class work as ritual magic that just requires doing the right memorized or copied procedure, and to get them to think in terms of creating new stuff from building blocks that they understand. It is unfortunate that most of the chemistry and physics labs they have had are exactly that sort of ritual magic, with a worksheet telling them exactly what steps to perform and what results to fill in the blanks with.

They need to learn to generalize from worked examples, read documentation, and figure out how to make things work. I’m always happy to help them debug their efforts, but not to do the work for them.  I’m not in the class to get right answers from the students, but to get them to learn how to design and debug—to ask their own questions and figure out how to answer them. (See Answer getting for more on what change I’m trying to invoke.)  Some of the top students are already on board with the concept and are working hard to understand electronics, modeling, graphing, debugging, and so forth , but a number of the students are still stuck in the “tell me exactly what to memorize and what steps to do” state that seems characteristic of many high school students.  The biology classes they’ve had have not done much to move them away from that—there is far too much memorization without understanding going on in the bio courses.

In addition to the model fitting, I answered questions from the homework—mainly about the calculation of the output voltage from the mic for a given input sound level. I reviewed decibels again and went through the various scaling operations needed to get the output in µV RMS from sound pressure level.  I think that the top students got it, but I’m also pretty sure I lost the bottom ones—it’s a little hard to tell as they all work so hard on looking intelligent that I have a hard time telling when they are lost and when they are bored because I’m going too slow.

Today’s lab was a little bit of design (choosing a load resistor based on the I-vs-V curve, and designing a high-pass filter to block the DC) and practice using the oscilloscope. I did something different this year, having them design their high-pass filter with the input impedance of the oscilloscope as the “R” of the RC filter. In part this was to get them to realize that connecting a test instrument like an oscilloscope or voltmeter always changes the circuit that is being tested.  I even had them design around the 10MΩ input impedance of the 10× scope probe—so the 10MΩ impedance was not “almost infinite” the way many intro electronics courses teach it.  I don’t think I made a clear enough point of this message—neither in the book nor in the lab sections, so I’d better mention it in class tomorrow also.

Unfortunately, some of the material from the old lab (where they used bigger capacitors and smaller resistors for the high-pass filter) was not edited out in making the changes, so the lab chapter was rather confusing.  I’ve left some notes to myself to update the chapter, but I probably won’t have time until this summer.

2015 April 13

Too much prelab homework for microphone lab

Filed under: Circuits course — gasstationwithoutpumps @ 22:54
Tags: , ,

In putting together the book for this quarter, I added exercises to some of the chapters, and I assigned a chunk of them due today as the pre-lab exercise for the microphone lab.  I just spent over 3 hours grading the set, just marking questions right or wrong. There were too many questions, and even the best in the class got only 8/11, with the bottom of the class getting 3/11. I think that the class is doing better this year than previous years’ classes, but some of them got discouraged by how much and how difficult the homework was.  The amount was certainly more than I had intended, but next week’s homework should be substantially less.  I’ll have to figure out how to distribute the load more evenly next year.

I spent most of today’s lecture going over two of the questions (in response to student request), and I’ll have to do some of the other ones on Wednesday, in addition to showing them how to model DC behavior of the FET in the electret microphone. I may also ask the group tutor for the class to have an extra help session this week.  The two questions that got asked about were the modeling of the oscilloscope probe and computing the sensitivity of the electret microphone circuit with a different load resistor.

Some of the problems students had were ones that can be easily fixed (like that 1/10000 is 0 in gnuplot, because it looks like integer arithmetic—1/10E3 does the right computation, as does 1./10000).  Other problems were fundamental misunderstandings of complex numbers or complex impedance, which may be harder to address.

2014 May 7

Quiz corrections

Filed under: Circuits course — gasstationwithoutpumps @ 20:36
Tags: , , , , , ,

As I reported last week, students did poorly on the first quiz, which came as no surprise to me.  I had the students redo the quizzes as homework, allowing collaborative work (as long as they acknowledged the collaboration in writing).  They turned in the homework on Monday, a week after the quiz, and I returned them today.  No one aced the redo, with the top score being still only 25/33 (which would have been an A on the first pass, on a redo maybe a B+).

A lot of the students still seem to be having trouble with complex numbers—they got the formulas right when working symbolically, but then the exact same question with numbers instead of letters (which could be done by just plugging into the formulas) came out with real numbers when complex impedances were asked for.  Also, a lot of sanity checked were skipped (several people reported a battery as doubling in voltage when hooked up to a resistor, for example).

These students are not major mathphobes (they’ve all passed a couple of calculus classes and most have done more math past that), but they don’t seem to have any sense for reasoning with or about math—they just want to plug in and grind, even on simple problems like ratios in voltage dividers. This class has almost no memory work (I gave them a one-page handout at the beginning of the year with all the math and physics I was expecting them to memorize), but relies heavily on their being able to recognize how to apply those few facts.  This often requires subdividing a problem, like recognizing that a Wheatstone bridge is the difference between two voltage dividers, or that a 10× oscilloscope probe is a voltage divider with R||C circuits for each of the two impedances.

I spent the entire class today working through each problem in the quiz, to make sure that everyone in the class could understand the solution, and (more importantly) see that they did actually have enough knowledge and math skill to do the questions. Some of the students were feeling overwhelmed on the quiz, because they are not used to doing anything more than 1-step pattern matching for problems, and some of the quiz problems required two steps.  None of the quiz problems were as hard as the prelab they had to do this week, which involved 8 or more steps to get the resistor values to set the gain of the amplifier:

  1. Determine the pressure level of 60dB sound in Pa.
  2. Determine the sensitivity of the microphone in A/Pa:
    1. Convert -44dB from spec sheet to a ratio
    2. Get V/Pa sensitivity for microphone for circuit on spec sheet
    3. Convert to A/Pa given resistance of I-to-V conversion resistor on spec sheet.
  3. Determine voltages needed for op amp power supply.
  4. Determine I-to-V resistor needed to bias microphone in saturation region.
  5. Convert A/Pa sensitivity, RMS pressure level, and I-to-V resistor to RMS voltage out of microphone.
  6. Determine corner frequency and R, C values for DC-blocking filter.
  7. Determine maximum output voltage range of the amplifier as the most limiting of
    1. Voltage range of op amp outputs
    2. Power limits of loudspeaker (10W)
    3. Current limit of op amp (which is a function of the power-supply voltage) into 8Ω loudspeaker
  8. Determine max gain as ratio of RMS voltage into op amp and RMS voltage out of op amp (I’m allowing them to be a bit sloppy about RMS voltage vs amplitude, since we are not looking just at sine waves—the amplitude of a symmetric square wave is the same as the RMS voltage.)
  9. Choose resistor values to give the desired gain.

I’m hoping that pushing them go through these multi-step designs in the lab will give them more practice at decomposing problems into smaller pieces, so that two-step problems on a quiz no longer seem daunting, but routine.

I’m going to be giving them another quiz in about a week, covering op-amp basics and the amplitude response of RC filters.  I’ve got to figure out the best time to do this—possibly a week from Friday, after they’ve done another op-amp lab (using a phototransistor to make a pulse monitor, using this handout).  I think I’ll reorder the labs after that, doing the pressure sensor instrumentation amp lab, then the class D power amp, then the EKG.

 

 

2014 May 5

Block diagrams and audio amps

Filed under: Circuits course — gasstationwithoutpumps @ 21:08
Tags: , , , , ,

In today’s lecture, I introduced the notion of block diagrams as having two types of objects: functional blocks and connections between them. I emphasized that both parts were equally important, though computer programmers tended to focus more on the connections and electrical engineers more on the blocks.  I pointed out that basic action of decomposing an engineering design problem into separable subproblems was common to all forms of engineering, and so block diagrams were a common notation in almost all branches of engineering.

I also pointed out that block diagrams were only useful as a tool if they had a reasonable number of blocks (say 3–10), so that the system was broken into manageable pieces, but could still be viewed as one coherent system, not a rats’-nest of tiny components and wires.

As a class, we then developed a block diagram for and audio amplifier, starting from the overall task (sound in, louder sound out) and working our way inwards.

I spent quite a bit of time at each connection.  For example, for the sound in we talked about dB, dBA, and sound pressure levels.  I did not remember the reference value for 0dB of sound, but I have it in the lab handout (20µPa RMS).

We then talked about the sensitivity of the microphone, which we treated as a sound-to-current converter (with units being A/Pa).  I pointed out that the data sheet for the microphone we used did not give sensitivity in that form, but in dB for a reference of 1v/Pa, even though the microphone is a current output, not a voltage output device!  I explained that the data sheet used a current-to-voltage conversion of 2.2kΩ, though there is no particular reason to choose that value.  We also talked about the DC voltage or current bias needed for the microphone, which is much larger than the small AC signal.

The students realized that they needed a high-pass filter for blocking the DC, and realized (after a moment) that the voltage divider circuit meant that the input and output of the DC blocker meant that the microphone’s current output needed to be converted to a voltage.  Luckily, they’ve already designed a simple pullup resistor for current-to-voltage conversion, as well as a simple RC high-pass filter, so they should have no trouble doing so again.

We then jumped to the other end of the circuit and looked at the model for speaker.  I talked them into using the simplest possible model (just an 8Ω resistor), which is reasonable if we limit the frequency to 200Hz to 10kHz (adequate for speech, but not for music).  If we directly connected the circuit so far to the speaker, the students estimated that the signal would be less than a microwatt, so clearly not of much use for driving a 10w speaker. We also looked at the maximum voltage or current we’d want to apply to the speaker, to keep within the 10W RMS limit.

We then added a gain stage, which the students initially wanted to make a gain of about 4000.  I pointed out that voltage out of the op amp was limited to staying between the power rails, and that the MCP6004 op amps they have don’t have a very wide power supply range. I also pointed out that we did not want to exceed the current limits for the op amp, as that could clip the signals and distort them.  So they will need to choose a gain that will amplify the loudest sounds at the microphone to stay within the current limit of the op amp driving an 8Ω load.

Here is the block diagram they came up with:

Audio amplifier using an electret mic.

Audio amplifier using an electret mic.

One student asked a very good question—what do you do if you want more sound than the maximum current from the op amp? I told him that we would address that question in a later lab: the class-D power amp lab.

I told the students to flesh out their block diagram to a detailed schematic (with component values!) before tomorrow’s lab, so that they could spend the lab time building, testing, and debugging the amplifier. I think that they will try, but they will bog down somewhere in the multi-step process of designing the amplifier. I’m guessing that half of the class will have the structure right, but that no one will get reasonable values for all the components.

I have told them that I expect them to come up with expectations for what they should see at each point of their circuit, so that they can compare what they see on the oscilloscope with what they expect, and use the discrepancies to help them debug.

Next Page »

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 314 other followers

%d bloggers like this: