On Friday, I almost finished covering the class-D power amp, covering comparators, open-collector outputs, how to create PWM signals from a comparator and a triangle-wave generator, and an overall block diagram for the whole class-D amplifier (developed together with the students). I even got in some mention of the LC filter used to improve the audio quality. It was a rather packed lecture, but I thought it went fairly well.
I spent almost the entire Memorial Day weekend grading (except for going to see a broadcast of the Stratford Festival’s production of “Anthony and Cleopatra”, which I thought was a good production, and doing a little shopping and food prep, since my wife was sick all weekend). Despite the time spent grading, I didn’t finish clearing my backlog, still having 6 redone assignments left to grade when I burned out on Monday night.
There was no Monday lecture, so I did not collect the prelab assignments—instead I told the students to keep them to work on the lab itself. I had the students start at the microphone end and build the pre-amp first. The pre-amp is a slightly more complicated version of the amplifier that they built 3 weeks ago—the extra complication being that the preamp has to be driven from a single-rail power supply. Some students got the preamp built and working in an hour, most got it working in two, but a few took longer. None took the six hours that the first amplifier lab took. (One of the groups that took the longest was one I expected to be a good team, but they had accidentally connected the power backwards to their op-amp chip and had apparently burned out one of the amplifiers—I helped them debug and, not finding anything wrong with their design or wiring, finally suggested that they try replacing the chip, which made the circuit function.)
After building the preamp, the next step for them was to hook up the preamp to comparators for comparison with a signal from the triangle-wave generator. I suggested that they build the preamp on one breadboard and the power-stage on a separate breadboard, with only two wires connecting them to convey the voltage from one board to the other (the power supplies are separate). A number of students had problems with figuring out why they needed two wires—I think I’ve got to make a bigger point of voltages always being differences and rely less on the “difference to ground” shorthand that we usually use when talking about voltages.
After getting the comparators working with pullup resistors on the open collectors, I had students attach either the nFET or the pFET with the speaker as load, to record the turn-on and turn-off time of the FETs. The easiest way to get those times is to look at the gate voltage and measure from when the gate voltage begins to change until the end of the Miller plateau (which is when the drain has finished its transition):
Several of the students were getting rather severe ringing on one transition of the comparator, even with no load but the pullup resistor—others got clean fast edges (20ns rise and fall times) without a load, and the expected 500ns—2µs on- and off-times with an FET and 8Ω or 6Ω loudspeaker loading the FET. I don’t know why some students got severe ringing and others did not.
One problem that I need to address in class tomorrow is the large overshoot that all the students will get when turning off an FET driving a loudspeaker—without the flyback diode provided by the other FET, the voltage goes way past the power rail. Since this is a serious concern in driving inductive loads (and mentioned in my book), I think that it is worth a few minutes of lecture. I might need to add some more illustrations to the book to improve the explanation of driving inductive loads.
In the lab today, one or two groups managed to get both the nFET and the pFET checked, and ran the full cMOS driver, getting the desired power amplification without much shoot-through current (maybe 20mA on average). I did have to tell students to use long wires for the speaker, as feedback squeal if a real problem if the speaker is too close to the microphone.
One group ran into an expected difficulty: using too small a pullup resistor for the comparator driving the pFET gate, they didn’t manage to turn the pFET on. I think that they also used too small a resistor for the pullup driving the nFET, and were unable to turn it off. Luckily, they had set the current limits for the power supply fairly low, and so the nFET did not get too hot.
I plan to talk tomorrow about the Miller plateaus, and about adjusting the pullup resistors to make sure that they are as small as possible for the pFET (barely turning it on at the low end) and large enough for the nFET to turn the nFET off quickly. The pullup resistors need to be different sizes for different power supply voltages, so I’m going to recommend to the few students who complete the lab early that they try to do a series of designs for different power supply voltages.
I also need to talk tomorrow about the LC filter and how to use gnuplot to design it. That means I’ll have to schlep in my laptop again tomorrow.
I got the last chapters of the book updated, and released the last draft of the quarter to the students tonight. I’m hoping that the EKG assignment won’t be too difficult for them—I’ll have to go over 2-op-amp instrumentation amps on Friday, as I’m expecting them to build their own instrumentation amp for the EKG assignment.