2015 June 3

On Monday I again had 2 lectures: one in Banana Slug Genomics on the Burrows-Wheeler Transform and FM index, and one in applied electronics finishing up the EKG preparation and starting into optional material.

The BWT and FM-index lecture was a bit rough though I had prepped on the material for a fair amount of time over the weekend. I think that the written presentations I’d used to prep from (which included the Li and Durbin paper on BWA) were better than my lecture, so I ended up pointing the students to them as well, hoping that my lecture would at least make them more willing to click through and read the paper.

In the electronics class, I provided some feedback on the lab reports (reminding students once again how to figure out the DC bias resistor for an electret microphone). Over the weekend I had finally caught up on the grading, so of course Monday saw a huge stack of redone work being turned in—I did the prelab grading Monday night, but I did not have the heart to start on the redone work last night or tonight.

After the feedback, and questions from the class on the EKG lab, I gave the EKG demo (which had worked fine before cycling up the hill). Needless to say, it did not work when I hooked everything up in front of a live audience. But I turned this into a teachable moment by explaining what I thought the problem was (bad electrode connections, because touching the reference wire produced a change in the output), and getting out three new electrodes, adding a a little electrode gel, sticking them on next to the ones I was already wearing, and moving the clips over. Luckily, that was the problem, so I was able to demonstrate debugging, even with no lab equipment.

The EKG demo concluded the required material for the course, and so I asked students for suggestions on what I should cover next. I suggested the electronics of the nanopore and nanopipette labs, and asked them for other ideas. One student wanted me to explain how theremins work, and a couple of others agreed that would be an interesting topic. So I finished Monday’s lecture on the nanopore electronics (basically telling them it was just a transimpedance amplifier, but engineered for high gain and very low noise, and talking a bit about the copper boxes around the stations to reduce capacitive coupling), and told them I’d try to talk about theremins on Wednesday.

Tuesday’s lab went fairly smoothly, but I was kept busy helping students debug their designs—most often the problem was miswiring, but some students had electrodes that weren’t making good contact. I had on a set of working electrodes, so that we could swap the leads to my electrodes to see if the problem was the electrodes or their boards. A lot of the students had a lot more 60Hz noise pick up (even with my electrodes) than I was getting, and I could not always determine why. In some cases it was simply long wires on the breadboard. They’ll be soldering up their EKGs on Thursday, and the wiring should be much more compact there.

Tuesday night I read up on a bunch of analog circuits relevant to Theremin design, and in today’s class I presented

a block diagram for a theremin (two oscillators—one with an antenna, a mixer, and a low-pass filter to pass only the difference frequency)

I showed them a rather crude theremin that they could implement from what they already knew: two relaxation oscillators using Schmitt triggers, an XOR gate, and an RC low-pass filter. (Only the XOR gate was new to them.)

I then talked about mixers, presenting a ring modulator (which they probably didn’t understand, as we’ve not done transformers except in passing), a simple two-resistors plus a diode non-linear mixer, and a synchronous decoder using a switch to change an op amp gain from +1 to –1. I mentioned a couple of Wikipedia articles they could look up for other mixer designs (Gilbert Cell and frequency mixer).

I then introduced the notion of a sine-wave oscillator as a loop with gain exactly 1 and a phase change of 2πn for some integer n.

The first oscillator I showed them was a Wien oscillator using an op amp, for which I derived that at the phase change of the positive feedback was 0 and the gain was 1/3, so we could set the positive gain to 3 to satisfy the requirements. I mentioned the first Hewlett-Packard oscillator, and the trick of using an incandescent light bulb to control the gain and avoid clipping. I showed them a plot of the amplitude and phase change for the feedback circuit, using gnuplot functions that they are familiar with from their own modeling.

Next I showed them an LC tank circuit, and derived the infinite impedance resonance .

I then got to a Colpitts oscillator, showing them a possible circuit using an op amp, and how to model it as cascaded voltage dividers using gnuplot. I showed them that the phase change of the feedback was 180° and that the phase change moved away from 180° very fast. I was running out of time, so I briefly mentioned the Hartley oscillator and the Clapp oscillator, but didn’t really go into them.

On Friday, I plan to cover one-transistor amplifiers (common emitter with emitter degeneration and common collector—I probably won’t do common base), as those seem to be popular in theremin designs.

Tonight, since I was not willing to face grading, I decided to try out the crude relaxation oscillator Theremin. Here is the circuit I ended up with (not including the bypass capacitors):

I used the potentiometer on the second oscillator to do crude pitch matching for the two oscillators, just looking at the period on an oscilloscope. The emitter-follower amplifier was used to get enough current to drive the loudspeaker.

The crude theremin only sort-of works. I could get high-pitched theremin-like noises from it, but when the difference frequency dropped to 500Hz, the two oscillators phase-locked and the speaker went silent (often with very irritating on-off stuttering). The phase lock occurred even though the oscillators were on different chips at opposite ends of the breadboard, and I had 10µF ceramic bypass capacitors on each Schmitt trigger package and a 470µF electrolytic on the middle of the power bus. Everything was powered to 5V with the USB power from my MacBook Pro.

I also often got 60Hz modulation of the signal, often as a on/off square wave, when the frequency difference was close to the point where the oscillators phase locked.

I’m not sure how the oscillators are getting coupled so that they phase lock when the difference frequency is small, so I’m not sure how to fix the problem. The 60Hz sensitivity is almost inherent in the relaxation oscillator design, since the thresholds for the hysteresis on the Schmitt trigger remain fixed, but the hand near the antenna couples in 60Hz interference. I suppose that over the summer I should try building a theremin with Colpitts oscillators or Clapp oscillators, to see if that works any better.

There were a few questions at the beginning of class, one of which lent itself well to my talking about choosing different models for the same phenomenon and using the simplest model that worked for the design being done. In this case it was about the relaxation oscillator using a 74HC14N Schmitt trigger and where the constraints on the feedback resistor came from. I told them about some more detailed models we could do of the Schmitt trigger, including input capacitance (max value on the data sheet), input leakage current (not specified, but probably fairly small, under 1µA), and output resistance (which would get added to the feedback resistance). I’ll have to incorporate some of those ideas into the book, when I rewrite those chapters this summer—the hysteresis lab needs the most rework of anything so far this quarter.

After the questions I mainly talked about polarizable and non-polarizable electrodes developing the R + (R||C) + half-cell model of an electrode that they will be fitting (without the half cell) in labs this week.

This weekend’s grading was a bit painful, and I’m probably going to have to spend all of Monday’s lecture filling in gaps in their prior education that I had not anticipated. Some holes also became apparent from e-mail questions I got from students over the weekend.

I’ll try to gather the common problems here, so that I can use the list as lecture notes tomorrow.

There were a lot of REDO grades for errors on schematics. I hate giving REDO (since it doubles my grading load), but I told students at the beginning of the quarter that any error on the schematics was an automatic REDO. I plan to stick to that, despite the pain for both me and the students, because they have to develop the habit of double and triple checking their non-redundant documents (schematics, PCR primers, …). Sloppy documentation is a serious problem in engineering and too many faculty and graders have been perpetuating the myth that the almost right idea is good enough. I’m particularly harsh on students who change kHz into Hz or pF into nF. Off-by-a-factor-of-1000 is not good enough! The most extreme case so far is someone who specified a capacitor as being in the gigafarads (they’d typed 109 instead of 10-9). A factor of 1,000,000,000,000,000,000 off is not the sort of thing one can ignore. I also get annoyed by students who randomly pick a unit (H when they need Ω, or Ω when they need Hz), as if all units were just decorations to please a teacher, with no real meaning to them

Frequency is 1/period. For the relaxation oscillator, they do two charge/discharge calculations to get the period as a multiple of RC (though many blindly copied one of the formulas for just the charge time without understanding it, and assumed it was the period). But even after computing the charging time students blindly used 2πf = 1/(RC) as a magic incantation. That formula was relevant for the corner frequency of RC filters, but has nothing to do with the oscillation frequency of the relaxation oscillator.

The capacitance calculation being done in the prelab was for the capacitance of a finger touch to the touch plate, but a lot of students claimed that it was the calculation to determine the size of the ceramic capacitor. Only a couple of groups bothered to explain the connection between the two capacitances. I think I need to rewrite the prompts in the book to force the values to be more different, so that students have to think which capacitance they are talking about.

I find that students often talk about “the voltage” or “the capacitance” as if there was only one in their circuit, and when asked which one they are talking about are completely mystified—to them invoking the magic word is all that can be expected of them—actually knowing what it refers to is unreasonable.

Students in general were doing too much ritual magic. They would put down a formula they thought was relevant (often copying it incorrectly), then claim that from that formula they got some number for their design. Often the formula was not relevant, or additional assumptions needed to be made (like choosing arbitrary values for some variables). At the very least, there was some substantial algebra to be done to convert the formula into a usable form. Some students claimed that Wolfram alpha gave them the solution (when there was not enough information to solve for the variable they wanted a value for). Basically, I’m a bit angry at the students for trying to bullshit their way through the assignment. One pair of students said quite honestly that they did not know how to do a computation and got the value they used from the students at the next bench. I gave them bonus points, and I’ll help them figure out how to do the computation they were having trouble with—I have no problems with students not knowing how to do something new and somewhat tricky, but I do have trouble with students deliberately looking dishonest and stupid by writing bullshit.

The computation that the honest students had trouble with is one that many students had trouble with, so I’ll go over it in class. I gave the students a derivation of a formula for the charging time of the capacitor in the relaxation oscillator, but I didn’t have time to step them through the derivation. It seems like most of the class can’t read math, since many just copied the final formula without reading the text that said it was the time to charge the capacitor. There was an exercise immediately afterwards asking students to compute the time to discharge the capacitor, but this exercise was added to the book after the students had done their prelab exercises, so they didn’t bother to look at the exercise. What they needed to do for the lab was to add the charge and discharge times (which are not quite the same) to get the period.

I need to remind the students that they are turning in design reports, not lab reports. I’m not looking for fill-in-the-blank worksheets, but descriptions of how they designed and tested their circuits. Omitting the design steps is omitting the most important part of the report!

I gave the students three models to fit to the data, and showed them how to do the fits for two of the models in Wednesday’s lecture. There wasn’t time to get to the third model, so I just told them to use the same technique as the second model, but with the different formula. Most of the class never bothered to fit the third model (the only one that really fits the data well)—if I didn’t do all the work for them in lecture, then they weren’t going to generalize even a tiny bit to do it themselves.

A lot of students did not do a good job of fitting the models, because they fit the data with linear scaling, rather than with log scaling as I had shown them. This is a fairly subtle point (errors on a linear y axis are differences, but on a log y axis are ratios), so I’ll review it in class.

I think that some students don’t have any idea when one would use a log-log plot, a log-linear plot, a linear-log plot, or a linear-linear plot. I thought that was covered in precalculus, but I guess not. So tomorrow I’ll present the idea that the only curve most people understand visually is a straight line, so one wants to choose axis scaling so that the expected relationship is a straight line. Linear plots are for linear (or affine) models, log-log plots are for power laws, log-linear are for exponentials, and linear-log are for logarithmic relationships. I’ll put a general straight line on each and derive the form of the function that matches that straight line.

The purpose of the Tuesday lab was to collect data and model the loudspeaker with a few parameters. But many students neglected to report those parameters in their design reports! They produced a plot and fitted models to it, but nowhere on the plot, in the figure caption, or in the main body (in decreasing order of usefulness) did they report what the parameter values were that the fit produced. For students who are so focussed on answer getting that they neglect to explain how they came up with their answers, this seems like a strange omission.

For the Thursday lab, no one did back calculations from their observed frequencies to estimate the capacitance of the 74HC14N input, of the untouched touch plate, or even of the touch itself, to see whether their observations were consistent with their design predictions. One group of students claimed to have done sanity checks, but I don’t believe them, as they also reported oscillations around 20Hz, instead of 20kHz.

For the prelab, it seems that a lot of students computed instead of , though most got it right in the gnuplot scripts for the lab itself. I have to remind students that .

On the typesetting front, I’m making some progress on getting students to put their plots in as figures with captions, though way too many are still referring to “the plot below” rather than to “Figure 3”. I’m also having some difficulty getting them to be sure to refer to all the figures in the main body text. A lot of times they’ll toss in a handful of plots with no reference to them at all.

On the opposite side of the coin, I have to teach them that equations are properly part of a sentence, generally as a noun phrase, and are not standalone sentences. When there is an explanation of variables after a formula (“where A is this, and B is that”), the where-clauses are still part of the same sentence.

Some other little things to tell them:

The word “significant” should be reserved for its technical meaning of “statistical significance”—very unlikely to have occurred by chance according to the specified null model. It should not be used in the normal English way to mean “big”, “important”, or “something I like”.

To get gnuplot to produce smooth curves when there are sharp changes in function, it is necessary to do set samples 3000 to compute the function at more points than the small default number.

Students have been misusing the word “shunt” for any resistor. Properly, it is a low resistance used to divert current from some other part of the circuit—in our designs, it is the resistor being used to sense current and change it into voltage. I wonder if I should switch terms and talk about a “sense” resistor, though “shunt” is the standard term for ammeters.

A minor pet peeve of mine: I hate the word “utilize”. I have yet to see a context in which “use” does not do the same job better.

Yesterday, I had three classes each 70 minutes long: banana slug genomics, applied electronics for bioengineers, and a guest lecture for another class on protein structure. I also had my usual 2 hours of office hours, delayed by half an hour because of the guest lecture.

The banana-slug-genomics class is going well. My co-instructor (Ed Green) has done most of the organizing and has either arranged guest lectures or taught classes himself. This week and part of next we are getting preliminary reports from the 5 student groups on how the assemblies are coming. No one has done an assembly yet, but there has been a fair amount of data cleanup and prep work (adapter removal, error correction, and estimates of what kmer sizes will work best in the de Bruijn graphs for assembly). The data is quite clean, and we have about 23-fold coverage currently, which is just a little low for making good contigs. (See https://banana-slug.soe.ucsc.edu/data_overview for more info about the data.) Most of the data is from a couple of lanes of HiSeq sequencing (2×100 bp) from 2 libraries (insert sizes around 370 and 600) , but some is from an early MySeq run (2×300bp), used to confirm that the libraries were good before the HiSeq run. In class, we decided to seek a NextSeq run (2×250bp), either with the same libraries or with a new one, so that we could get more data quickly (we can get the data by next week, rather than waiting 2 or 3 weeks for a HiSeq run to piggyback on). With the new data, we’ll have more than enough shotgun data for making the contigs. The mate-pair libraries for scaffolding are still not ready (they’ve been failing quality checks and need to be redone), or we would run one of them on the NextSeq run. We’ll probably also do a transcriptome library (in part to check quality of scaffolding, and in part to annotate the genome), and possibly a small-RNA library (a UCSC special interest).

The applied electronics lecture had a lot to cover, because the material on hysteresis that was not covered on Monday needed to be done before today’s lab, plus I had to show students how to interpret the 74HC15N datasheet for the Schmitt trigger, as we run them at 3.3V, but specs are only given for 2V, 4.5V, and 6V. I also had to explain how the relaxation oscillator works (see last year’s blog post for the circuit they are using for the capacitance touch sensor).

Before getting to all the stuff on hysteresis, I had to finish up the data analysis for Tuesday’s lab, showing them how to fit models to the measured magnitude of impedance of the loudspeakers using gnuplot. The fitting is fairly tricky, as the resistor has to be fit in one part of the curve, the inductor in another, and the RLC parameters for the resonance peak in yet another. Furthermore, the radius of convergence is pretty small for the RLC parameters, so we had to do a lot of guessing reasonable values and seeing if we got convergence. (See my post of 2 years ago for models that worked for measurements I made then.)

After the overstuffed electronics lecture, I had to move to the next classroom over and give a guest lecture on protein structure. For this lecture I did some stuff on the chalk board, but mostly worked with 3D Darling models. When I did the guest lecture last year, I prepared a bunch of PDB files of protein structures to show the class, but I didn’t have the time or energy for that this year, so decided to do it all with the physical models. I told students that the Darling models (which are the best kits I’ve seen for studying protein structure) are available for check out at the library, and that I had instructions for building protein chains with the Darling models plus homework in Spring 2011 with suggestions of things to build. The protein structure lecture went fairly well, but I’m not sure how much students learned from it (as opposed to just being entertained). The real learning comes from building the models oneself, but I did not have the luxury of making assignments for the course—nor would I have had time to grade them.

Speaking of grading, right after my 2 hours of office hours (full, as usual, with students wanting waivers for requirements that they had somehow neglected to fulfill), I had a stack of prelab assignments to grade for the hysteresis lab. The results were not very encouraging, so I rewrote a section of my book to try to clarify the points that gave the students the most difficulty, adding in some scaffolding that I had thought would be unnecessary. I’ve got too many students who can’t read something (like the derivation of the oscillation frequency for a relaxation oscillator on Wikipedia) and apply the same reasoning to their slightly different relaxation oscillator. All they could do was copy the equations (which did not quite apply). I put the updated book on the web site at about 11:30 p.m., emailed the students about it, ordered some more inductors for the power-amp lab, made my lunch for today, and crashed.

This morning, I got up around 6:30 a.m. (as I’ve been doing all quarter, though I am emphatically not a morning person), to make a thermos of tea, and process my half-day’s backlog of email (I get 50–100 messages a day, many of them needing immediate attention). I cycled up to work in time to open the lab at 10 a.m., then was there supervising students until after 7:30 pm. I had sort of expected that this time, as I knew that this lab was a long one (see Hysteresis lab too long from last year, and that was when the hysteresis lab was a two-day lab, not just one day). Still, it made for a very long day.

I probably should be grading redone assignments today (I have a pile that were turned in Monday), but I don’t have the mental energy needed for grading tonight. Tomorrow will be busy again, as I have banana-slug genomics, a visiting collaborator from UW, the electronics lecture (which needs to be about electrodes, and I’m not an expert on electrochemistry), and the grad research symposium all afternoon. I’ll also be getting another stack of design reports (14 of them, about 5 pages each) for this week’s lab, to fill up my weekend with grading. Plus I need to update a couple more chapters of the book before students get to them.

Today’s lab went well, with very little intervention on my part. Students finished up their RC calculations, picked their resistors and capacitors, and got their relaxation oscillators working. They then adjusted their R or C values to bring the oscillator into spec, if needed. Most of the help I gave during all this was getting the students comfortable with using the Tektronix digital scopes, which have an extremely complicated and confusing menu system. The “autoset” feature on the scopes is almost essential, since they can have been left in any sort of weird state by the previous user, and finding and clearing all the weirdness takes a while.

Students then made their touch sensors (aluminum foil folded up to be sturdy, then wrapped with a layer of packing tape), and connected them to the oscillators. Most students got a substantial change in frequency, as expected, but one group had chosen a large C and small R, and so got almost no change. With only minimal prompting, they figured out why the frequency wasn’t changing, fixed their values and got it working.

The students did observe a change in frequency if they connected a scope probe to the input of the Schmitt trigger, and most eventually figured out that this meant that the scope probe was acting like a capacitor. When I did it with my scope probe at home, I got a change from 60kHz to 35.22kHz, about a 70% increase in the RC time constant. Since the capacitor I was using was 30pF, this looks like it implies a 21pF capacitance. It doesn’t make much difference whether I connect the scope ground to the ground or the 3.3v lead—the change in frequency is the same either way, so we’re seeing an effect due to capacitance, not due to current through the oscilloscope input resistance. I looked up the specs for the input capacitance of my probes, and it is supposed to be 20pF in 10× mode and 130pF in 1× mode. From that I worked out an approximate circuit for the probe:

Approximate circuit for my cheap 60MHz scope probes.

With the 1× probe setting, the 1MΩ input resistance of the oscilloscope matters—connecting up the scope drops the oscillation frequency to 5kHz if the ground of the scope is grounded, and stops oscillation completely if the ground of the scope is connected to 3.3v.

The Bitscope DP01 differential probe, with no jumper plugs in place (so 2:1 setting on the Bitscope screen) reduces the frequency from 59.7kHz to 38.6kHz, implying about a 16.5pF input capacitance, while the spec claims only 2.5pF differential and 5pF common-mode. I don’t seem to be able to get a signal on the BitScope screen with the differential probe in high-gain mode, and I’m not sure why (the voltages shouldn’t be exceeding the voltage limits). There may be some problem with powering both the BitScope and the device being tested from the same underlying USB power source, though it caused no problems in the low-gain mode.

Students soldered up the boards without problems. The only intermittent error that I had to help debug turned out to be a misuse of an alligator clip (the wire had not been screwed down, but only wrapped around the clip). No one soldered a chip in backwards and I did not need any of the spare boards or chips that I had brought along, just in case.

Luckily not everyone was ready to solder at the same time, as the lab support people had no board holders available, so only the two I brought from home were available. I’ll have to ask them to get some PanaVise juniors (about $27 each) or, if they are too cheap to buy them, then some alligator-clip-based board holders for about $7 each.

Some students had enough time after soldering up their boards that I showed them how to get the frequency information that the KL25Z program was reporting to the SDA USB serial port (using the Arduino Serial Monitor). Unfortunately, the old version of Windows running on the lab computers seems to have serious problems with cut-and-paste operations, and it was difficult to get more than a screenful of data that way.

2014 April 15

After re-reading my notes on last year’s hysteresis lab, I realized that my schedule for this week in the Revised plan for circuits labs, with both the hysteresis lab and the sampling lab in the same week was too ambitious. There was a chance that the students could do the hysteresis lab in 3 hours, but only if they already understood everything in the pre-lab assignment and worked efficiently. A lot of the students, however, only learn by repeatedly bumping into a brick wall, and don’t really have any notion of solving general problems before they encounter them in the lab, so I expected a lot of students to waste time today doing the pre-lab assignment in lab. My expectation there was amply fulfilled.

I decided to cancel (or at least postpone) the sampling and aliasing lab, and spend both Tuesday and Thursday on the hysteresis lab. I don’t think we’ll be able to double up the labs next week, but the week after may be a little thinner, and we may be able to squeeze in the sampling and aliasing then.

Everyone got the two input thresholds for the 74HC14N Schmitt trigger (with 3.3v inputs) measured, and they all got essentially the same values. Some of them took a long time getting there, because I did not hand them a test circuit, but asked them to come up with one themselves. One group used an adjustable bench power supply for Vin, but the rest (eventually) came up with using a potentiometer as a voltage divider and recording the input and output with the PteroDAQ software. For some, I had to do more guidance than I really liked, getting them to decompose the problem into having the Schmitt trigger as one component with a variable input and the pot as another component with a variable output. Since they had done a very similar setup for the mic lab last week, and I had explained the pot as a variable voltage divider at that time, I had expected them to instantly see how to apply it, but most did not. Still, everyone eventually got it, and I think that the ones who struggled the most now have a much solider understanding of voltage dividers and potentiometers than if I had just given them a circuit to copy.

I did get to show the PteroDAQ users a useful feature of the program—by connecting the output to PTD4 (or one of the other digital pins of port A or port D), PteroDAQ can be set to trigger whenever the output changes values. A few sweeps of the pot past the threshold values reveals quite repeatable voltages at which the transition occurs, without having to page through a long trace of uninteresting info.

The groups then struggled with coming up with the right RC time constant for their oscillators. I’m probably going go over the calculation in class tomorrow, since I think everyone got a reasonable result, but not everyone was clear enough about their method to write it up well. I want to see clear explanations in the lab report, so I’ll go over it to help them smooth out the bumps in their explanations.

Some other things I want to do tomorrow:

Talk about Carol Dweck’s work on mindset, as one of the students frequently wonders aloud whether the class is too difficult for her, and some of the other students may be thinking that they “don’t have the ability”. So far as I can tell, everyone in the class has the ability to master all the material in the class—but I need to get them out of “fixed mindset” into “growth mindset” and recognize that they can do more than they credit themselves with, if they are willing to work for it.

Have them go over their computations of the finger-touch capacitive sensor and compare answers with each other. I want to make sure that they express their answers in standard units (like pF) and that they are careful about units (mixing mils, cm, and F/m probably confused a lot of students).
During the lab time, I had each group come up to use my micrometer to measure a double-thickness of packing tape. I must be using a different roll of tape than in previous years, because we consistently got about 1.7mil (0.043mm) with my Imperial units micrometer (that is we measured 3.4–3.5 mil for the double thickness), while last year I had 2.2mil. I should probably get a metric one, but I may be too cheap to spend $14 on a tool I use once a year in this class. Besides, this gave me an opportunity to tell students the difference between mil and mm, which most of them did not know. Since a lot of materials still come with thickness specifications in mil, they should at least be aware of the existence of the unit and the potential for confusion. (Several had done the prelab homework assuming 2.2mm, which would be very thick packing tape.)

Assign one of the voltage-divider do-now problems from last year. Perhaps this one?

What is the output voltage for a 3-resistor voltage divider? (I’ll draw the circuit)

You have sensor whose resistance varies from 1kΩ to 4kΩ with the property it measures and a 5v power supply. Design a circuit whose output voltage varies from 1v (at 1kΩ) to 2v (at 4kΩ).

Two or three of the groups managed to get their relaxation oscillators to oscillate and measured the frequency on the digital scopes. One group got as far as adjusting the R and C values to get the frequency within the spec given in the homework (10kHz to 100kHz), and started the next step (making the capacitance touch sensor out of aluminum foil and packing tape). Lab on Thursday will consist of everyone getting the oscillators working in spec, testing the change in frequency for a finger touch (which may need some capacitor changes, as I think some are using a small R and large C, which won’t have enough frequency change with the small capacitance of a finger touch), testing the oscillator with the KL25Z boards (with my new code), and soldering up the circuits on PC boards.

Students are beginning to get the message that when they ask me whether some result is right, my answer will be what my father taught me: “Try it and see!” When they ask me for help using the equipment or debugging when they get too frustrated, I’m more helpful, but I’m not going to check their work for them when the real world can do that so much better. Besides, the simple models we are using are not all that accurate—even if they do a perfect job of the computation, the real-world behavior will be enough different that they’ll need to tweak the component values anyway. This is another lesson I want them to get—the real world is not as simple as the spherical-cow models used in physics classes and intro EE, but the spherical-cow models are nonetheless useful.