Gas station without pumps

2013 January 10

First lab was too long

I had to take a bike trailer into work again today, hauling a couple of thermoses, an ice bucket, and a dozen coffee mugs for use in today’s lab,  the thermistor lab. At least I got to use the lighter Burley trailer today, rather than the big steel trailer.  As long as I was hauling all that stuff, I tossed in the stainless electrodes and the electrode holders for lab 3 and the pressure sensors for lab 9, so everything is at work now (except the 5 extra parts kits).

I got the latest version of the Data Logger software installed on all the computers in the lab before going to the research seminar, so I was hoping for smooth sailing in the lab itself.

At least half the class had done the pre-lab exercise, which was to figure out which leg of the divider gets which component, and what resistance to use for a specified operating temperature Topt. I have a blog post about the optimization from last June, and I redid the derivation with Wolfram Alpha, where it is a one-liner:

solve d(d( r/(r+ c*e^(B/t)) )/dt)/dt =0 for r

which produces the result r = c e^{B/t} \frac{B- 2t}{B+ 2t}, and which several students got.

Before starting the lab, I used an idea that I believe I got from Mylène, and had the students measure the resistance of the voltage inputs of one multimeter with another. Some of them also measured the ammeter inputs (we got 10MΩ and 0.5Ω, which agrees with the specs for the voltage inputs, but the current shunt is supposed to be either 5Ω or 0.1Ω, depending on the range—I may need to recheck the reading on the multimeters myself). We then talked about why the there were different jacks for the current and voltage measurements on the multimeter.

The students then did the measurements of the resistance at several temperatures. I’d borrowed an old, but unused coffee urn to have a supply of hot water, I used the thermoses for warm water, and I had a couple of jugs of room-temperature water, as well as the bucket of ice, so we had a good range of temperatures. Most students managed to measure the resistance at 5 or 6 different temperatures (there wasn’t time for the 50 or so measurements I had made when I did the lab myself). I had to remind the students several times to use the secondary containment tubs any time they moved around the room with the water, but we had no spills—not even though the ice bucket was rather sloppy to pour from.

The students then modified the gnuplot script that I had provided to fit the parameters of the model to the data. The only change needed was to modify it from Fahrenheit to Celsius, but this needed to be done in several places (the conversion functions, the fitting, the plotting, the y-axis label, and the placement of labels with the numeric results). Just about everyone managed to get that working. I was surprised, though to find that many of these seniors in bioengineering did not know how to bring up a terminal window on their laptops. They had only ever started programs by clicking on icons! (That applied to both Mac and Windows users, though the Windows users seemed even more confused by the idea of typing a program name—I had to show them how to find “cmd”, which I luckily had learned last week—I avoid Windows as much as possible.)

Some of the students needed a little coaching to put together parameters of the fitted data and the formula for choosing the optimal series resistor, but everyone I saw had a resistance in the right ballpark. Those who were way off generally had forgotten to fix one or more of the Fahrenheit-to-Celsius changes needed, and were fitting their data as if the temperatures were Fahrenheit rather than Celsius. There was a big hint that this was a problem, since the gnuplot script plotted the curve from the numbers on the spec sheet also, and if that was not real close to what they measured, there was a problem. Of course, it would only come out identical, if there was cheating going on, as the spec sheet values don’t work well for temperatures below about 20°C.  Just about everyone had good enough temperature and resistance readings to get a reasonable curve that was better than the specs, though some students had better measurements than others.

After choosing their resistor, many of the students came to me to see if they had gotten it right. I felt like I was channeling my Dad as I kept saying “Try it and see!” (see Thanks, Dad!).  We did have to help several students figure out how to use wire strippers and attach wires to alligator clips—but that was the sort of lab-skill teaching I was expecting to do. A lot of students had trouble with the clips touching each other when connected to the thermistor, thus shorting it out, but most of them figured out a way to avoid that problem.

Students connected their voltage dividers up to the Arduinos without too much problem (one group had a temporary short that cause their Macbook to shut down power to the USB port, but removing the short and unplugging and replugging the USB cable fixed that problem). Oh, and one group, using the bench power supply managed to burn out their resistor—they had accidentally used a 15Ω resistor instead of a 15kΩ resistor and shorted out their thermistor for awhile, so with 5V across the resistor, there was 1.7W being dissipated in a ¼W resistor.  No harm done, and they’ve got 9 more 15Ω resistors if they need them for some other design (at 1¢ each, no one is hurt by the loss of a resistor).

There was one major problem with the Data Logger software, which was not my son’s fault. We had carefully gone around to all 12 Macs last week and installed the drivers for the Duemilanove, Uno, and Leonardo Arduino boards, grumbling mightily about the need for the drivers (Mac OS X can recognize the generic type of interface and does not need any special drivers). But almost none of the systems worked for the students, and they were failing in the way that indicated that the drivers were missing. I finally figured out what was going on: Windows needs yet another copy of the drivers for the Uno R3 board (even though the driver is identical to the Uno driver). F***ing Windows!

I got new drivers installed on benches 2,3,4, and 12 by borrowing an Uno Rev 3 from one of the students, but I’ll have to see if one of them is willing to go around to all the machines with me on Monday morning to install the drivers on all machines. I also have to ask my son if he is willing to come in Monday afternoon (after my class but before his) to help students install Data Logger on their laptops, as some students had a lot of difficulty.  I helped several students install pyserial, which seemed to be the hardest part for most of them.  There was at least one student who never did get a working version of Data Logger on his Mac, despite installing 2 different versions (2.5 and 2.6) of pyserial, and trying both Python 2.7 and Python 3.3.  I’d particularly like my son to help him, as I did not have enough time to debug the problem while running around helping all the other students.

We did find a couple of bugs in the Data Logger code that we put in issue reports for:

  1. When you cancel a “do you want to save?” request, it clears the feed and live-chart windows (though at least it doesn’t discard the data).
  2. The Windows version does not bring up a menu bar, which means that some functions (like “bring all to front”) are not accessible.  I wonder if this is related to the previously noted bug of Windows bringing up the feed and live-chart windows in the wrong places.

Most of the students managed to record a time series of voltage measurements of hot water cooling down (sometimes assisted by adding some cooler water).  I had them record a few manual temperature-reading pairs along the way, so that they can double-check the theoretical temperature-voltage calibration curve against the measurements they made.

The lab ran much too long. We started on time at 2, but the last pair of students didn’t finish until 6:30 (the lab was supposed to end at 5, but no one was done then). Several of the students had to leave early or on time and will be arranging with the TA (technically, the “undergraduate group tutor”) to come in over the weekend to finish the lab.

I need to think about what we can do to streamline the lab next year.  One obvious thing to do is to give a more detailed pre-lab assignment, one that had them install the Arduino software and Data Logger software at home, and make a 2-resistor voltage divider on a breadboard to test out that they had gotten the Data Logger working.  Having a help session the evening before the lab to install the Arduino and Data Logger code on their own machines would be a good idea.  Also, many of them are used to cookbook labs, where the lab handout is just a simple protocol to follow, not an optimization and design exercise, so it would help to emphasize the difference a little more strongly in the first class meeting, to make sure that they read the lab handout carefully and do the preparation needed before the lab.

I think that next week’s microphone lab will be shorter, but I’m worried about the electrode lab in the third week—that requires creating a gnuplot script ahead of time and fitting complex models (R2+(R1||C1)) whose impedance varies with frequency.  It also involves measuring 2 (or 3) sets of electrodes, one of which the students will have to make by electroplating AgCl onto fine silver wire.  I’ll have a friend make up some salt solutions for the students (1M, 0.1M, and 0.01M).  He’s also offered to provide some salt water from a real salt pond that should be around 5M and is bright red from the halophiles (mainly archæons) in it.

I’m planning to give each group of students the option of turning in the lab report either on Monday or on Wednesday, with no difference in credit.  The difference will be that those turned in on Monday will be commented on and returned before the Thursday lab, while those turned in on Wednesday will be commented on over the weekend.  Students will be able to trade off more time to work on the report versus quicker feedback.  I suspect that different students will assign different values to the costs and benefits of the two deadlines.  They do now have some guidelines for the lab reports.

On Friday, I plan to talk about other temperature sensors, so that they can discuss in the lab write-ups when thermistors would be an appropriate design choice.

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: