How many of my posts have the theme “lab too long”? (answer: too many)
I spent 10 hours in the instructional lab on Tuesday and 11 hours today (Thursday) helping students do the microphone pre-amp lab, and my group tutor is going to have to open the lab on Sunday for several students to finish soldering and testing their boards.
This means that the lab is between 1.5–2× longer than it should be. You’d think that I would be able to predict the length of a lab better by my fourth year of teaching this course!
What went wrong, and how can I fix it for next year?
- The design is somewhat harder for the first op-amp lab than in previous years, because I made a decision to do all the op-amp labs this year with a single power supply, not dual supplies. That makes for a slightly more difficult start, but students don’t have to make the transition from dual supplies (which are getting quite rare these days) to single supplies. The transition is a surprisingly hard one for students to make, as the simplification that they learned for the case when the reference voltage is zero no longer apply, and they have to learn everything over again. Learning the more general form first will, I believe, result in less confusion in the long run, but it does make for a slightly more complex first project.
- This year I’m having students solder their pre-amp boards, so that they can re-use them as part of their class-D power amplifier in three weeks. This was a deliberate choice, to reduce the amount of effort in the class-D lab, which was running too long in previous years, but it roughly doubled the time it took students to finish the lab.
- Because students had larger ceramic capacitors this year, and I had them set the high-pass cutoff frequency near their speaker resonances, some students opted to use very large capacitors and small resistors for their high-pass filters. This made a very small impedance in the passband, and attenuated the signal from the microphone and its large-impedance biasing resistor.
I’ll have to put a warning in the book about the high-pass filter needing to have a larger impedance than the bias resistor, to avoid changing the current-to-voltage conversion.
- Some students had the opposite problem, putting a small capacitor with a very large resistor, so that there was a very high impedance signal driving the input to the amplifier. Since we are using op amps with tiny bias currents, this is not a problem for the circuit’s functioning, but it made looking at the signals with the oscilloscope difficult—increasing the difficulty of debugging.
- Many students were surprised to see that the output voltage was not centered at their Vref voltage. This provided a teaching moment for looking at the MCP6004 data sheet and explaining the notion of the input offset voltage. Because they were using gains of 100×–300×, the ±4.5mV offset became an output offset of ±0.45V–1.35V, sometimes resulting in serious clipping. I need to warn students about that imperfection of op amps before they do the design. A better design would use a multi-stage amplifier, with high-pass filters between stages to get rid of accumulated DC offset.
- I suggested to several students that they look at Vout vs. Vin, by recording a slow sine wave (say 300Hz) at 5kHz sampling with PteroDAQ. This turned out to have some interesting effects when students used 32× averaging, because the time delay between the two channels was enough to get the signals far enough out of phase to open up the plot into an ellipse. Again, I’ll need to talk about that in class tomorrow.
- Lots of students made the mistake of incorrectly applying Ohm’s Law and getting too large a bias resistor, so that their microphones were not in saturation at the power-supply voltage of 3.3V. Luckily, increasing the voltage to 5V (as we will do in the power-amp lab) will rescue their designs.
- Lots of students made the standard mistakes of skipping a wire or two, or putting a wire in the wrong hole while soldering, but a surprisingly large number connected both nodes for a resistor to the same end of a resistor, leaving the other end unconnected. I’ve not seen that mistake before, so I don’t know what triggered it.
- The lead-free solder we have to work with this year (99.3% Sn, 0.7% Cu) is a pain to work with—it doesn’t tin the soldering irons well, and it is difficult to remove from the boards in the event of a mistake.
I think that the soldering lab should not be the first op-amp lab, but I still like the idea of the students having to solder up their microphone preamps. So I’ll have to do a major reorganization of the book this summer, to move a different lab into the first position.
Currently, I’m thinking that the transimpedance amplifier and pulse monitor lab would be a good choice as the first op-amp lab. It would be a bit unusual to start with a transimpedance amplifier rather than a standard voltage amplifier, but the transimpedance amplifier is actually conceptually simpler. Unfortunately, the pulse monitor using a transimpedance amplifier really needs to be 2 stages, with a transimpedance amplifier to bias the phototransistor, a high-pass filter, and an AC gain stage. (Yes, I know I’ve posted about pulse monitors without amplifiers, but a major point of the lab is to teach about transimpedance amplifiers.)
The corner frequencies for the pulse monitor are really low, requiring big resistors even with their biggest capacitors, so the “too small a resistor” problem goes away, though not the “too big a resistor” problem.
By making the microphone preamp the second, or even third, op amp lab, students will spend less time on getting a breadboarded design working, and more time on learning to lay out and solder their circuits. They’ll also be much more amenable to a 2-stage design, to reduce the output offset voltage. I think that rearranging the labs may be worth the effort it will take to rewrite the corresponding chapters of the book, but undoubtedly something else will go wrong next year, and I’ll have to do yet another major revision.
Ah well, at least I’ve gotten the demo for tomorrow’s class (blood and breath pressure) working tonight, and I’ll be able to get to bed before midnight.