Gas station without pumps

2015 January 17

How big is a course?

Filed under: Circuits course,freshman design seminar — gasstationwithoutpumps @ 10:42
Tags: , , ,

One of the questions that comes up when designing a course is how much work the course should be. When deciding whether to include a particular topic, exercise, reading assignment, project, test, paper, or whatever, there is always the question whether there is enough time for it, and whether it is important enough to be worth the time.  So how much time is there to allocate for a course?

In the UC system, most of the campus are on a quarter system (UCB and UC Merced are on semesters), with approximately 10 weeks of instruction followed by one week of exams. The exact number of instructional hours varies a bit from quarter to quarter, and between MWF and TTh classes, thanks to almost all holidays now being scheduled for Mondays.  All the quarter-based campuses have a 180-unit graduation requirement, where a unit is supposed to represent 3 hours of work a week for the 11 weeks of the quarter, so the 180-unit graduation requirement is supposed to mean 5940 hours of work (about 1485 a year).

UCSC is different from the other campuses, in that our courses are by default 5 units, while the other campuses generally have 3-unit or 4-unit courses. What I was not aware of until recently, however, is that UCSC also differs from the other campuses in terms of how many contact hours the students get with the professors per unit. UCSC 5-unit courses meet for 210 minutes per week. A full course, including exam, is 2100+180=2280 minutes, or 456 minutes per credit. Not counting the exam, there are 420 minutes per credit.  (In actual schedules, there may be up to 105 minutes of lecture missing due to holidays, reducing the time to as little as 399 minutes of lecture per credit.)

According to a proposal about changing class scheduling at UCSC, written in 2011, the other quarter-based campuses have at most 375 lecture minutes per credit, which lets them pack more class credits per classroom seat than UCSC does. (UCSC suffers a double whammy here, as it has the fewest classroom seats per student, thanks to former chancellors who grew the student population rapidly, on the theory that this would force the state to provide the needed infrastructure—the administrators who made this bone-headed prediction have since gone elsewhere, while the faculty are left with too many students and too few classroom seats.)

Of course, some classes involve far more contact hours. I’m a great believer in high-contact courses, where the students spend time with the faculty. For example, my Applied Circuits class in the spring has me in the classroom with the students for 3.5 hours a week, and in lab with them for another 6 hours a week, for 5700 minutes—at 7 credits that’s 814 minutes per credit,  80–90% more than the usual course. The senior design seminar I’m teaching this quarter has 1155 minutes of class for 2 credits plus 180 minutes per student of one-on-one meetings, or 668 minutes per credit—50–60% more than normal.  (Note: my time for 19 students is 76.25 hours for that class—over 5 times the usual contact hours for a 2-unit course, and that’s not counting the grading time for reading 4 drafts each of 19 theses, nor prep time.)  The freshman design seminar I’m also teaching  this quarter has 2030 contact minutes, for a 2-unit course, or 1015 minutes per credit (2.2–2.4 times normal contact hours). Those are just the scheduled contact hours—I also generally have 2–3 hours a week of office hours, and during the circuits course, I often have to stay late in the lab to help students finish.

So when I’m deciding how much homework to assign in, say, the freshman design seminar, I have to start with the 66 hours that the students are supposed to work for a 2-unit course, then subtract off the 33.83 hours of class time, and divide by 10 weeks to get about 3.2 hours of homework a week (or 3 hours a week, if some is done during exam week).  That is not a lot of homework, particularly if I want students to do some web searching and reading on their own, or do design tasks, which tend to be rather open-ended. It’s a good thing that the freshman design course doesn’t have any specifically mandated content—I can take the classes wherever student interests and abilities lead, without having to worry about whether I’ve covered everything.

Note that engineering students typically take a 17–18-unit load at UCSC (3 5-unit classes, plus labs), which comes to a 51–54-hour week, if they are doing what they are supposed to for all their classes. This workload does not allow much time for students to do a part-time job, and certainly not a full-time one. Some students, forced by the legislature’s defunding of the University to work to pay their tuition, end up with 20-hour work weeks on top of the 54 hours they are (or should be) putting in as students. The legislators may have partied their way through school and think that all students do, but the engineering students I see don’t have that luxury—being a full-time engineering student is not compatible with more than 5–10 hours a week of non-class-related work.

Engineering students at UCSC are usually advised to take two technical courses and one non-technical one. The justification is not that the students need the humanities for intellectual balance (even if it is true, students wouldn’t buy into that justification). Instead, the justification that the students accept is that grade inflation has gotten so extreme in the humanities that they can get an A– doing only half as much work as a 5-unit class should require, so that they have enough time to work on their technical courses or hold a part-time job to pay for college.

 

2014 November 17

Faculty writing community

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

Eric L. Muller wrote in Developing the Faculty as a Writing Community | AAUP,

I have also come to see how many other pleasures and labors of life are enhanced by companionship and accountability. Lots of people exercise more in groups, read more books with groups, lose more weight in groups. Wouldn’t it stand to reason that many faculty members might write more in groups, too?

That was a question that the Center for Faculty Excellence (CFE) at UNC at Chapel Hill set out to explore in the summer of 2013. The CFE is the university’s pan-campus faculty development center. Together with the Institute for the Arts and Humanities in the College of Arts and Sciences, the CFE piloted the Summer Writing Group program for faculty members across the university. The response was enthusiastic.

He went on to describe what sounds like a fairly successful experiment in faculty development.  I note that it did not appear to include any engineering or science faculty, though perhaps there were one or two in the “completely interdisciplinary” groups.

It sounds like an interesting idea, and it probably would have helped me last summer while I was trying to work on my textbook for the bioengineering electronics class.  I ended up practicing all sorts of “creative procrastination” instead of writing.  I got some stuff done on the book over the summer, but not nearly as much as I had hoped at the beginning of the summer. A writing group may have helped me keep my nose to the grindstone (a metaphor I’ve always found rather gross if taken literally).  I don’t know how much I’ll get done before I have to use the book in the Spring, since I’m teaching two classes each quarter, as well as all the work of being undergrad director and program chair for the bioengineering program.

I’ve not been part of writing group since grad school, when I was in a poetry-writing group with a bunch of people twice my age or older. Having a monthly meeting did help me then, and it was important that we read each others’ work and took it seriously (not just providing rah-rah comments). I’m not sure that the UNC approach would help much, unless the other faculty were close enough in their expertise to be willing and able to read and comment on the draft chapters.

Have any of the faculty who read this blog ever participated in anything like the UNC summer writing group? Did it help you keep to a schedule? Was it important to share drafts with each other?

 

2014 June 29

Soldered EKG from op amps

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

Today I decided to solder the EKG design from Instrumentation amp from op amps fine for EKG onto one of my instrumentation amp protoboards, leaving out the instrumentation amp chip—I wanted to see how much trouble it would be.  As it turned out, the build was fairly straightforward, but a little tedious. There are only dedicated spaces for 8 resistors on the board, but there are 9 resistors in the design I used, so one had to go elsewhere on the board.  I deliberately left out the low-pass filter on this implementation (eliminating one capacitor), which did not make a huge difference—I ended up with about 58µV peak-to-peak of 60Hz noise on my input signal (compared to about 40µV in the previous design with a capacitor for low-pass filtering), which is fairly small compared to the 870µV R spike or the 220µV T wave.  The 60Hz interference was large enough to interfere with the P wave and make it difficult to see whether or not there was a U wave.  Of course, these measurements were made in my bedroom/lab, which has a lot less 60Hz interference than the lab the students work in.  I’ll have to take the board into work and see how bad the interference is in that space.

Using a digital filter to remove the 60Hz noise reduced the 60Hz interference to under 100nV peak-to-peak (way lower than other noise components), producing very nice waveforms, even when sampling at 360 Hz.  I’ll probably want to include a digital filter Python script in the book so that people can see the cleaned up signals, even if there isn’t room in the course to design digital filters.

I still have to decide whether to have students do the EKG amplifier without the INA126P chip, using only op amps. Wiring up the bigger circuit takes time, and I’m not sure that 6 hours of lab will be enough time for students to debug their design and get it soldered—it took them long enough to solder the EKG with the INA126P chip, which has fewer components and fewer wires to route.  It took me quite a while to solder up the board, so it would probably take the students far too long.  Is the pedagogic value of designing and building a 2-op-amp instrumentation amp worth the time? I do want the students to end up with an EKG to take home, as it is a tangible artifact that can demo the function of.  I’m thinking that I could even drop the soldering of the pressure-sensor amp (since they don’t take home pressure sensors), and add soldering of the microphone pre-amp.  If I do that, I’ll probably want to redesign the protoboard again, making it an op-amp protoboard with no instrumentation amp slot, but with more resistor spaces.

Cutting one part that costs about $2.70 and the $1.90 thermometer might justify my switching back to the resistor assortment I used in Winter 2013:  1120 piece resistor assortment for $17.39 instead of 1280 piece resistor assortment (currently $10.65) without raising the lab fee.  Why would I want fewer resistors at a higher price? The 1120-piece assortment is 10 each of 112 values, while the 1280-piece assortment is 20 each of 64 values.  Also the 64 values don’t seem to be very repeatable from set to set, and some sets has duplicates (so only 62 or 63 different values).  The 112-value sets seem more reliably useful.  A hobbyist might be better off going one step further to the 3700-piece resistor assortment (25 each of 148 values), but I can’t justify the $31.48 price for my class. (The extra $14 would probably raise the lab fee.)

 

2014 June 26

Instrumentation amp from op amps fine for EKG

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

As I mentioned in Instrumentation amp from op amps still fails, I’ve been trying to decide whether to have students build an instrumentation amp out of op amps in the circuits course.  I decided that it wouldn’t work for the pressure-sensor lab, because of the large DC offset.  One could calibrate each amplifier, either in software (by recording a a few seconds of 0 pressure difference, and subtracting a constant fit to that region from the data) or in hardware, but I’d rather they had a more straightforward experience where the DC offset was small enough to be ignored.

I conjectured that instrumentation amp built from discrete op amps would work ok for the EKG lab, though, as the EKG already has to deal with much larger input voltage offsets due to differing electrode-skin contact.  So I added a second stage  with a gain of 81 to the instrumentation amp in the previous post with a gain of 19, to get a combined gain of 1539.  I put in the high-pass filter needed to eliminate the DC offset, and a low-pass filter to reduce noise slightly (and make aliasing less of a problem).  The corner frequency is a bit high (60Hz noise is not going to be reduced much), but that may allow a better view of the fast R spike in the EKG waveform.

    The EKG circuit has four modules: a virtual ground (here set to 0.5v), an instrumentation amp, a high-pass filter to eliminate DC bias, and a second-stage non-inverting amplifier with some low-pass filtering.

The EKG circuit has four modules: a virtual ground (here set to 0.5v), an instrumentation amp, a high-pass filter to eliminate DC bias, and a second-stage non-inverting amplifier with some low-pass filtering.

The amplifier worked surprisingly well. I did sometimes have trouble with 60Hz noise, but it did not seem to be any worse than the amplifier based on the INA126P. I can remove the noise by digital filtering, though I’ve only played with that by post-processing the data files, not by designing a notch filter to run in realtime on the KL25Z (something to do when I have more time).

Here are a few traces made with EKG circuit above, feeding into the PTE20-PTE21 differential input on the KL25Z board, recorded using PteroDAQ.

This is lead I, without filtering, showing a rather disturbingly large 60Hz noise signal.

This is lead I (LA–RA), without filtering, showing a rather disturbingly large 60Hz noise signal.

This is lead I (LA-RA), showing how the digital filter cleans up the signal. This was Bessel bandpass filtered to 0.3Hz to 100Hz, followed by notch 57Hz–63Hz, followed by notch 117Hz–123Hz. Each filter was a 5th-order Bessel filter, applied first forward in time then backward in time (using scipy's filtfilt function).

This is lead I (LA–RA), showing how the digital filter cleans up the signal. This was Bessel bandpass filtered to 0.3Hz to 100Hz, followed by notch 57Hz–63Hz, followed by notch 117Hz–123Hz. Each filter was a 5th-order Bessel filter, applied first forward in time then backward in time (using scipy’s filtfilt function).

This is lead II (LL-RA), which for some reason had rather low noise even without filtering.

This is lead II (LL–RA), which for some reason had rather low noise even without filtering.

I noticed that sampling at 360Hz allowed me to see a bit more of the structure of the S and T complex than I’ve seen previously, particularly in lead II, and I can even make out a little bump of a U wave just after the T wave.

I now have to decide whether to have students do the EKG amplifier without an INA126P chip, using only op amps. The design will be fairly heavily constrained, as they’ll need to get it all working on a single MCP6004 chip, but it will justify my spending a bit more time on how instrumentation amps work.

I may redesign the blinky EKG to use a single MCP6004 chip also, which would reduce the price of that substantially.

Instrumentation amp from op amps still fails

Filed under: Circuits course — gasstationwithoutpumps @ 17:02
Tags: , , , ,

I’ve been trying to decide whether to have students build an instrumentation amp out of op amps in the circuits course.  Currently the INA126P instrumentation amp chip that I have them use is a black box to them, even though I include an explanation on the lab handout showing how it is internally a pair of op amps and 4 resistors:

Internally, the INS126P instrumentation amp is two op amps and 4 resistors.

Internally, the INS126P instrumentation amp is two op amps and 4 resistors.

I won’t repeat that presentation here (there’s a condensed, early version of it in a previous blog post).  I’ve not actually lectured on the 2-op-amp design before the instrumentation-amp lab, in class, though I did manage to talk about the 3-op-amp instrumentation amp this year (a waste of time, since they did not really process the ideas).

What I was interested in today was whether the pressure-sensor lab could be done entirely with op amps, rather than with the more expensive INA126P chip.

I decided to design an amplifier with a gain of around 200 and an output reference voltage around 0.5 v (based on a 3.3v supply), using the 2-op-amp design and MCP6004 op amps. Here is what I came up with:

This is the design I came up with and built.  It works, sort of.

This is the design I came up with and built. It works, sort of.

The amplifier amplifies and seems to have about the right gain, but there is a large DC offset on the output: about 0.24V, which translates to an input offset of about 1.2mV. I checked with a multimeter, and the negative-feedback voltages are indeed about that far apart, while the inputs from the pressure-sensor bridge are less than 40µV apart. The pressure sensor sensitivity is about 80µV/kPa/V, or 264µV/kPa with a 3.3V supply. If I use the pressure sensor with a blood-pressure cuff, I’ll want to go up to about 180mmHg or 24kPa, so the sensor output should be in the range 0–6.3mV. An offset of 1.2mV is huge!

If I remove Rgain from the circuit, the output offset drops to 20.88mV, which is 1.1mV referenced to the input (close to the 1.22mV measured at the negative feedback inputs).  Further removing R2 or R4 does not change the voltage difference between the negative-feedback inputs.  In fact removing all three of Rgain, R2, and R4, so that we have two unity-gain buffers (with 180kΩ and 10kΩ feedback resistors), still leaves the negative feedback points 1.22mV apart.  Each seems to be about 0.6mV from the corresponding positive input.

The problem is that the input offset voltage of the MCP6004 op amps is only guaranteed to be between –4.5mV and +4.5mV:  I’m lucky that the input offset voltage is under 1mV!  Even the INA126P instrumentation amps that we’ve been using have an input voltage offset of up to 250µV (150µV typical). One can obviously get better instrumentation amps, but the selection in through-hole parts is limited, and I’d have to go to an instrumentation amp costing $4.25  (LT1167CN8#PBF) instead of $2.68 to get the input offset voltage down to 20µV.

I’m going to have to rewrite the section of the book on instrumentation amps, to discuss (at least briefly) offset voltages.  I had originally thought that that the signals we were looking at were big enough that the offset voltages didn’t matter. For the INA126P, a 150µV offset would be about 0.6kPa, while the 1.22mV offset I was seeing in my homemade instrumentation amp would be about 4.6kPa.

I wonder also whether I can make an EKG circuit using this 2-op-amp instrumentation amp circuit.  The EKG already has to deal with potentially large input voltage offsets due to differing electrode-skin contacts.  In fact those offsets may be over100mV, far larger than the 1.2mV from the amplifier.  I’ll have to add another stage of amplification (after a high-pass filter), but that shouldn’t be a problem. I looked at this problem a year ago in 2-op-amp instrumentation amp and Common-mode noise in EKG, and concluded then that common-mode noise would be too large, but I’m tempted to try again, using the design here with gain 19 and a second stage with a gain of around 80 (for a combined gain around 1520), as last year I rejected the idea before actually building the circuit.

 

Next Page »

The Rubric Theme. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 306 other followers

%d bloggers like this: