I just realized that I blogged about today’s class, but not about what I spent my entire weekend doing: writing up the lab handout for the hysteresis lab. I decided to swap the hysteresis lab (which had been in week 6, after the op amp lab) with the sampling and aliasing lab (which had been in week 4). This isn’t because the hysteresis lab is simpler, but because I knew what I wanted students to do for it.
I spent the entire weekend redoing the lab, rewriting the software for the Arduino that converts the period of the hysteresis oscillator into an on/off decision, and writing up the tutorial on hysteresis along with the procedural instructions for the lab. I’m kind of pleased that I used hysteresis in the software as well, illustrating that the concept is a general one, not specific to the implementation with a Schmitt trigger. The software does an auto-detect of the pulse widths whenever the board is reset (since I don’t know what frequency the students will aim for), but that auto-detect is not as robust as I would like. I decided not to mess with it, since I wanted code that was simple enough for students to read (and there is no programming prerequisite for this course).
Ah—I just figured out why the auto-detect is not robust! The reset of the Arduino is slow, and the auto-detect adds another 1/3 of a second to that, so I was often not waiting long enough before touching the sensor, contaminating the auto-detect of the “untouched” frequency with some of the “touched” frequency. I added a triple flash of the LED at the end of the autodetect, so that students can know not to touch the sensor after a reset until they see the triple flash. I’ve updated the code and the lab handout on the web site to reflect this change.
I decided not to write up instructions on how to solder, as there are hundreds of perfectly good tutorials about soldering on the web, and students are unlikely to pick a bad tutorial by accident. We now have soldering in labs 4, 9, and 10.
I tried soldering up one of the boards myself on Sunday, to make sure that they came out ok. They do, and the soldering is fairly easy. There are a few places where beginners are likely to make solder bridges, but I did include solder suckers in the tool kits for them, so corrections should be easy.
The capacitance touch sensor in the picture is made out of aluminum foil and packing tape. One of the pre-lab exercises is to estimate finger-touch capacitance from the thickness of the tape, the dielectric constant of the polypropylene tape, and the contact area. One of the post-lab exercises is to estimate the capacitance from the frequency shift of the touch. I tried doing this and got reasonably similar results (given how much variation there is in the capacitance based on how firmly you press your finger against the sensor, increasing the area of the contact).
One thing we don’t have in the lab, though are board holders for soldering. I wonder whether we can borrow them from other labs for these three labs, or whether there are few enough around the labs that we couldn’t get enough anyway. I just bought myself a Panavise Jr., which is much easier to use than the old alligator-clip-and-swivels that I used to use.
The hysteresis oscillator board is easy enough to solder on the benchtop without a holder, but the more densely packed instrumentation-amp protoboards for weeks 9 and 10 will be much easier with a holder.
The next handout that needs to be written is for lab 5, the op-amp lab. That one should be fairly straightforward, and then I’ll have to get back to worrying about the sampling lab. I’m beginning to think that the sampling/aliasing lab should be a combination of the usual demo of aliasing (which students do need to play with) and the design of a simple RC-voltage divider as a low-pass filter. I think that with some small changes to the data logger (allowing down-sampling of some of the analog inputs), we can do the demo on the Arduinos using slow waveforms from the signal generator. I want to come up with some meaningful signals to use as inputs, though.