Gas station without pumps

2013 January 14

Weekend work

Filed under: Circuits course — gasstationwithoutpumps @ 23:12
Tags: , , , , ,

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 capacitive touch sensor, the hysteresis oscillator board, and an Arduino board. I included this picture (at higher resolution) in the lab handout, but carefully covered up the color codes on the resistor, as choosing the resistor and capacitor values is the main design challenge of the lab.

The capacitive touch sensor, the hysteresis oscillator board, and an Arduino board. I included this picture (at higher resolution) in the lab handout, but carefully covered up the color codes on the resistor, as choosing the resistor and capacitor values is the main design challenge of the lab.

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).

Panavise Jr.

Panavise Jr. that I started using this weekend—a much nicer board holder. I got this picture from one of the companies that sells it (I forget which one).

PCB holder from the web—the one I have is this model, but is rusty and has some dings in the ring that holds the lens. I got this picture off the web, but I forget from where (I carelessly copied it without citation).

PCB holder from the web—the one I used to use is this model, but is rusty and has some dings in the ring that holds the lens. I got this picture off the web, but I forget from where (I carelessly copied it without citation).

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.

1 Comment »

  1. […] inverter and use it to make a capacitance touch sensor (pictures of last year’s setup in Weekend work). I had written code for the Arduino boards last year, and I started by trying to do the same thing […]

    Pingback by Hysteresis lab on KL25Z | Gas station without pumps — 2014 April 5 @ 18:43 | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 WordPress.com.

%d bloggers like this: