Gas station without pumps

2014 June 12

Starting on book for circuits lab—scheduling labs

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

In Revised plan for circuits labs I provided a tentative schedule for the applied circuits course and lab, which I ended up not really following (dropping the FET measurements, moving the sampling lab after the loudspeaker lab, and swapping the order of the pressure sensor and the class-D amplifier).

I’m now trying to turn the course lab handouts into a book (which means adding everything that was previously just in lectures), and I’m trying to rearrange the lab schedule to fit better into the 10-week quarter and to flow a little better pedagogically.

In this post, I’ll ignore the lecture component, but just look at a possible reordering of the labs.  Squeezing the KL25Z soldering and both halves of the thermistor lab was too much, and the sampling and aliasing lab did not work well late in the quarter, so I’ll strip the filter design out of the sampling lab and simplify it a bit to get it in the first week, and move the thermistor lab fully to the second week.  I’ll have to squeeze somewhere else, and I think that the best bet is the hysteresis lab, which took far longer than it should have.  I still want to have data-analysis Wednesdays, and reports due on Fridays.

Tuesday week 1 Unpacking parts, labeling capacitor bags, using wire strippers, making clip leads, Soldering headers onto KL25Z boards, downloading data logger to KL25Z.See soldering instructions at Soldering headers on a Freedom board and Jameco soldering tips
Thursday week 1 Sampling and aliasing lab (no filter design)
Tuesday week 2 Measuring input resistance of multimeter, and of oscilloscope.
measuring thermistor resistance at many temperatures.
Thursday week 2 Measuring voltage of thermistor voltage divider, recording voltage vs. time.
Tuesday week 3 Measure I-vs-V DC characteristic of resistor and of electret mic, both with multimeter and with KL25Z board.
Thursday week 3 Look at mic with resistor load on oscilloscope (AC & DC coupling).  Filter design for AC coupling. Loudspeaker on function generator?
Tuesday week 4 Characterizing impedance of loudspeaker vs. frequency
Thursday week 4 Characterize hysteresis in Schmitt trigger chip using data logger. Breadboard hysteresis oscillator with various R and C values, measuring frequency or period (oscilloscope or frequency meter?).
Make and test touch sensor with breadboard oscillator. Solder hysteresis oscillator. Estimate capacitance of touch from change in period of hysteresis oscillator.
Tuesday week 5 Impedance of stainless steel (polarizing) electrodes in different NaCl concentrations (at several frequencies).
Thursday week 5 Impedance of Ag/AgCl (non-polarizing) electrodes in different NaCl concentrations (at several frequencies)
Tuesday week 6 Low-power single-stage audio amplifier with op amp
Thursday week 6 catchup day? characterizing photodiode or phototransistor?
Tuesday week 7 Pressure sensor day 1: design and soldering instrumentation amp prototype board
Thursday week 7 Pressure sensor day 2: further debugging.
Recording pressure pulses from blood-pressure cuff.
Tuesday week 8 Photodiode or phototransistor with single-stage simple transimpedance amplifier.
Freeform soldering to attach leads for fingertip transmission sensor.
Cut-and-try design for transimpedance gain needed to see reasonable signal without saturating amplifier. (Determine AC and DC components of current)
Thursday week 8 Fingertip pulse sensor with 2-stage amplifier and bandpass filtering.
Tuesday week 9 class D audio amplifier day 1(preamp and comparators) (problem with Memorial Day on Monday?)
Thursday week 9 class D audio amplifier day 2 (output stage)
Tuesday week 10 EKG day 1:  breadboard and debugging (confident students could go directly to soldering)
Thursday week 10 EKG day 2: soldering, debugging, and demo.  Last day for any catchup labs.

I’m not really comfortable with the class-D amplifier in the week with Memorial Day. I’ll have to double check when Memorial Day comes next year.

2014 May 2

Video of Designing Courses talk

