Gas station without pumps

2014 April 24

Stainless steel electrode analysis

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

After yesterday’s lab I wrote

I do have to get the students to start lab more efficiently. Once everyone had their setup built, they took measurements fairly quickly, but they came to lab with no schematic of their test circuit and no table set up for recording their measurements. The first hour of lab was wasted by almost everyone doing the pre-lab work that they should have done over the weekend and asked about in class on Monday.

I started out today’s lecture talking about that—how everyone was very efficient in the last hour of lab, but how it had taken them forever to set up, because they hadn’t come to lab with their schematics already drawn, ready to build, nor their data tables set up, ready to fill in.  I’ll see if they are more efficient in Thursday’s lab.

I also wrote

Tomorrow I’ll spend some time helping them write gnuplot scripts to model their impedance data.  I’m assuming it will look a lot like the data I collected last year, which means that the conventional model of polarizing electrode will not fit all that well.

I hope that we also have time for some complex impedance and voltage divider problems, so that they have a little more practice before Friday’s quiz (which I still haven’t written).

We ended up spending almost the entire hour looking at gnuplot scripting and model fitting.  In fact, the data did not fit the polarizing electrode model ((R_{surface} || C_{surface}) + R_{bulk}) at all well, though the students got pretty clean data from 10Hz to 300kHz. We spent some time talking about whether the model was useful, even though it was as much as 20% off, and looked at a simple power-law model that was even further off.

I showed them how to fit data for log-y plots by using fitting the log of the function to the log of the data. I don’t know how many of them got the point of that, though, as my explanation was not as clear as it might have been, and I saw some blank looks.  I’ll probably want to revisit that next week, with a clearer explanation, when we do a similar measurement lab for the loudspeaker.

The problem with the conventional polarizing model is that it predicts a fairly simple Bode plot, with a constant resistance at high frequencies (Rbulk) and at very low frequencies (Rbulk + Rsurfacec. The data actually has no flat spot at frequencies as low as we could measure,
and impedance is still dropping, though slowly, at the highest frequencies we could measure.

I’m wondering whether it is worth setting up the PteroDAQ measuring system to look at much lower frequencies, to see whether impedance flattens out at a much lower frequency than the RMS voltmeters are good for.

Another possibility is try to set up a circuit to measure phase shifts, so that we can get a better idea of the complex impedance, rather than trying to infer the complex impedance from the change in its magnitude with frequency. Both of those are going to have to wait, though, as I have to write the quiz for Friday, provide feedback on some grad student papers, grade this week’s lab, grade the quizzes, and write an all-new lab handout for transimpedance amplifiers.

Actually, I’m thinking that we should do the simple one-stage or 2-stage audio amplifier first, then the transimpedance amplifier for the optical pulse monitor.  So probably this weekend will be on rewriting the audio amplifier lab.  I’m a bit torn, though, as it would be good to do the audio amplifier and power amp back-to-back, particularly if we could do the 2-stage op-amp version in one day and spread the class-D amplifier over three days.  Oh, well, I don’t need to decide until this weekend—I’ll be too busy with the quiz before them to re-order the schedule.

2014 April 22

Stainless steel electrode lab went fairly well

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

Today’s electrode lab went fairly well.  This is the lab I always panic about, because the students have to move concentrated salt water (up to 1M NaCl) around the lab, and salt water and electronics equipment must not mix! I only had to chide one student once for not using the secondary containment tub, and nothing was spilled.

I had the students do more measurements this year than last, having 4 different concentrations (1M, 0.1M, 0.02M, and 0.005M NaCl) and an unknown (tap water). Last year they only had 3 known concentrations, but had to do both stainless steel and Ag/AgCl electrodes in the same lab. Most of the students finished the lab.  One group still has one set of measurements to do on Thursday, and I stayed an hour late with the singleton student—this is a lab that goes much faster if one student records data while the other reads the meters, so I served as meter-reader for him after everyone else had left.

I spent some time at the beginning of class  to teach each pair of students how to use a vernier caliper to that they could measure the dimensions of their electrodes.  I also had them measure the thickness of the electrodes using my micrometer. I’ll have them do both again (without my instructions) for the silver wire electrodes on Thursday.  Ah—I need to bring in some salt so that I can make a strong salt solution for electroplating on the chloride!  It does not need to be pure, so I won’t use up the 1M NaCl that we have for them to measure their electrodes with.

I do have to get the students to start lab more efficiently. Once everyone had their setup built, they took measurements fairly quickly, but they came to lab with no schematic of their test circuit and no table set up for recording their measurements. The first hour of lab was wasted by almost everyone doing the pre-lab work that they should have done over the weekend and asked about in class on Monday. I did insist on seeing their schematics before I would let them have any of the salt water.  Several had to redo their circuits a few times, because they made no sense (only one wire of the function generator drawn, or a circuit that did not include their current measuring resistor).

Next year, I may have to add more explicit instructions in the pre-lab to make a schematic of their test setup and a table for recording results. Tomorrow I’ll talk to them about preparing for lab so that they can start work immediately, though I don’t know if it will do any good. For next year, I should also add some discussion to the prelab about adjusting the resistor size after making a measurement.  Almost all the groups chose to use a 1Ω resistor, which means that the voltage drop across the resistor was generally quite small (1mV to 180mv).  It would be better to use a slightly larger resistor (10Ω or 100Ω) to get larger readings.  I’ll also have to tell them to set the amplitude on the waveform generator to 10v p-p, so that the signals are large enough, as the default setting when the generator is turned on is only 100mV peak-to-peak.  I think everyone got the amplitude up to at least 1v, which may be good enough.

Tomorrow I’ll spend some time helping them write gnuplot scripts to model their impedance data.  I’m assuming it will look a lot like the data I collected last year, which means that the conventional model of polarizing electrode will not fit all that well.

I hope that we also have time for some complex impedance and voltage divider problems, so that they have a little more practice before Friday’s quiz (which I still haven’t written).


Electrodes and load lines

Filed under: Circuits course — gasstationwithoutpumps @ 07:17
Tags: , , , , ,

As planned I talked on Monday a little bit about polarizing and non-polarizing electrodes, giving them the the idea that the point of electrodes was to convert between ionic currents in solution and electron currents in wires, and that there was always a redox reaction to do the conversion.  (I did not use the term “redox” though, and I probably should have—I’ll try to work it in casually during lab today.)  I talked about three electrodes:

  • the Ag/AgCl that is used for a lot of bio research, because it is non-polarizing, works well in salt water, is generally non-toxic, and is fairly cheap.
  • stainless steel (particularly 316L), because it is commonly used in implants for its non-corroding, non-toxic properties, though it makes a polarizing electrode, which is not suitable for low-frequency measurement.
  • platinum electrode used for the hydrogen reaction that is the standard non-polarizing reference electrode (and is used in a lot of gel-electrophoresis boxes).

Although I gave the chemical reactions for Ag/AgCl (pointing out that the ion current was chloride ions) and the hydrogen reaction, I did not attempt to do so for stainless steel, because I’m still not sure which of the many oxidation reactions are relevant. I did point out that the steel is kept from rusting mainly by a chromium oxide layer on the surface, and that the same mechanism that prevents rusting also makes stainless steel a poor transducer of electron currents to ion currents.  I’m not sure I got that message across though.

I think that it may be worthwhile, either in lab today or in our data analysis on Wednesday, to mention “redox” reactions by name, and to point out more clearly that the what makes stainless steel good for implants also makes it poor for electrodes—the notion that “metal conducts” may be too strong a prior, as students are not used to thinking about the surface properties of things, but just bulk properties.

For the second half of the lecture, I introduced the notion of load lines, with open-circuit voltage VOC and short-circuit current ISC to figure out the voltage and resistance of the Thévenin equivalent of power source. I then had them work out, as a class, the Thévenin equivalent of a simple voltage divider. They got it, eventually, but I had to work through some stubborn holes in their understanding of simple circuits from physics. I think part of the problem was terminology—they apparently did not know what “short circuit” and “open circuit” meant, which I did not realize was a difficulty until near the end of the time.

I did not get the students any RC impedance or voltage divider questions to work on—I hope we have a little time for that on Wed, before Friday’s quiz. I could assign homework with voltage dividers and RC circuits, but I’m reluctant to assign homework in this class, given the amount of work expected for their lab write-ups. Several students already aren’t doing the homework I do assign—many are not even reading the lab handouts with the pre-lab assignments until just before class, when it is too late to do the work. A lot of lab time has been wasted by students trying to do the prelab work during lab.

2014 April 20

Designing courses to teach design—draft 4

Today I tried practicing my talk for Wednesday with my son as an audience (I figured I could get some useful feedback from him based on his years of theater experience). He asked me a number of good questions about my audience and what effect I wanted to have on them (the same sort of questions I ask my students, but often have difficulty applying myself). He gave me some good advice about changing the tone of my talk, making it more conversational and less lecturing.  (I’m good at that in my usual improvisational lecture style, but I know that I couldn’t keep to time if I tried to be extemporaneous with this material.)

After getting his suggestions, I rewrote the talk and delivered it to him again.  It runs about 9 minutes, and my target is “under 10 minutes”, so I think the length is about right. I welcome suggestions from my readers also—the talk isn’t until Wednesday, so I may have time to make more revisions.

Because of the time constraints, I’m going to read my talk—something I’ve never done before, so forgive me if the presentation is a bit awkward.

I want to talk to you today about two courses I created in the past two years. These courses were in part a reaction against the University pressure to create MOOCs. University education is not supposed to be mega-lecture courses, but students getting detailed feedback on their work from experts.

The courses I’m talking about are not easy, cheap fixes (like was claimed for MOOCs)—they are high-contact, hands-on courses, which take a lot of time to create and teach, and so are expensive to offer.

Designing the courses started from goals and constraints: “what problem was I trying to solve?” and “what resources were available?”

The two problems I was trying to solve were in the bioengineering curriculum:

  • students weren’t getting enough engineering design practice (and that mostly in the senior year, which is much too late) and
  • too many students were selecting the biomolecular concentration, where we were exceeding our capacity for senior capstone and senior thesis projects.  The other concentrations were under-enrolled.

The main constraints were that

  • there was no room in the curriculum for adding more required courses,
  • there were no resources for new lab space or equipment, and
  • all existing engineering design courses had huge prerequisite chains.

Because I couldn’t ask someone else to create and teach a new course, the content had to be something I already knew or could learn quickly. So, no wet labs!

The first course I’ll talk about is a replacement for the previously required EE 101 circuits course. The EE course is a theory class that prepares students to do design in later courses—but most bioengineering students never take those later courses, so were getting prepared for something they didn’t do. (That’s a general problem in the bioengineering program—“creeping prerequistism” in the 8 or 9 departments providing courses results in the students always preparing to do stuff, and not getting to the doing until senior year.)

The goal of the new Applied Circuits for Bioengineers course is to have students design and build simple amplifiers to interface biosensors to computers. We work with a range of sensors from easy ones like thermistors, microphones, and phototransistors to more difficult ones like EKG electrodes and strain-gauge pressure sensors.

The goal is for students to do design in every lab, even the first one where they know almost no electronics, and to write detailed design reports on each lab—not fill-in-the-blank worksheets, like they get in other intro labs.

The course was designed around the weekly design projects, not around topics that must be covered. Themes emerged only after the design projects were selected—the class comes back again and again to variations on voltage dividers, complex impedance, and op amps with negative feedback.

There wasn’t a textbook available that covered things the way I wanted, so the students use free online materials instead. The savings on textbooks is used to justify a lab fee of  about $130 for tools and parts. They don’t get just a few parts, but 20 each of 64 different sizes of resistors and 10 each of 25 different sizes of capacitors, along with a microprocessor board and lots of other tools and parts. I don’t want their designs to be multiple-choice questions (“there are only 5 resistors in the kit—so one of them must be the right answer”).

Coming up with usable design exercises was hard—I tried lots of them at home, rejecting some as too hard, some as too easy, and tweaking others until they seemed feasible. I even designed three different custom printed circuit boards for the course: a board for pressure sensors, a hysteresis oscillator for soldering practice, and a prototyping board for their two instrumentation-amplifier projects. (pass boards around)

By the way, PC board design has gotten very cheap—I used free tools for doing the design, and the boards themselves cost only 50¢ to $1—it would have cost thousands to have done custom boards like this when I was first hired at UCSC.

Developing a hands-on course like this is not quick—creating the course took me almost 6 months of full-time effort!—so we’re probably not going to see huge numbers of such courses being started. But they’re worth it!

To make it somewhat easier for someone who wants to create a similar course, I posted all my notes on designing the course on my blog—over 100 blog posts before class even started! There are now around 240 posts (the URL is on the quarter-page handout, along with the URL for the course syllabus and lab assignments).

The course was prototyped last year as BME 194+194F “Group Tutorial” before being submitted to CEP for approval. Incidentally, I highly recommend prototyping before submitting the paperwork for new courses—there were a lot of changes that came out of the prototype run. For example, the lab time was increased from 3 hours to 6 hours a week.

That change has a high cost—not only am I spending over 10 hours a week of direct classroom and lab time, but I’m spending every weekend this quarter rewriting all the lab handouts—splitting the material between the lab times and adding at-home or in-class design exercises between the two parts. Even with the extra lab time, some labs ran over this quarter, so I’ve got still more tweaking to do for next year.

It isn’t just the design of a new course that is expensive—each time the course is offered takes a lot of faculty time. In addition to the 10 hours a week of direct contact, I have office hours, grading, prep time for both labs and lectures, and rewriting the lab handouts.  If I have 2 lab sections next year, I’ll have 16 hours a week of direct contact. Just providing feedback on the 5–10-page weekly design reports takes about 15 minutes per student per week (half an hour per report).

But enough about the circuits course.

The other course I want to talk about is one I created last quarter: a new freshman design seminar in conjunction with the student Biomedical Engineering Society. This course has no prereqs, is only 2 units, and does not count towards any major or campus requirements (it might get a “Collaborative Endeavor” gen-ed code).
I’d not taught a freshman class in over a decade, having taught mainly seniors and grad students, so I had no idea what skills and interests the students would bring to the class. With no prereqs for the course, I couldn’t assume that students had any relevant skills, though it turned out that all this year’s students had had biology, chemistry, and at least conceptual physics in high school.

Because I didn’t know what to expect, I didn’t choose the projects ahead of time, but tried to adapt the course on the fly to what the students could do and what they wanted to do.  (They wanted to do more than they could do in the time available, of course.)

I did try out three or four projects ahead of time, looking for design projects with a low entry barrier. But all the projects I tried assumed some computer programming skills, and only one student had ever done any computer programming—a big hole in California high school education.  Even more concerning for engineering majors is that only a few had any experience building anything. (AP physics classes were the most common exposure to building something.)

On the first-day survey the students indicated an interest in learning some programming and electronics, so we did a little programming with an Arduino microcontroller board—I’ll try to up that content next year, adding some more electronics.

The class started with generic design concepts using a photospectrometer as an example. The concepts include such basics as specifying design goals and constraints, dividing a problem into subproblems, interface specification, and iterative design. The photospectrometer turned out to be too complex and unfamiliar to students, and I’ll probably start with a simpler design (perhaps a colorimeter) next year, and have the students design, build, and program it before they start on their own projects.

One positive thing—the course had more women than men, and at the end of the course they indicated that the course had made them more likely to continue in engineering!

I could go on all afternoon about these courses, but I’m running out of time, so I’ll leave you with these take-away messages:

  • The value of University education is in doing things and getting detailed feedback from experts, not sitting in lectures.
  • Students should be solving real problems with multiple solutions, not fill-in-the-blank or multiple-choice toy exercises.
  • Hands-on courses require a lot of time from the professors, both to create and to run, and so they are expensive to offer.
  • Failure to teach such courses, though, makes a University education no longer worthy of the name.

2014 April 18

Voltage dividers, parallel impedance, scope probes

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

I started today’s class by having the students present what they had done on the homework I assigned at the end of class Wednesday.  The first part was a voltage divider with one resistor above the output and two in series below the output. Everyone got this, either by direct reasoning about the currents matching or by using the two-resistor voltage divider formula and that two resistors in series add.  The next problem was a little harder:

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

For this one we first had two non-solutions presented. One student tried using a simple voltage divider, and found the resistance for which some power supply would produce the desired outputs, but (unfortunately) the necessary power supply was not 5v. one student showed a use for the 3-resistor voltage divider, but got the values of the resistors wrong, so that a simple sanity check showed that the answer didn’t work. Another student came up with a circuit that “cheated” by assuming 2 more power supplies (at 1v and 2v). If he had known how to create such virtual power supplies, I would have given him credit, but he had no idea how to create them from the 5v supply. While that was being presented the student with the 3-resistor voltage divider, redid his arithmetic and got results that were almost ok (a percent or two off), so I had him present his method. The method set up the right equations, but his method for solving them was a bit messier and more complex than needed, so I showed the students how to set up the voltage divider equation as the inverse of current (R/V) being identical, and then solving the simple linear equations that resulted.

We next derived the formula for parallel resistances R= \frac{1}{\frac{1}{R_{1}}+\frac{1}{R_{2}}+\;\cdots\;+\frac{1}{R_{n}}}, using just Ohm’s Law and Kirchhoff’s  current law. I explained the concept of conductance, and gave them the rule of thumb: resistances add in series, conductances add in parallel.

I then talked a bit about scope probes and worked up to the following circuit:

Approximate circuit for my cheap 60MHz scope probes.

Approximate circuit for my cheap 60MHz scope probes.

Monday I’ll have to talk a little about electrodes and electrochemistry, but I also want students to do another voltage divider exercise in class—perhaps an RC one. Wednesday will be analysis of the data from the stainless-steel electrodes, and Friday will be a simple voltage divider and complex impedance quiz.

Next Page »

The Rubric Theme. Blog at


Get every new post delivered to your Inbox.

Join 251 other followers

%d bloggers like this: