# Gas station without pumps

## 2017 May 18

### Midterm quiz doesn’t tell me much new

Filed under: Circuits course — gasstationwithoutpumps @ 09:53
Tags: , ,

I don’t usually give exams in my courses any more, because I’m more interested in what students can do when they have time and resources than what they can do on toy problems under resource limitations.  But if students don’t do the homework, then they don’t learn the material, so I threaten each class that if too many students don’t turn in the homework, I’ll have to add a quiz (worth as much as one of the lab reports, each of which is equal to all the homework) to the course.

This quarter I had to follow through on that threat, because 12% of the class had turned in half or less of the homework (and by that, I don’t mean answered half the questions—I mean turned in nothing at all for half the assignments).  A quarter of the class had not turned in 25% or more of the assignments.

I gave the quiz yesterday, with 6 easy questions that only tested the very basic material: single-pole RC filters (passive and active) and negative-feedback amplifiers.  I told students ahead of time (and on the exam) that they could use the Bode approximations (the straight-line approximations to the gain of the RC filters) and we even reviewed them in class last week.  There were 60 points possible on the test, and none of the questions were design questions—they were almost all of the form “what is the corner frequency?” or “what is the gain of this circuit?”.

There are a small number of students in the class whose probity I have reason to question, so I took steps to reduce cheating that I would not normally bother with: I made up two versions of the test (same schematics, but different component values) and alternated them in the piles passed along each row.  I also had the students sit in different rows from usual, reversing front and back of the room, with the front row reserved for latecomers. I’ve noticed a high correlation between good homework grades and people being on-time and in the first two rows, so I had those students sit in the back row, where no one would be able to copy from them.

I normally figure that a test is appropriately long if an expert can do it in about a quarter of the time allotted.  So I made up the keys for the test while the students were taking it.  Working through one form with the Bode approximations took about 5 minutes.  Doing exact computation with the formulas for series and parallel impedances and complex numbers using only real-number arithmetic on my calculator extended that by another 15 minutes.  The students had 63 minutes, so the exam was too easy if the students used the Bode approximations (as they were told) but a little too hard if they worked just from the fundamentals of complex impedance and negative-feedback amplifiers.  As a consequence, I decided to give bonus points for exact computations of the gains that didn’t use the Bode approximations, though the class was not informed of this bonus, because I didn’t want them to waste time on the tiny bonus.  (The differences in answers were small, because I had deliberately asked for gains only at points well away from the corner frequency, so that the Bode approximations would be good.)

Even if students really didn’t understand complex impedance or RC filters, 39 of the 60 points could be earned with just DC analysis of the negative-feedback amplifiers and knowing that capacitors don’t conduct DC.   So I was hoping that students would do better on these very easy questions than they did on the harder design questions of the homework.  As a confirmed pessimist, though, I expected that students would show almost exactly the same distribution on the test that they showed on the homework, with the middle of the class being around 20 out of 60 points and showing serious misunderstandings of almost everything, with a long tail out to one or two students who would get almost everything right.  I also expected that the correlation between the homework scores and the quiz scores would be high.

So what happened?  First, I saw no evidence of any cheating (not that I had expected any), so that is one worry removed.  Second, my pessimistic assumption that students really were not learning stuff that they had done many times in homework and in lab was confirmed:

Here is a stem-and-leaf plot of the scores:

OO: 3
05: 6889
10: 011112444444
15: 555667777899
20: 00111112223344
25: 677999
30: 12224
35: 5678
40: 00444
45: 67
50: 01
55:
60: 2


The median is indeed 21 out of 60, as I feared. At least no one got a zero, though the scores at bottom indicated complete failure to apply the basics of the course.

Most students could compute a corner frequency from a resistor and capacitor, but few had any idea what to do with that corner frequency. Many students could compute the DC gain of a non-inverting amplifier, though many could not then apply this knowledge to the DC gain of an active filter (which only requires replacing the capacitors with open circuits). A lot of students forgot the “+1” in the formula of the gain for the non-inverting amplifier.

Inverting amplifiers were even less understood than non-inverting ones, with students forgetting the minus sign or trying to use the formula for non-inverting amplifiers.

A lot of student answers failed simple sanity checks (students were having passive RC filters with gain greater than 1, for example).

Very few students used the Bode approximations correctly, and many tried the exact solution but either couldn’t set up the formulas correctly or couldn’t figure out how to use their calculators, often getting numbers that were way, way off.  Others seem to have ignored the complex numbers and treat $x+jy$ as if it were $x+y$.

One disturbing result was how many students failed to recognize or understand a circuit that they have designed in three different labs: a voltage divider and unity-gain buffer to generate Vref, combined with a non-inverting amplifier. I asked for the output voltage as a function of the input voltage (both clearly labeled on the schematic). This was intended to be almost free points for them, since they had used that circuit so many times, and the formula they needed was one of the few formulas on the study sheet: $\frac{V_{out}-V_{ref}}{V_{in}-V_{ref}} = 1 + Z_{f}/Z_{i}$. The frequent failure to be able to fill in the blanks of this formula for a circuit that they have used several times in design makes me question whether the students are actually learning anything in the course, or if they are simply copying designs from other students without understanding a thing. (Note: the extremely poor performance and group-think duplication of ludicrously wrong answers on pre-lab homework this year has also lead me to the same question.)

Did the quiz tell me anything that the homework had not already told me? Here is the scatter diagram:

Pearson’s r correlation is 0.539 and Kendall’s tau is 0.306, so the homework and quiz scores are highly correlated. There are a few outliers: a diligent student who bombed the quiz and a student who has turned in few of the homeworks who actually understands at least the easy material. The points have a small amount of noise added, so that duplicate points are visible.

The high correlation between the quiz and the homework mostly confirmed my prior belief that the quiz would not tell me much that is new, and that the homework grades were pretty reflective of what students had learned. I will want to talk with a few of the most extreme outliers, to find out what happened (why were students who mostly understood the material blowing off the homework? and why did diligent students who had been doing moderately well on the homework bomb the quiz—is there undiagnosed test anxiety that should be getting accommodations, for example?).

Most of the points that were earned were from students randomly plugging numbers into a memorized formula and (perhaps accidentally) having chosen the right formula and the right numbers. Only a few students showed real understanding of what they were doing, and only one student saw the quiz as the trivial exercise it was intended to be.

It seems that the hands-on active learning that I have been so enthusiastic about is not working any better at getting students to learn the basics than the traditional (and much cheaper) droning lecture that EE uses. I’m not in complete despair about the course, as there is some evidence that students have picked up some lab skills (using oscilloscopes, multimeters, soldering irons, …) and some writing skills (though many are still not writing at a college level). But I’m trying to teach the students to be engineers, not technicians, so I was aiming at them understanding how to design and debug things, not just implementing other people’s designs. Picking up lab skills is not enough for the course.

I need help. How do I reach the lower half of the class? How do I get them to think about simple electronics instead of randomly applying half-remembered formulas? We’ve only got 3 weeks left—I don’t know how much I can salvage for this cohort, but I certainly would like better outcomes next year.

## 2017 May 16

### New problem in class-D lab

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

Today was the last day for the class-D power amplifier lab, and the students had a problem that we’d never encountered before—the breadboards kept squirting the nFETs out of the breadboard (sometimes the landed several inches away).

We were using the same nFETs as last year,NTD4858N, which comes in a TO-251-3 Stub Leads (which they call IPak) package.  The problem is that this year’s breadboards have their contact springs deeper than in previous years, so the stub leads barely reach them.  I don’t know whether the breadboards were ordered from the supplier I had found (http://www.meerkatsystems.net/html/10000023.html) or whether they substituted one from one of their favorite suppliers.  It would be good to know, as this year’s breadboards seem to be inferior to previous year’s.

Next year, I think I’ll specify the nFET to be PSMN022-30PL,127, which comes in a TO-220 package and sits more firmly in the breadboard.

Tomorrow I’m giving a quiz in class—something I try to avoid doing, but so many students have not been showing up for class nor turning in the required pre-lab homework that I was compelled to assess them some other way.  My guess is that the grade distribution will be similar to the distribution for the sum of the homework so far (out of 50 possible points):

 1.0  1
1.5  2
2.5  1
3.0  1
3.5  3
4.5  1
5.0  1
5.5  1
6.0  1
7.0  3
7.5  2
8.5  5
9.0  1
9.5  4
10.0  4
11.0  1
11.5  2
12.0  3
12.5  4
13.0  1
14.0  1
14.5  1
15.0  1
16.0  3
16.5  2
17.0  2
19.0  2
19.5  1
20.0  1
20.5  1
21.5  2
24.0  1
25.5  1
26.0  1
27.0  1
28.0  1
28.5  1
30.5  1
31.5  1
36.5  1


I further conjecture that there will be a very high correlation of scores (so I won’t really learn all that much about the students). But I’m prepared to be surprised—I made the quiz deliberately fairly easy, so it is possible that students who have struggled with the design problems of the homework may be able to do the quiz.

## 2017 April 11

### Maybe eliminate bench equipment next year

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

One of the BELS (Baskin Engineering Lab Support) staff had an interesting proposal for next year: maybe, instead of tying up a lab with $200,000 worth of bench equipment next year, the applied electronics course could have students rent a box containing an Analog Discovery 2 (with USB cable and power supply). Each box would cost about$200, and students could rent them for about $30 a quarter (there is precedent for this approach—it is used in the first programming course for Computer Engineering). As long as the failure rate for the USB oscilloscopes is low enough, the rental would cover replacement about every three years. Furthermore, students could purchase the boxes at the end of the course for cost minus the rental rate. Given the attractiveness of the instrument to bioelectronics students and to hobbyists, I suspect that about 1/3 of the boxes would get bought each year. The initial investment is relatively modest (about$20,000 for 100 boxes) and the change would make it much easier to schedule the labs next year—all that is needed is a room with enough electrical outlets and enough tables and chairs (not even fancy lab benches).  We’d also need to have soldering irons and fume extractors, but those have already been purchased (though we may need to get more, as they keep getting used for other courses and other needs.

I’m now trying to decide between two options:

• Stick with the conventional bench equipment we have.
• Switch to using the Analog Discovery 2 exclusively (with maybe a handheld DMM for use as an ohmmeter)

The conventional bench equipment approach has the advantage of teaching the students how to use equipment that they are likely to see again in other courses or in research labs. The Analog Discovery 2 is not suitable for high-frequency work, so students going into work that need higher bandwidth will have to learn conventional bench equipment—the current course is the best training available to the students and helps them considerably in the EE lab courses, where they are expected to figure out the rather complicated bench equipment on their own. The bench equipment approach also requires no extra expenses for the students.

The Analog Discovery 2 approach has the advantage of allowing the students to do almost all the labs anywhere.  With the lab time for 5 sections coming to 16 hours a week, not having to share a lab with another course would be a welcome relief, both for us and for them.  (Also, we wouldn’t have to deal with all the damage that the untrained, unsupervised students in the first EE class do to the equipment.)  The Analog Discovery 2 provides an easier-to-use interface for all the equipment than the rather clunky old interfaces of the bench equipment in the lab—some of the labs that now take hours could be done in a few minutes, because of the better integration of the instrumentation. Furthermore, the students would be able to buy at very low cost a piece of equipment that would serve them very well in other courses and as hobbyists.

If we did go with the Analog Discovery 2, I would have to rewrite big chunks of the book to adapt the labs and remove (or separate to different sections) references to the bench equipment. I’m already planning to do a fairly major overhaul of the book this summer and fall, so that’s not a major argument one way or the other.

Faithful readers, advise me! Should I stick with the bench equipment or should I move to BELS renting out Analog Discovery 2 boxes next year?  What other factors should I consider in making the decision?

### Co-instructor wanted for applied electronics course

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

I am looking for someone to be a co-instructor with me for the Applied Electronics for Bioengineers course at UCSC next year (January 2018–june 2018).  There are two reasons for my wanting a co-instructor:

• I want to train someone to take the course over from me when I retire (in about 3–4 years).  Right now, I’m the only person who has ever taught the course, and there are no other faculty at UCSC particularly interested in taking it over. My department has no other faculty who know enough electronics, and the EE and CMPE departments are having enough difficulty covering their own courses, so I need to find someone from outside our usual faculty.
• The course is expected to grow to 100 students next year, and I can barely handle the grading load and lab supervision for 70 students this year (71–73 students last quarter, 68 students this quarter).  If I could split the grading load with another person, we would each have a large, but manageable load.  I might be able to hire undergrad graders to do the homework grading, but not the lab reports, which require good feedback on the writing.

I’ll be hiring undergraduates to help answer questions in the lab, as I’ve been doing this year, but I would want the co-instructor to be present for about half the lab sections.  I think that we’ll have 5 sections of 20 students each, so I’d do 2, then we’d do one together, then the co-instructor would do 2.  The total number of hours a week would be about 3.5 attending/giving lectures, 9.5 hours lab, 8 hours grading, for about 21 hours a week.  I don’t know what the pay would be (depends on qualifications on paper), but the pay would probably be meager by engineering standards—I’d guess it would work out to about \$40/hour, though it might be more if the lab time is properly accounted for in the pay rate.

If any of my local readers are interested in the possibility of being a co-instructor, please contact me (karplus@soe.ucsc.edu).  If you know someone who might be interested, please pass on the information.

## 2017 April 10

### Electret microphone hysteresis

Filed under: Circuits course,Data acquisition — gasstationwithoutpumps @ 09:05
Tags: , , , ,

In attempting to determine the I-vs-V characteristics of an electret microphone, I stumbled across a phenomenon that I’m still having difficulty explaining.  What I was looking for was a plot like this one:

I-vs-V DC characteristics for an electret microphone. The linear and saturation regions are nicely distinguished and there is little noise.

In previous years I had collected the data with PteroDAQ, but this plot was done with my Analog Discovery 2, which combines both the function generator and the data acquisition. Because I was in a bit of a hurry, the first time I tried doing the characterization, I used a shorter period for the function generator, and got a somewhat different plot:

The hysteresis observed here was unexpected. The loop is traced clockwise, with the upper curve for increasing voltage and the lower curve for decreasing voltage.

At first I thought that the effect was a thermal one, like I saw when characterizing power MOSFETs, but a thermal phenomenon would get more pronounced at slower sweep rates (more time to heat up and cool down), while the hysteresis here could be reduced by sweeping very slowly. Also, the hysteresis did not rely on running large currents—the mic was dissipating less than 1mW at the most, and changing the voltage range did not change the hysteresis much.

My next conjecture was a capacitive effect, which I tentatively confirmed by either adding a capacitor in parallel with mic (increasing the hysteresis) or a capacitor in parallel with the 5.1kΩ sense resistor (which reduced the hysteresis or even reversed it).

I tried playing with the frequency of the excitation waveform, to see what happened to the hysteresis:

This pretty plot shows the transition from nearly DC (the curve that looks like the first one of the post) to something that looks almost like a resistor, with current going up linearly with voltage, as the frequency is increased.

Because the hysteresis did not seem to depend on the amount of the sweep, I picked a voltage well into the saturation region (4V), and tried doing a Bode plot of impedance for the mic for a relatively small signal (±1V). I then fit the Bode plot with an (R1+C)||R2 model:

The parallel resistor corresponds to the slope of the DC I-vs-V curve around a bias of 4V. The model fits the data so well that the curve for the data is hidden by the model curve.

I also tried a Bode plot for a DC offset of 2V and an amplitude of ±300mV:

Like with the 4V DC bias, I got an extremely good fit with the (R1+C)||R2 model. The parallel resistance is different, because the slope of the I-vs-V plot is a little higher (so smaller resistance) at 2V than at 4V.

Because the network tool in WaveForms 2015 provides phase information as well as magnitude information, I did my fit first on magnitude, then on phase. The phase fitting was also extremely good:

I show only the 2V phase plot here—the 4V one is similar, though the biggest phase shift is -56.5° at 3.5V, rather than -45.1° at 4.6 Hz.

So I have an excellent electrical model of the behavior of the electret mic at a couple of different bias voltages, with a simple explanation for one of the parameters of the model. I’m still mystified where the capacitance (about 1.7µF) and the other resistance (about 8kΩ) come from. I suppose, theoretically, that they could be tiny surface mount components inside the can of the mic, but I see no reason for the manufacturer to go to the trouble and expense of doing that. The pictures of a disassembled mic at http://www.openmusiclabs.com/learning/sensors/electret-microphones/ suggest a rather low-tech, price-sensitive manufacturing process.

Incidentally, until I looked at those pictures, I had a rather different mental model of how the electret mic was assembled, envisioning one with a simple membrane and the electret on the gate of a MOSFET. It seems that the electret is put on the surface of the membrane and a jFET is used rather than a MOSFET. After thinking about it for a while, I believe that a jFET is used in order to take advantage of the slight leakage current to the gate—the gate will be properly biased as a result of the leakage. The OpenMusicLabs post showed a 2SK596 jFET (an obsolete part), which has an input resistance of only 25—35MΩ, easily low enough to provide bias due to leakage currents. If the gate is biased to be about 0V relative to the source, then the jFET is on by default,

The 1.7µF capacitance is huge—many orders of magnitude larger than I could explain by a Miller effect (unless I’ve screwed up my computations totally) as all the capacitances for the jFET are in the pF range, and the multiplier for the Miller effect should only be around 5–50 (1–10mS times the 5.1kΩ load), so I’m still at a loss to explain the hysteresis. I checked to see whether the effect was something in my test setup, by replacing the mic with a 10kΩ resistor, but it behaved like a 10kΩ resistor across the full range of frequencies that I used for testing the mic—this is not some weird artifact of the test setup, but a phenomenon of the microphone (and probably just of the jFET in the mic).

I suppose I should buy a jFET (maybe a J113, that has a 2mA saturation current with a 0V Vgs) to see if other jFETS have similar properties, connecting the gate to the source with a small capacitor to imitate the electret biasing.

Incidentally, while doing this experimenting, I found a bug in the Waveforms 2015 code: if you sweep the frequencies downward in the network analyzer (which works), on output to a file the frequencies are misreported (as if they had been swept upward). I reported this on the Digilent Forum, and they claim it will be fixed in the next release. The time between the report and the acknowledgement was only a few hours, which is one of the fastest responses I’ve seen for a software bug report. (They didn’t say when the next release will be, but they’ve had several since I bought my Analog Discovery 2 four months ago, so they seem to be releasing bug fix versions rapidly.)

Next Page »

Create a free website or blog at WordPress.com.