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

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.

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).

2015 June 4

Last lab of Spring 2015

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

I spent all day today in the lab for the electronics class, from around 9:30 a.m. until the last students packed up and left at 8:30 p.m.  This was the last lab of the quarter, and I had decided to stay until all the students had left.

Most of the students got their EKG boards soldered up and working today (there may be a few who left without demoing their working boards, and the last group at 8:30 p.m. had just had some more wiring errors pointed out to them).

I’m amazed sometimes at how basically competent designers can be very careless in their wiring, rushing through the placement and soldering without carefully checking each connection. The result is a 10-minute savings in wiring time, and a 4-hour or more cost in debugging and resoldering time.

Tomorrow in class I plan to go over a couple of 1-transistor amplifier designs, but that shouldn’t take the whole time.I’ll give them some pointers to companies that sell parts and kits that might be of use to them: Digikey, Mouser, Jameco, Sparkfun, Adafruit Industries, Itead Studio, Seeedstudio, Smart Prototyping, Elecrow, OSH Park, Makershed, … . And I’ll be sure to mention some local resources: Santa Cruz Electronics and Idea Fab Labs.

I also hope to remind the students of some of the goals of the course, and try to see whether the goals have been met.  I quote from the supplemental form for the course renaming that was approved this spring (effective next year).

The Program Learning outcomes for the bioengineering program are as follows:
A bioengineering student completing the program should

  • have a broad knowledge of science and engineering disciplines including biology, chemistry, physics, mathematics, statistics, and computer science; [Not relevant to this course]
  • be able to apply their broad knowledge to identify, formulate, and solve engineering design problems; [Students passing BME 101L will be able to design simple amplifiers and RC filters for a variety of sensor-interfacing applications.]
  • be able to find and use information from a variety of sources, including books, journal articles, online encyclopedias, and manufacturer data sheets; [Students passing BME 101L will be able to find and read data sheets for a number of analog electronics parts.]
  • be able to design and conduct experiments, as well as to analyze and interpret data; [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.]
  • be able to communicate problems, experiments, and design solutions in writing, orally, and as posters; [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.] and
  • be able to apply ethical reasoning to make decisions about engineering methods and solutions in a global, economic, environmental, and societal context. [Not relevant to this course]

So tomorrow I plan to ask where the students feel that they are able to design simple amplifiers and RC filters, whether they can find and read data sheets for analog parts, whether they can measure signals with multimeters, oscilloscopes, and data acquisition devices, whether they can plot the data and fit non-linear models to it, and whether they can write coherent design reports.

I had some unofficial goals for the course also: to turn a few of the students into electronics hobbyists, to encourage a few to declare the bioelectronics concentration of bioengineering, to teach some tool-using, maker skills (calipers, micrometer, soldering iron, …), and to make all of them better at attacking problems by dividing into subproblems with clear interfaces between the subproblems.  I’ll ask about those things also.

I’ll also want some detailed suggestions for the course.  (So far I’ve gotten one: fume extractors for the lab for use when soldering.)  Some things I’m curious about include

  • Should the first amplifier lab (the low-power audio amp lab) be changed to use a single power supply and solder up the board, so that the board can be used as a preamp for the class-D power amp lab later?  We could then also do an emitter follower (common collector) class-A amplifier using the preamp board.  If they solder up a pre-amp, then we could eliminate soldering the instrumentation amp for the blood pressure lab.
  • Should I redesign the prototyping board to have more room for resistors and no instrumentation amp slot, making it more suitable for the preamp lab and the EKG lab?  A new custom board is still cheaper than something like the $4 perma-proto boards from Adafruit.
  • Should I switch from 18-turn trimmer pots to 3/4-turn trimmers with shafts?  The ones with shafts tend to be easier to turn, but not as precise and the multi-turn worm gear pots.  There are 3/4-turn trimmer pots that play nicely with a breadboard, though they take up a bit more space than the worm-gear trimmers we used this year.
  • Are there tools or parts that almost no one used?
  • Are there tools or parts that should be added to the lab kit? If so, at what price do they stop being attractive?
  • Should students buy oscilloscope and voltmeter probes, like they do at UCSB, rather than having to deal with broken probes or probes locked inconveniently to equipment?
  • Should there be more practice questions in the book? (currently I have very few, with almost all the questions being part of prelab assignments)
  • Does there need to be a “what you are already expected to know” section or chapter, to review material that students are supposed to know already?
  • Which labs took up too much time for the amount of learning achieved? How can they be streamlined?
  • How much time did the course really take total for the quarter?
  • What suggestions do students have for more fun labs?

%d bloggers like this: