Gas station without pumps

2015 May 31

Fifth weight-loss progress report

Filed under: Uncategorized — gasstationwithoutpumps @ 21:00
Tags: , , ,

In 2015 New Year’s resolution , I said that I want to lose 10–15 pounds by June 2015. In Weight-loss progress report, Second weight-loss progress reportThird weight-loss progress report , and Fourth eight-loss progress report, I provided monthly updates.

For May, I was keeping to the same diet as the previous three months: only raw fruits and vegetables for lunch on weekdays and trying not to overeat in the evenings. Because I was in my target weight range, I was a little less strict with myself about evening and weekend snacking—I allowed myself to eat peanuts between bouts of grading assignments, and I even had ice cream a few times in the month.  Because of this slight relaxation of my dieting rules, I never hit the low set-point for the control algorithm I described in Fourth eight-loss progress report, but have continued officially on the same regime as I have been following since the New Year.

My weight has been fairly steady this month:

I've stayed within my target weight range since 2015 Apr 20.

I’ve stayed within my target weight range since 2015 Apr 20.

It looks like I’ll have to stay on the “raw-veggies-for-lunch” plan indefinitely, since I am now holding steady at my desired weight.  I don’t know how well that will work over the summer, when I won’t be going into work very often, and so will have both reduced exercise and more snacking temptations working from home.  If I put on weight this summer, I’ll have to make up something to induce me to exercise more and snack less—those sorts of artificial plans have never lasted more than a few weeks in the past, though.  Perhaps I can convince my son that we both need more exercise, and can arrange to jog or bike with him daily—if I have to do it for him, I’m more likely to do it for myself (and the same motivation in reverse may help him keep to an exercise plan).



Confidence and not opting out

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

In the Geeky Mom blog, Laura Blanken, Computer Science Chair at The Baldwin School, a K-12 all-girls’ school in the Philadelphia suburbs wrote about The Confidence Code by Katty Kay and Claire Shipman (full article at Women and Confidence).

They found one study where men and women were given a test on 3D shapes. The men outperformed the women significantly, which some might think revealed a deficit in women’s spatial reasoning ability. A closer look at the results, however, showed that the women didn’t even answer a significant number of the questions and that’s where the difference in performance lay. They gave the test again, and this time, they told everyone they couldn’t leave an answer blank. When the results were tallied this time, the women performed as well as the men. When women try at most things, they do just as well. This result says to me that making things that people are afraid of mandatory might help eliminate the gap in performance between women and men. And yes, I’m thinking about Computer Science, but there are other things as well.

In my courses, I have not noticed a difference in achievement between men and women, but I have noticed some differences in confidence, though the sample sizes are small enough and the observations informal enough that it could all be biased observation.

I wonder whether the difference in willingness to put down answers that are not confident is part of the reason that the SAT removed their correction for guessing and effectively put in a penalty for leaving answers blank instead.  The effect would initially be to provide a boost for boys (who apparently are more willing to guess), but might eventually lead to more guessing by everyone as students got test-taking training telling them not to leave any answers blank.

The suggested intervention in the Geeky Mom blog is akin to one of the techniques in Teach Like a Champion by Doug Lemov: No Opt Out (Technique 1 in the first book, but 11 in Teach Like a Champion 2.0). While that might work on exams, I don’t think it is enough in the classroom, as it presupposes that you can get the students to participate in the first place. I think that it needs to be combined with Cold Call (technique 22 or 33, depending which edition of Teach Like a Champion you have).

I started this quarter doing a fair amount of cold calling, but by the end of the quarter I am doing very little—there were too many students who were not even willing to guess, and applying No opt out after cold calling was taking up a lot of time without having discernible good results for any of the students. I still do a little cold calling, but only on very easy questions (half the questions in the electronics class are answered with a voltage divider).

It bothers me that at the end of the quarter, I still have students unable to do the simplest design problem (sizing a DC bias resistor for a microphone, because they can’t apply Ohm’s Law coherently: they pick a random voltage in the system, rather than the voltage across the resistor). It isn’t even a matter of transference or dealing with unfamiliar problems, as we’ve done the same problem in labs and in class several times, but some students are still forgetting that there is a voltage across the microphone. It is as if they wipe their minds every week, and start fresh with no memory of anything they have done before.  I don’t know how to reach these students.

I suppose I could give them hundreds of almost identical problems so that they could, eventually, do that problem by rote, but there is no value in that. What I want them to learn is to figure out how to solve simple problems, not how to invoke rote procedures or ritual magic.  But if they can’t solve even the simplest problems after attempting the problem and being helped through the solution a dozen times, I don’t know what to do.

I do have a lot of students still who seem to believe that science and engineering are ritual magic: they hope to give the right incantation (“By Ohm’s Law” is a popular one, and “we calculated” is another), put down a random number copied from another student, and get full credit. I think that some of their other classes have trained them in this—biology classes are full of vocabulary tests where getting the right phrase is all that counts (understanding it is entirely optional) and physics and chemistry classes are full of homework and tests that are graded on “the right answer” with little attention paid to how they student got it (copying works well in those situations). I want to see their reasoning—what assumptions they made and how they applied Ohm’s Law (or whatever other principle is involved) to get their answer.

Copying does not work well in my electronics class, because the correct answers are not unique, and somewhat arbitrary design choices affect the correctness of other choices. For example, the correct size of the DC bias resistor for the microphone depends on the power supply voltage and on the operating point chosen for the microphone, both of which may be somewhat arbitrary. There are reasonable justifications for almost any size resistor from 2kΩ to 33kΩ, so there isn’t a “correct answer” that can be checked off—the reasoning behind the choice is the entire point of the exercise.  But I’ve had students try to size the resistor without choosing the power supply voltage (a sure sign of copying) or behaving as if the voltage across the microphone was 0V (inconsistent with the current they assumed through the microphone). They spent a full lab day measuring the current-vs-voltage characteristics of the microphone, so it can’t be that they have no idea that the current and voltage are related. Or wait—they already turned in that lab, so it is something to be flushed from memory and never thought of again!

Some days I despair of the future of engineering in the US—way too many of the students passing engineering classes are still incompetent as engineers. And I’m at a highly rated R1 university—I hate to imagine what it must be like at less selective schools. At least I get a few good students each year, and the pleasure of teaching and inspiring them can compensate for a lot of the frustration of not getting through to the students at the bottom of the class.

It is a good thing that we get away with only a small fraction of our workforce being competent, because that is the reality we live in.

2015 May 30

Reducing 60Hz interference

Filed under: Data acquisition,Uncategorized — gasstationwithoutpumps @ 21:49
Tags: , ,

My optical pulse monitor (with a phototransistor, a transimpedance amplifier, a high-pass filter, and a second stage to increase gain) was having problems with capacitively coupled 60Hz interference. Because the combined gain of the two stages is over 700MΩ at the gain setting I usually use, even very tiny currents at the input cause large output signals. On the design I had in the lab to demo the method, I was getting 60Hz interference that was almost a large as the pulse signal (though grounding myself reduced it by a factor of about 4).

I have been relying on a low-pass filter in the transimpedance amplifier (a capacitor in parallel with the feedback resistor that sets the gain) to reduce the 60Hz interference, and I realized last week that I could set the corner frequency much lower, from around 15Hz down to about 2.2 Hz. The signals I’m interested in are blood pulses, so the interesting signals are about 0.3–3Hz. I don’t need to keep the detailed shape of the pulse waveform, so a little attenuation at the highest and lowest parts of the passband is a good tradeoff for reducing the 60Hz interference over 6-fold.

The transimpedance amplifier I wired up with a rather low corner frequency for the low-pass filter.  The filtering is built into the transimpedance stage, by putting a capacitor in parallel with the resistor, so that the gain of the amplifier is (R||Zc).

The transimpedance amplifier I wired up with a rather low corner frequency for the low-pass filter. The filtering is built into the transimpedance stage, by putting a capacitor in parallel with the resistor, so that the gain of the amplifier is (R||Zc).

Here is a plot of the gain of the minimum gain of the two-stage amplifier (with pot set to be 10kΩ):

The narrow bandpass of the new design peaks around 0.95Hz (59.4 bpm), but has adequately high gin over the entire range of likely pulse rates.  The old design gave more high-frequency detail to the pulse shape, but at the expense of too much 60Hz pickup.

The narrow bandpass of the new design peaks around 0.95Hz (59.4 bpm), but has adequately high gin over the entire range of likely pulse rates. The old design gave more high-frequency detail to the pulse shape, but at the expense of too much 60Hz pickup.

Although the minimum gain for the amplifier is about 55MΩ, I usually need to set the gain higher (up to around 700MΩ) to get a clear pulse signal to record with the PteroDAQ data acquisition system.

2015 May 29

Two lectures: Jellyfish and EKG

Filed under: Circuits course — gasstationwithoutpumps @ 20:01
Tags: , , ,

I gave two lectures today: the first in Banana Slug Genomics on the k-mer counting program Jellyfish, the second in my Applied Electronics course on 2-op-amp instrumentation amps and EKGs.

The Jellyfish lecture went reasonably smoothly.  I rather like the program, because it is very old school.  It uses clever bit-hacking techniques to minimize memory usage in a straight-forward hash-table approach to kmer counting, rather than sophisticated and inscrutable data structures. It also take advantage of the CAS instruction (compare and save) to do lock-free parallel updates to the hash table. It is a computer engineering solution to kmer counting, rather than a computer science one.

The electronics lecture also went fairly well. I presented the internals of the instrumentation amp that they have been using:

The 2-op-amp instrumentation amp has a fairly simple design that is easy to remember.

The 2-op-amp instrumentation amp has a fairly simple design that is easy to remember.

In class we derived the gain equation by using three ideas:

  • Negative feedback amplifiers keep the op-amp inputs at the same voltage, so V1=Vin+ and V3=Vin–.
  • Kirchhoff’s current law ensures that all the currents out of V1 sum to 0, and all the ones into V1 sum to 0.
  • R1=R4 and R2=R3.

We can write down the two current-law equations, and add them to cancel the terms involving V2.  That leaves us with an equation that can be rearranged to get the gain equation V_{out}-V_{ref} = R_{1}\left(1/R_{1} + 1/R_{2} + 2 R_{gain}\right).  The students will have to build their own instrumentation amp as part of the EKG circuit for next week’s lab.  They won’t be able to match the resistors as exactly as the INA126P’s laser-trimmed resistors, but their op-amps have higher input impedance and rail-to-rail output, so the resulting instrumentation will be fine for them.  They can’t use much gain in it anyway, since the input ±1mV EKG signal can have as much as 200–300mV DC bias, so that they can’t use a large gain in the first stage without risking saturation of the amplifier.

After the instrumentation amp, I talked a bit about action potentials and ion channels and tried to give them an idea of how a wave moving through the heart gives rise to a voltage dipole, which is what we actually measure.  I still don’t have a crystal-clear view of that in my head that I can present on a chalkboard.  Perhaps I should look around for a video to point the students to.

I had originally planned to demo the EKG in class today, so I put on electrodes after my morning shower, but I decided to test the EKG boards I had before going in to work, and none of them functioned.  Since all of them had worked in the past, I attributed this to a failure of the electrodes, but I had no time to debug in the morning.  When I got home, I decided to try to debug the circuit.  Needless to say, when I hooked up the leads to the electrodes, the circuit worked just fine:

With 480Hz sampling, a moderate amount of capacitively coupled 60Hz interference can be seen.

With 480Hz sampling, a moderate amount of capacitively coupled 60Hz interference can be seen.

A bandpass filter and pair of  notch filters remove the DC offset and most of the 60Hz and 120Hz interference.

A bandpass filter and pair of notch filters remove the DC offset and most of the 60Hz and 120Hz interference.

The only explanation that I’ve come up with (and the one my wife came up with without knowing any electronics), is that I was sweaty by the end of the day. If the electrodes had dried up a bit, then they might not have been very conductive. The sweat may have reduced my skin resistance and the resistance of the electrodes, giving a stronger signal (and a better Vref connection for the third electrode). I can anticipate this problem for Monday’s demo, by putting a dab of electrode gel on the electrodes before attaching them. The disposable electrodes aren’t supposed to need electrode gel, but it is a simple solution. I bought a tube of electrode gel earlier this year precisely in anticipation of needing it for dried-out electrodes.

2015 May 28

I’m proud of UCSC undergrads

I recently got an administrative e-mail, pointing me to the results of the recent student elections at UCSC (Campus Elections). There were 3 undergraduate fee measures on the ballot for undergrads:

  • Measure 61.CruzCare Access for All—Injury and Illness Health Center Fee: Shall the undergraduate students of UCSC provide funding for on-campus medical and mental health care for all undergraduate students by implementing a compulsory fee of $110.00 per student per quarter, starting Fall 2015?FAILED: 51.58% No, 48.42% Yes.
  • Measure 62. Athletics Operations Enhancement Fee: Shall the undergraduates of UCSC provide funding for the operations for Intercollegiate Athletics by implementing a compulsory fee of $117 per student, per quarter, starting in the fall of 2015?FAILED: 60.33% No, 39.67% Yes.
  • Measure 63. Amendment to Measure 30: Strengthening Access to Learning Support Services: Shall the undergraduate students of UCSC provide funding for Learning Support Services, including tutoring and Modified Supplemental Instruction by increasing Measure 30 by $5.36 per student per quarter, resulting in a total fee of $12.00 per student, per quarter?PASSED: 84.99% Yes, 15.01% No.

The undergraduates clearly understood that it is not the point of the University to support varsity athletes in their pursuit of pleasure (and UCSC is unique among the University of California campuses in this recognition), nor to require everyone to further subsidize a student health care system (students are already required to have health insurance, and the student health center is available to all who choose the UCSC student health insurance—the measure was intended to open the services to students who opted to have other, less-expensive health plans), but it is appropriate for students to tax themselves modestly to increase the availability of tutoring and other learning support for those who need it.

I believe that even much lower-cost student athletic fees have failed in the past, but that fees for increasing recreational facilities or opportunities for all students have passed fairly easily.  The students are not opposed to sports, just to subsidizing play for a tiny elite, rather than opening it up for participation by all. One outcome I expect to see from this election is the withdrawal of UCSC from the NCAA Division III and a return to club sports and a focus on intramural athletics for everyone, as there was when I first started teaching at UCSC.

Next Page »

%d bloggers like this: