# Gas station without pumps

## 2015 June 5

### Last day of class for Spring 2015

Filed under: Circuits course,Data acquisition — gasstationwithoutpumps @ 23:31
Tags: , , , , ,

Today was the last day of class, and I covered almost exactly what I proposed in last night’s blog post: one-transistor amplifiers, a review of the goals of the course, and getting suggestions for improvements for next year.

I briefly gave them an intro to NPN transistors (reinforcing the previous mention in the phototransistor lab), telling them that the collector current was basically β times the base-to-emitter current, and that the base-to-emitter junction was a diode.  The diode means that no current flows until the base-to-emitter voltage is at least 0.65V and that thereafter the current grows roughly with the square of the voltage above the threshold.

The first circuit I gave them was a common-emitter circuit with emitter degeneration:

Common emitter with emitter degeneration, which has gain of approximately –Rc/Re

I built the circuit outward from the transistor, first adding the two resistors for the base bias, to make sure that the base voltage was high enough to turn on the transistor, then the DC-blocking capacitor to remove whatever DC bias the input already has. I did not take the time to tell them that the RC time constant is $(R_{1}||R_{2}) C_{1}$.

I then asserted that $V_{E} \approx V_{b} - 0.65V$ and that $I_{c} \approx I_{e}$ (because β is large, so $I_{be}$ is a small fraction of the current).  But $V_{out} = V_{cc} - I_{c} R_{c} \approx V_{cc} - I_{e}R_{c}= V_{cc} - (V_{e}/ R_{e} )R_{c}$.  That means that the gain is $\frac{d V_{out}}{d V_{in}} \approx - R_{c}/R_{e}$.  I said that this design was good for providing high voltage gain, but was not good for providing high current (because $R_{c}$ is large).  I did not give them all the constraints on the components and signal levels needed to make sure that the amplifier works correctly.

I also gave them a common collector circuit:

This common collector circuit is good for high current gain, particularly if Rc is the load that current needs to be delivered to. I gave the example of a loudspeaker as the load.

The common-collector circuit is even easier to analyze: the emitter voltage follows the base voltage, but about 0.65v lower (hence the common name “emitter-follower” for this circuit), and the current is increased by up to about β.

I explained the difference between class-A, class-B, and class-C amplifiers by giving the clipping one would get on the common-collector amplifier as the DC bias of Vin got lower.  I pointed out that the class A amplifiers were always passing a wasted DC current, but that class-C were very efficient, being on for only a tiny part of the time.  I said that class C amplifiers were mainly used with LC tanks, and gave the analogy of a pendulum that you only gave a little tap at the end of each swing, to keep it swinging back and forth.

I then switched over to the review of the goals:

• Students passing BME 101L will be able to design simple amplifiers and RC filters for a variety of sensor-interfacing applications.
• Students passing BME 101L will be able to find and read data sheets for a number of analog electronics parts.
• Students passing BME 101L will be able to measure signals with multimeters, oscilloscopes, and data-acquisition devices,  plot the data, and fit non-linear models to the data.
• Students passing BME 101L will be able to write coherent design reports for electronics designs with block diagrams, schematics, and descriptions of design choices made.

Students were in agreement that these goals were mostly met, though they still felt a bit shaky on fitting non-linear models and were aware that there was a lot on the data sheets that they still didn’t understand. I confessed to them that I can’t read everything on most analog data sheets, but that the goal here was to get them to understand the basics of the data sheets (just some of the key parameters).  They felt that they’d gotten at least that far.  I will look into beefing up the presentations in the book and in class on fitting non-linear models, but I think they’re right that many of them have not really mastered that (though some are doing fairly well at it). I didn’t really ask them about their writing skills (an oversight on my part, not a deliberate omission). Many of them have improved their writing, though the average level is still not as high as I’d like to see.

I also checked on some of my subsidiary goals:

• to turn a few of the students into electronics hobbyists,
• to encourage a few to declare the bioelectronics concentration of bioengineering, and
• to teach some tool-using, maker skills (calipers, micrometer, soldering iron, …).

Somewhat surprisingly (and gratifyingly) about a third of the class now wanted to do electronics as a hobby—a topic they had mostly dreaded coming into the class. Only one was planning to the bioelectronics concentration, but a few said that if they were sophomores instead of seniors, they would have chosen bioelectronics. All felt that they had picked up a number of tool-using skills. Because there were a fair number interested in becoming hobbyists, I shared a number of company names that might be good for them to know about, giving a little information about each: Digikey, Mouser, Jameco, Sparkfun, Adafruit Industries, Itead Studio, Seeedstudio, Smart Prototyping, Elecrow, OSH Park, Pololu, Solarbotics, Santa Cruz Electronics, and Frys.  I forgot to mention Idea Fab Labs.

So on the matter of goals (major and minor), I think that the class was fairly successful, but there are still improvements to be made,  and I asked the class for suggestions. Here are a few of the main ones:

• oscilloscope training. The students did not feel that there was a usable tutorial or reference they could turn to on how to use the oscilloscope (and the Tektronix TDS3054 has pretty confusing controls).  I agree with them on this, and promised to write some material for the book to serve as a tutorial on using oscilloscopes.
• the sampling and aliasing lab in the first week didn’t mean much to most of them. Again, I agree, and I originally had that lab later in the quarter, after the students had done some work with time-varying signals. I had some difficulty packing all the labs into 10 weeks and having a report due each Friday—I didn’t want to split any 2-part labs over the weekend.  I’ll look into trying a rearrangement of the labs, but I’m not sure how to accomplish that.  Something to think about over the summer. It might be a good idea to talk about aliasing in some of the places where clipping is discussed, though they are rather different phenomena, sharing only the idea that the output data is not really what the input is about.
• students still felt uncertain of their ability to fit functions (like the power-law fit I asked for in one lab, but never gave them an example of).  I probably need to have some more worked examples in the book, and perhaps some exercises that are in prelabs rather than just in the final design reports.
• students did not identify any parts or tools that should be removed from the kits, but one suggested that tweezers be added (a good idea, though a finer tip pair of needle-nose pliers might be a better solution). Several felt that fume extractors should be added to the lab—I’ll talk to the lab staff about that for next year.

I also asked students about my idea of removing the soldering of the instrumentation amp board and soldering an audio premap board as well, so that the power amp lab could go faster (and that we could have them test single-transistor class A amplifiers before building the class D amplifier). The students were a bit dubious about this idea, but I think I might try it next year anyway.

Students were more enthusiastic about the idea of my writing variants of each lab to perform at home, without the expensive equipment of the lab.  I’ll try to do that this summer, maybe writing up three versions of some labs: one using only the KL25Z board and a cheap (\$10) multimeter, one using those plus a USB oscilloscope (like my Bitscope oscilloscope), and one using the suite of expensive equipment in the lab.  I think that some of the labs will be very challenging with cheap equipment and others will be straightforward.

The loss of the good oscilloscope will probably be most limiting, though with a decent laptop the PteroDAQ data acquisition software can run with a sampling rate of 600Hz for a single channel (the limitation seems to be the program on the laptop keeping up with the USB input so as not to lose a byte and get out of sync).  The old Windows boxes in the lab start dropping bytes even at a 100Hz sampling frequency, but I can go up to 600Hz (but not 650Hz) for a single channel on my MacBook Pro. A newer laptop could probably keep up with a 1kHz sampling rate.  We can do a lot even with the low sampling rate, but it is nice to see somewhat faster signals (like the rise and fall times of the FETs in the power amp lab).

A USB oscilloscope like the Bitscope B10 should be enough for just about all the labs in the course, though I will have to look into how well it does with looking at the rise and fall of the FET gates and drains (without slowing down the waveforms: see Last power-amp lecture for  Bitscope recording of slowed-down transitions and Power amps working for Tektronix images of full-speed transitions). (I did a cursory check tonight, and it looks like even with subsampling it is difficult to get a good view of the gate signal with the Miller plateaus with the Bitscope unless I slow the transitions down.)

My old Fluke 8060A multimeter seems to have died this spring, so I’ll see how much I can do with super cheap hardware-store multimeters.  I think that the impedance characterization of the loudspeaker and electrodes will be the hardest to deal with, but some careful attention to the input impedance of the voltmeter may make even those labs feasible. I’ll probably have to limit the frequency range and use two cheap meters (which I have, and my son has yet another cheap multimeter that I could borrow this summer).

I did mention to the students my idea (borrowed from UCSB) of having students buy their own oscilloscope and voltmeter probes, rather than having to contend with locked down probes that can’t reach the bench or probes broken or stolen by other students. They were lukewarm to the idea—neither endorsing nor embracing it. They’d probably like a cheaper solution, but I don’t know of one as long as EE lets their students into the labs unsupervised (something else I’m trying to get changed, as the EE students do not seem to be willing to follow even simple safety rules, like not bringing open cups of tea and coffee into the lab).