Filed under: Circuits course,freshman design seminar — gasstationwithoutpumps @ 15:51
Tags: , ,

A week and a half ago, I gave a talk titled Designing Courses to Teach Design, after posting the text of the speech on this blog.  The talk went fairly well, though the time limit meant that I had to read the speech, which I’ve never done in 32 years of teaching.  It was kind of weird having a set speech to give, rather than extemporizing as I usually do.

The whole forum was videotaped and is available online (as a 784 Mbyte downloadable .mov file) from So you think your lecture course is better than a MOOC? April 23, 2014.

I was the second of six speakers and got some good questions.  Of the forum speakers, I think I liked Michael Chemers’s presentation best—he’s a theater teacher and has had more training in connecting with an audience than most faculty, but the content was good also.  (I don’t think the Prezi added much to his presentation, though.)

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.

UPDATE 2014 May 2: video available online (as a 784 Mbyte downloadable .mov file) from So you think your lecture course is better than a MOOC? April 23, 2014. I was the second of six speakers.

 

2014 April 13

Designing courses to teach design—draft 3

The talk I was scheduled to give last quarter (2014 Feb 24) was rescheduled, because two of the four speakers were unable to make that date.  It is now scheduled for Wed 2014 Apr 23  at 3:30 in the Merrill Cultural Center, which used to be the Merrill Dining Hall, before they consolidated dining halls in the east colleges. There are now 6 speakers in 90 minutes, which means 15 minutes each (maybe 10 minutes speaking, 5 minutes for questions).  I’ll have to run over from my class which ends at 3:10 on the opposite side of campus (0.6 miles, 13 minutes according to Google Maps), though running may be difficult along the crowded sidewalks between classes.

The talk needs to be updated from last quarter, as I have now taught prototype runs for both the applied circuits class and the freshman design class, and am in the second run of the applied circuits class.

Here is my current draft of the text—please give me some suggestions in the comments for improvement.  The ending seems particularly awkward to me, but I’m having trouble fixing it.

Designing Courses to Teach Design

I believe that the main value of a University education does not come from MOOCable mega-lecture courses, but from students working in their field and getting detailed feedback on that work. I’ll talk today about some courses I’ve created ths year and last to teach students to do engineering design. These courses are high-contact, hands-on courses—the antithesis of MOOC courses.

Design starts from goals and constraints: “what problem are you trying to solve?” and “what resources are available?” So what were my goals and constraints?

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

  1. students weren’t getting enough engineering design practice (and what they were getting was mostly in the senior year, which is much too late) and
  2. 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

  1. there was no room in the curriculum for adding required courses,
  2. there were no resources for new lab space or equipment, and
  3. all relevant engineering courses had huge prerequisite chains.

Furthermore, I would have to teach any new course myself, so the content had to be something I already knew or could learn quickly. Those constraints meant the new course would not have wet labs (though I have encouraged wet-lab faculty to add design exercises to their existing courses).

My first partial solution was to replace the required EE circuits course with a new Applied Circuits course. The existing EE101 course is a theory class (mostly applied math) 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. Due to “creeping prerequistism” in the 8 or 9 departments providing courses for the major, the bioengineering students were already taking far too many preparatory courses and far too few courses where they actually did things.

The goal of the new course is to have students design and build simple amplifiers to interface biosensors to computers. I chose a range of sensors from easy ones like thermistors, microphones, and phototransistors to ones more difficult to interface like EKG electrodes and strain-gauge pressure sensors. I’m not interested in cookbook, fill-in-the-blank labs—I want students to experience doing design in every lab, even the first one where they knew almost no electronics—and I want them to write detailed design reports on each lab, not fill-in-the-blank worksheets, like they get in chem and physics labs, and even intro EE labs.

The course was designed around the weekly design projects, not around preset 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.

Students used a free online textbook rather than buying one, but bought about $90 of tools and parts. I tried out every potential design exercise at home—rejecting some as too hard, some as too easy, and tweaking others until they seemed feasible. I designed and had fabricated three different printed circuit boards for the course (not counting two boards which I redesigned after testing the lab at home).  One of the PC boards is a prototyping board for students to solder their own amplifier designs for the pressure-sensor and EKG labs. (Pass boards around.)

Developing a hands-on course like this is not a trivial exercise. I spent about 6 months almost full time working on the course design (without course relief). I made over 100 blog posts about the design of the course before class even started, and I now have over 230 posts (the URL is on the quarter-page handout, along with the URL for the course syllabus and lab assignments).  Since the posts average a couple of pages, this is more writing than a textbook (though not nearly as organized).

The course was prototyped last year as BME 194+194F “Group Tutorial” before being submitted to CEP for approval, and I wrote up notes after each class or lab (another 60 or so blog posts). Last year’s prototyping lead me to increase the lab time from 3 hours to 6 hours a week, which means I’m spending a lot of time 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. Some of the fixes have worked well (students got comfortable plotting their data with gnuplot weeks earlier this year), but we’ve still run over time in some labs, even with 6 hours a week of lab, so more tweaking is needed.

This course is expensive in terms of professor time: I’m spending over 10 hours a week of direct classroom and lab time (not counting office hours, grading, prep time, or rewriting the lab handouts). Just providing feedback on the 5–10-page weekly design reports takes about 15 minutes per student per week (half an hour per report).

The students taking Applied Circuits last year were mostly seniors who had been avoiding EE 101, rather than the sophomores I’d intended the class for. This year, I have juniors and seniors, but still no sophomores. So the course still does not provide early exposure to engineering design, nor does it direct more students to the bioelectronics concentration rather than the biomolecular one (those there’s still hope for the latter).

My second partial solution was to create 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.

Unlike the Applied Circuits course, I didn’t choose the design projects for this course ahead of time, because I had no idea what skills and interests the students would bring to the class—I’d not taught a freshman class in over a decade, having taught mainly seniors and grad students. I did try out 3 or 4 design projects on my own to gauge the skills needed to do them, but those projects all assumed some computer programming skills.

I prototyped the freshman design course last quarter as BME 94F and have submitted course forms to CEP for approval. Once again, I blogged notes after each class meeting (only about 39 posts, though—this was a less intensive effort on my part).

With no prereqs, 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. Only one student had ever done any computer programming, though—a big hole in California high school education—and 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.

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

My third partial solution has been a complete overhaul of the bioengineering curriculum, which is currently before CEP for approval. No new courses were created for this overhaul, but all the concentrations were changed. For example, half the chemistry courses were removed from concentrations other than biomolecular, to make room for more courses in electronics, robotics, psychology, or computer science. And some the orphan math courses were removed from the biomolecular concentration to make room for more advanced biology. Long-term, I’m hoping to convince some of the other departments to remove excessive prerequisites, so that students can take more interesting and useful courses before their senior year.

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

  1. The value of University education is in detailed feedback from professors in labs and on written reports, not in the lectures.
  2. Students should be solving real problems with multiple solutions, not fill-in-the-blank or multiple-choice toy exercises.
  3. These courses require a lot of time from the professors, and so they are expensive to offer.
  4. Failure to teach such courses, though, makes the University education no longer worthy of the name.

For those of you not present—the quarter-page handout will have the URLs for this blog’s table of contents pages for the circuits course and the freshman design course, in addition to the two class web pages:

In addition to the quarter-page handout, I also plan to have copies of the prototyping board (both bare boards and ones that I used for testing out EKG or instrumentation amp circuits), one of the pressure sensors (on another PC board I designed), and the hysteresis oscillator boards.  If I can get it working again, I may also wear the blinky EKG while I’m talking.

Preparing this talk has been weird for me—I can’t remember ever having scripted out a talk to this level of detail.  For research talks, I usually spend many hours designing slides, and relying on the slides to trigger the appropriate talk. For classes, I usually think obsessively about the material for a day or two ahead of time, sometimes writing down a few key words to trigger my memory, but mainly giving an extemporaneous performance that relies heavily on audience participation. I had one memorable experience where a student asked me for a copy of my lecture notes after a class—I handed her the 1″ PostIt that had my notes, but warned her that I’d only covered the first word that day, and that it would take the rest of the week to cover the rest.

Doing this short a talk without slides and without time to rehearse will probably require me to read the talk—something else I’ve never done. (I know, I should have rehearsed during our one-week spring break, but I had a 2-day RNA research symposium, a faculty meeting about who we would offer our faculty slot to, meetings with grad students, and feverish rewriting of the first few lab handouts for the circuits course.)

2014 March 31

New modeling lab for electret microphone

Last year, in Mic modeling lab rethought, I designed the DC measurement of an electret microphone around the capabilities of the Arduino analog-to-digital converters:

Circuit for measuring DC characteristics of an electret microphone.  The four labeled nodes are connected to the Arduino.

Circuit for measuring DC characteristics of an electret microphone. The four labeled nodes are connected to the Arduino.

  • The highest voltage allowed is 5v and the lowest is 0v.
  • The resolution is only 10 bits (1024 steps).
  • The steps seem to be more uniformly spaced at the low end of the range than the high end (so differences at the high end are less accurate than differences at the low end).
  • The external reference voltage AREF must be at least 0.5v (this is not in the data sheet, but when I tried lower AREF voltages, the reading was always 1023).

Test fixture for measuring I-vs-V DC characteristics of electret microphone.

Test fixture for measuring I-vs-V DC characteristics of electret microphone.


This year we’ll be using the KL25Z boards, which have different constraints:

  • The highest voltage is 3.3v and the lowest is 0v.
  • The resolution is 16 bits (15 bits in differential mode).
  • Differential mode only works if you stay away from the power rails—clipping occurs if you get too close.
  • The external reference must be at least 1.13v.  With less than a 3-fold range for the external reference, varying the external reference to get different ranges seems rather limited.

I think I’ll still have the students start with using the multimeter and the bench power supply to measure voltage and current pairs for 1V to 10v in steps of 1v.  But then I’ll have them wire up a different test fixture. The resistor R2 is one that students will have to choose to get an appropriate measuring range. Resistors R3 and R4 keep the voltages for the differential measurements E20–E21 and E22–E23 away from the power rails. I tried using smaller values, but 200Ω was not enough—I still got clipping problems. So 63mV is too close to the rails, but 275mV seems fine.  I suspect that the limit is around 100mV to 150mV, but I did not try to narrow it down.

I found that the differential measurements had less noise than single-ended measurements, despite having a resolution of about 100µV rather than the 50µV of single-ended measurements. Doing 32× hardware averaging also helped keep the noise down. (Note: the data sheet for the KL25 chip does claim a higher effective number of bits for differential measurement than for single-ended measurement, perhaps because of reduction in common-mode noise.)

I was able to get fairly clean measurements with just two different resistor sizes, to which I fit 4 different models:

  • linear resistance: I = V /R
  • constant current I = I_{sat}
  • blended: I = V/ \sqrt{ R^2 + (V/I_{sat})^2)}
  • blended with exponent: I = V/ \sqrt{ R^2 + (V^p/I_{sat})^2)}

 

    The blended fit with the extra exponent on voltage does a pretty good job of fitting over the full range (it looks good on a log-log scale also)

The blended fit with the extra exponent on voltage does a pretty good job of fitting over the full range (it looks good on a log-log scale also)

Because of the large characters used for the data points, the lines look fat, but the noise level is fairly small—about ±300µV Some of that may be due to the movement of the potentiometer, as the voltage and current aren’t measured at precisely the same time, but I suspect most is electrical noise in the processor itself.

Next Page »

The Rubric Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 276 other followers

%d bloggers like this: