Gas station without pumps

2015 April 19

How to clone a mammoth

Filed under: Uncategorized — gasstationwithoutpumps @ 21:42
Tags: , ,

One of my most popular blog posts was a tongue-in-cheek one, Bring back the mammoth!, which has had almost 3000 views since I wrote it. Now a UCSC assistant professor has written a serious book on the subject:

Biologist Beth Shapiro explains the science of ‘de-extinction’ in new book

A leading expert on ancient DNA, Shapiro aims to separate science from science fiction in her new book ‘How to Clone a Mammoth’

April 13, 2015

By Tim Stephens

Tired of answering questions about cloning mammoths, Beth Shapiro, a professor of ecology and evolutionary biology at UC Santa Cruz, wrote a book called How to Clone a Mammoth. (Spoiler Alert: You can’t actually clone a mammoth.)

See Biologist Beth Shapiro explains the science of ‘de-extinction’ in new book for the rest of the press release.

Maybe this summer I’ll have time to read the book.

2015 April 16

Microphone labs went OK

Filed under: Circuits course — gasstationwithoutpumps @ 21:19
Tags: , , ,

The microphone labs this week went OK (much better in the afternoon session than the morning session).  On Tuesday the students collected data for an I-vs-V plot of the electret microphone, both using a power supply and a pair of voltmeters and using just the PteroDAQ system on the KL25Z board (see New modeling lab for electret microphone for the basics of the PteroDAQ portion of the lab).  Most groups got all the data they needed on Tuesday, but some were still struggling with it on Thursday.

On Wednesday, I went over the model fitting in gnuplot used to produce the fits for the 4 models I gave them: linear resistance, constant current, a “blended model” that is asymptotically the same but switches smoothly between them, and one that adds one more parameter to get a slope for the saturation region(again, see New modeling lab for electret microphone for the models) .  Some students in the class asked for a copy of the script I developed in class, but I turned them down—the goal is to get them to develop their own scripts, and they had examples of most of what I did from the previous week’s class, which included a worked example.

In previous years, I used to give out all the things developed in class as worked examples, but I’ve stopped doing that, because far too many students just blindly copied and ran scripts without understanding them (often not even changing the parameter values that were different between what I did in the example and the data they collected).  One point of this class is to get students to stop thinking of class work as ritual magic that just requires doing the right memorized or copied procedure, and to get them to think in terms of creating new stuff from building blocks that they understand. It is unfortunate that most of the chemistry and physics labs they have had are exactly that sort of ritual magic, with a worksheet telling them exactly what steps to perform and what results to fill in the blanks with.

They need to learn to generalize from worked examples, read documentation, and figure out how to make things work. I’m always happy to help them debug their efforts, but not to do the work for them.  I’m not in the class to get right answers from the students, but to get them to learn how to design and debug—to ask their own questions and figure out how to answer them. (See Answer getting for more on what change I’m trying to invoke.)  Some of the top students are already on board with the concept and are working hard to understand electronics, modeling, graphing, debugging, and so forth , but a number of the students are still stuck in the “tell me exactly what to memorize and what steps to do” state that seems characteristic of many high school students.  The biology classes they’ve had have not done much to move them away from that—there is far too much memorization without understanding going on in the bio courses.

In addition to the model fitting, I answered questions from the homework—mainly about the calculation of the output voltage from the mic for a given input sound level. I reviewed decibels again and went through the various scaling operations needed to get the output in µV RMS from sound pressure level.  I think that the top students got it, but I’m also pretty sure I lost the bottom ones—it’s a little hard to tell as they all work so hard on looking intelligent that I have a hard time telling when they are lost and when they are bored because I’m going too slow.

Today’s lab was a little bit of design (choosing a load resistor based on the I-vs-V curve, and designing a high-pass filter to block the DC) and practice using the oscilloscope. I did something different this year, having them design their high-pass filter with the input impedance of the oscilloscope as the “R” of the RC filter. In part this was to get them to realize that connecting a test instrument like an oscilloscope or voltmeter always changes the circuit that is being tested.  I even had them design around the 10MΩ input impedance of the 10× scope probe—so the 10MΩ impedance was not “almost infinite” the way many intro electronics courses teach it.  I don’t think I made a clear enough point of this message—neither in the book nor in the lab sections, so I’d better mention it in class tomorrow also.

Unfortunately, some of the material from the old lab (where they used bigger capacitors and smaller resistors for the high-pass filter) was not edited out in making the changes, so the lab chapter was rather confusing.  I’ve left some notes to myself to update the chapter, but I probably won’t have time until this summer.

2015 April 13

Too much prelab homework for microphone lab

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

In putting together the book for this quarter, I added exercises to some of the chapters, and I assigned a chunk of them due today as the pre-lab exercise for the microphone lab.  I just spent over 3 hours grading the set, just marking questions right or wrong. There were too many questions, and even the best in the class got only 8/11, with the bottom of the class getting 3/11. I think that the class is doing better this year than previous years’ classes, but some of them got discouraged by how much and how difficult the homework was.  The amount was certainly more than I had intended, but next week’s homework should be substantially less.  I’ll have to figure out how to distribute the load more evenly next year.

I spent most of today’s lecture going over two of the questions (in response to student request), and I’ll have to do some of the other ones on Wednesday, in addition to showing them how to model DC behavior of the FET in the electret microphone. I may also ask the group tutor for the class to have an extra help session this week.  The two questions that got asked about were the modeling of the oscilloscope probe and computing the sensitivity of the electret microphone circuit with a different load resistor.

Some of the problems students had were ones that can be easily fixed (like that 1/10000 is 0 in gnuplot, because it looks like integer arithmetic—1/10E3 does the right computation, as does 1./10000).  Other problems were fundamental misunderstandings of complex numbers or complex impedance, which may be harder to address.

2015 April 10

Sinusoids and impedance lecture

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

Today’s lecture in BME 101 (the Applied Electronics for Bioengineers class) was again pretty much just as I had planned.  I covered three topics:

  • Sinusoids
  • Capacitors
  • Complex impedance (of capacitors)

The sinusoids section was a brief intro to Euler’s Formula: e^{j \theta} = \cos(\theta) + j \sin(\theta), expanding to the general sinusoid we’ll use all quarter: A e^{j \omega t + \phi}.  I showed them what phase meant on both a time-domain sine wave and as a rotation of the unit circle.  I suspect that those who already knew Euler’s Formula had their memory refreshed, and those unfamiliar with it will either look up info about complex numbers or give up because they are math-phobic.  This year’s class doesn’t seem particularly math-phobic (so far), so I’m hopeful that they’ll refresh their memories of complex numbers, because we’ll be using sinusoids in this form a lot.

I did a lot of cold-call questioning in the capacitor section, getting students to give me the charge formula Q=CV and some descriptions of  the structure of a capacitor fairly quickly. I also mentioned the dependency of capacitance on area, insulator thickness, and dielectric constant.  I gave the relative dielectric constant of air as about 1 (I looked it up now as 1.0006), plastics as 2–4, and ceramic capacitors as around 10,000. I was wrong about the ceramics:  the class 2 Barium titanate ceramics (what we have in our cheap ceramics) have a relative dielectric constant in the range 3000–8000, and the class 1 paraelectric ceramics only 5–90.  I claimed that electrolytic capacitors relied on the thinness of the oxide and large plate area, rather than high dielectric constants, but didn’t give a value (Kemet, who makes capacitors, claims 8.5, so a little more than plastics, but nowhere near the ceramics []).

I then got from the students that I = dQ/dt, and thus that I = C dV/dt + V dC/dt (getting the class to apply the chain product rule took a while).  I pointed out that we would usually use examples in which C was constant, so the formula simplified to I = C dV/dt, but that some of our circuits would have changing capacitance (like the electret microphones that they’ll use next week and the capacitive touch sensor that they’ll design later).

I then put the two previous parts together, defining impedance as a generalization of  resistance, for sinusoidal signals: Z = V/I.  We then made the voltage by an arbitrary sinusoid, V(t) = A e^{j \omega t + \phi}, and figured out the impedance of a capacitor Z_C = \frac{1}{j \omega C}.  I had them give me the impedance of a resistor and capacitor in series (a couple of false starts, but quickly converging to the right answer: R + \frac{1}{j \omega C}). Finally, I had them give me the formulas for a couple of voltage dividers: a high-pass RC filter and a low-pass RC filter, and we simplified the formulas by multiplying top and bottom by {j \omega C}.

I then switched to gnuplot and showed them how to plot the magnitude of the impedance of a circuit as a function of frequency, and the gain of a high-pass filter:

j = sqrt(-1)
Z_C(w,C) = 1/ (j * w *C)
set xrange [1:10000]
plot abs(Z_C(2*pi*x, 1e-6))

set logscale xy
plot abs(Z_C(2*pi*x, 1e-6))

divider(zup,zdown) = zdown/(zup+zdown)
plot abs(divider(Z_C(2*pi*x, 1e-6)  , R))

The gnuplot stuff was a little hurried, so I’ll spend the first part of Monday on Bode plots, corner frequencies, and the design of RC filters. They have a homework (prelab) exercise due on Monday, so they should be primed for understanding the material.

2015 April 9

Second half of temperature lab went well

Filed under: Circuits course — gasstationwithoutpumps @ 21:11
Tags: , , ,

I continue to be pleased with this Spring’s class.  It is taking up far too much of my time, but the students are doing well. Today they got their resistors (and ceramic capacitors), so they could select whatever resistor value they needed for the optimization problem.  I told them by e-mail last night to optimize for 12°C, which I estimated would require about a 12kΩ resistor.  I change the temperature point each year, so that students can’t just look up an answer—not that it would do them much good if they could, as the design report needs to contain the derivation of the result.  If they can copy the math correctly, then they can do it (especially since we did the derivation in class yesterday).

I put some reminders/instructions on the board at the beginning of lab, something like the following:

  • Optimize for max sensitivity @ 12°C
  • Measure your resistor
  • Measure Vin
  • Measure Vout at many temperatures
  • Plot Vout vs temp both from model (as curve) and as data points, to check calibration.
  • Plot temp vs time for 10 minutes of water warming up from low temperature (using PteroDAQ)

Everyone seemed to be getting good data in the lab.  What students seemed to need the most help with was the concept of putting the predicted behavior of the circuit on the same graph with the measured behavior. They had a formula for the voltage as a function of temperature with 4 parameters: B and R∞ from fitting Tuesday’s data, R that they chose and measured, and Vin that they measured though it was nominally 3.3V. But it was hard going trying to convince them to plot that curve on the same graph as the scatter diagram of today’s measurements.  It may be that they have never been asked to plot a predicted curve and measurements on the same plot before—as if they’ve never actually checked that a model is correct. I would have thought that physics classes would have done that sort of predictive modeling, but apparently not, as the concept seemed completely foreign to many of the students.

Those who did finally get the calibration plot done generally had very good agreement between their measurements and the predicted model.  I’m hoping the rest will get the plots done tonight.  There was at least one group that was seeing about a 0.5°C discrepancy, which could be due to different calibration of the thermometers used on Tuesday and today, or could be due to their using a wrong value for the °C to °K conversion.

The students also recorded a time course of a water bath warming up from about 3°C. I think that next year I might do a higher optimum temperature and ask students to record a water bath cooling down—the temperature change is faster that way (due to evaporation). I’ve asked them to plot this as temperature vs. time, not voltage vs. time, and several students seemed well on their way to doing that correctly—this year’s class seems much more adept at picking up gnuplot techniques than the last two years’ classes.  I don’t know whether that is because of a better ordering of the material this year, or some difference in the cohort.  I like to think it is an improvement in the way I present things, but it is more likely to be a difference in the students.

One pair of students surprised me in a good way—they had done the optimization last night, then tried out the design at home, using the PteroDAQ to read voltage.  Since they did not have the resistor kits yet, they had put the two 22kΩ resistors they did have in parallel to make an 11kΩ resistor.  They were worried I might be upset with them for jumping the gun on the lab—quite the contrary, I’m delighted that they’re preparing before class, and that they realized that a lot of the lab work doesn’t really require the fancy equipment in the lab. I’ve pitched the class as being suitable for creating electronics hobbyists, and if some of them get into that early in the course, then the course is being highly successful!

I’ve even considered rewriting a number of the labs to be doable completely at home, but right now too many would require about a $250 investment in a USB oscilloscope, which makes an all-at-home approach a bit too expensive for me to recommend.  It might be an interesting way to market the book though—as a complete electronics at home lab course for about $400.  I think that there is a substantial market for such a kit/course, but it would be a fair amount of work to get the book into shape for use without a lab mentor to guide the students through the rough spots.

I’m looking forward to this week’s reports (that’s right, for once I’m looking forward to the grading, rather than dreading it), as I think that a lot of the class actually got all the concepts that this week’s lab was about.

Tomorrow I’ll be introducing complex impedance (particularly Z_{C} = \frac{1}{j\omega C}) and RC filters as voltage dividers.  I’ll be doing most of the lecture as a chalk talk, but I’ll bring my laptop to show them how to create (amplitude) Bode plots with gnuplot.  We’ll be doing various things with model fitting, with variants on voltage dividers, and with complex impedance for the next 3 weeks, and then we’ll start on amplifiers.



Next Page »

The Rubric Theme. Blog at


Get every new post delivered to your Inbox.

Join 308 other followers

%d bloggers like this: