Gas station without pumps

2016 April 28

Revised microphone pre-amp lab too long

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

How many of my posts have the theme “lab too long”? (answer: too many)

I spent 10 hours in the instructional lab on Tuesday and 11 hours today (Thursday) helping students do the microphone pre-amp lab, and my group tutor is going to have to open the lab on Sunday for several students to finish soldering and testing their boards.

This means that the lab is between 1.5–2× longer than it should be.  You’d think that I would be able to predict the length of a lab better by my fourth year of teaching this course!

What went wrong, and how can I fix it for next year?

  • The design is somewhat harder for the first op-amp lab than in previous years, because I made a decision to do all the op-amp labs this year with a single power supply, not dual supplies.  That makes for a slightly more difficult start, but students don’t have to make the transition from dual supplies (which are getting quite rare these days) to single supplies. The transition is a surprisingly hard one for students to make, as the simplification that they learned for the case when the reference voltage is zero no longer apply, and they have to learn everything over again.  Learning the more general form first will, I believe, result in less confusion in the long run, but it does make for a slightly more complex first project.
  • This year I’m having students solder their pre-amp boards, so that they can re-use them as part of their class-D power amplifier in three weeks.  This was a deliberate choice, to reduce the amount of effort in the class-D lab, which was running too long in previous years, but it roughly doubled the time it took students to finish the lab.
  • Because students had larger ceramic capacitors this year, and I had them set the high-pass cutoff frequency near their speaker resonances, some students opted to use very large capacitors and small resistors for their high-pass filters. This made a very small impedance in the passband, and attenuated the signal from the microphone and its large-impedance biasing resistor.
    I’ll have to put a warning in the book about the high-pass filter needing to have a larger impedance than the bias resistor, to avoid changing the current-to-voltage conversion.
  • Some students had the opposite problem, putting a small capacitor with a very large resistor, so that there was a very high impedance signal driving the input to the amplifier. Since we are using op amps with tiny bias currents, this is not a problem for the circuit’s functioning, but it made looking at the signals with the oscilloscope difficult—increasing the difficulty of debugging.
  • Many students were surprised to see that the output voltage was not centered at their Vref voltage.  This provided a teaching moment for looking at the MCP6004 data sheet and explaining the notion of the input offset voltage. Because they were using gains of 100×–300×, the ±4.5mV offset became an output offset of ±0.45V–1.35V, sometimes resulting in serious clipping.  I need to warn students about that imperfection of op amps before they do the design.  A better design would use a multi-stage amplifier, with high-pass filters between stages to get rid of accumulated DC offset.
  • I suggested to several students that they look at Vout vs. Vin, by recording a slow sine wave (say 300Hz) at 5kHz sampling with PteroDAQ.  This turned out to have some interesting effects when students used 32× averaging, because the time delay between the two channels was enough to get the signals far enough out of phase to open up the plot into an ellipse. Again, I’ll need to talk about that in class tomorrow.
  • Lots of students made the mistake of incorrectly applying Ohm’s Law and getting too large a bias resistor, so that their microphones were not in saturation at the power-supply voltage of 3.3V.  Luckily, increasing the voltage to 5V (as we will do in the power-amp lab) will rescue their designs.
  • Lots of students made the standard mistakes of skipping a wire or two, or putting a wire in the wrong hole while soldering, but a surprisingly large number connected both nodes for a resistor to the same end of a resistor, leaving the other end unconnected.  I’ve not seen that mistake before, so I don’t know what triggered it.
  • The lead-free solder we have to work with this year (99.3% Sn, 0.7% Cu) is a pain to work with—it doesn’t tin the soldering irons well, and it is difficult to remove from the boards in the event of a mistake.

I think that the soldering lab should not be the first op-amp lab, but I still like the idea of the students having to solder up their microphone preamps. So I’ll have to do a major reorganization of the book this summer, to move a different lab into the first position.

Currently, I’m thinking that the transimpedance amplifier and pulse monitor lab would be a good choice as the first op-amp lab.  It would be a bit unusual to start with a transimpedance amplifier rather than a standard voltage amplifier, but the transimpedance amplifier is actually conceptually simpler.  Unfortunately, the pulse monitor using a transimpedance amplifier really needs to be 2 stages, with a transimpedance amplifier to bias the phototransistor, a high-pass filter, and an AC gain stage.  (Yes, I know I’ve posted about pulse monitors without amplifiers, but a major point of the lab is to teach about transimpedance amplifiers.)

The corner frequencies for the pulse monitor are really low, requiring big resistors even with their biggest capacitors, so the “too small a resistor” problem goes away, though not the “too big a resistor” problem.

By making the microphone preamp the second, or even third, op amp lab, students will spend less time on getting a breadboarded design working, and more time on learning to lay out and solder their circuits. They’ll also be much more amenable to a 2-stage design, to reduce the output offset voltage.  I think that rearranging the labs may be worth the effort it will take to rewrite the corresponding chapters of the book, but undoubtedly something else will go wrong next year, and I’ll have to do yet another major revision.

Ah well, at least I’ve gotten the demo for tomorrow’s class (blood and breath pressure) working tonight, and I’ll be able to get to bed before midnight.

2015 March 31

First lab for Spring

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

I had a very long day today (as I expect all Tuesdays and Thursdays to be this quarter).  It started out with me in a panic, because I had gotten a message late yesterday afternoon, telling me that the parts kits for the course were not ready yet, but not telling me what was available, so I didn’t know whether I’d be able to run today’s lab or not. I thought I probably would be able to do the essential parts, because the main part of the lab was soldering headers onto the KL25Z boards, and the boards and headers were ordered from Digi-key, which has very fast delivery (thanks to their almost instant packing of parts for shipping and their using the post office rather than FedEx, which has been unbelievably slow this year).

I went into work a bit early this morning to check on what parts were available (after a night of thinking about what labs I could do if the KL25Z boards were not available—pretty much only the thermistor lab scheduled for next Tuesday, and that takes about an hour of setup to prepare the lab and have hot water and ice water available).  As it turns out, the person who had informed me of the incomplete parts list had sent out a spread sheet with the information—he’d just forgotten to CC me on it. The KL25Z boards, the headers, and the USB cables were all available, so we could do the main part of the lab.  We couldn’t do the unpacking of the parts kit and identifying parts, but that can happen later, as the parts come in.

For Thursday’s lab, it would be good if they had their breadboards, resistor kits, and electrolytic capacitors—but I don’t know whether those will all be ready by then (the resistor kits haven’t all arrived yet).

Once the boards arrived, I started part of the class soldering (we only had 6 soldering stations, two of which were not very functional, despite my request 2 years ago for enough soldering irons for the 12 benches).  While some were soldering, the rest were downloading the PteroDAQ software and trying to get it to work on their machines.

The soldering went well, with one serious exception.  One student soldered in the connectors on the wrong side of the board, and neither the group tutor nor I noticed in time (and we could have, because we had looked at the board and just not noticed). We helped remove the connectors (removing a 2×10 female header from a board is a lot of work), but the student did not have enough time to get all the connectors replaced by the end of lab.  The tutor will provide some supervision at another time before Thursday’s lab to finish up.  All the solder joints looked clean—I saw neither bridges nor voids.  I did send several students back (more than once) to reheat cold-solder joints, but in the end all the students had good connections.  Since only 2 or 3 of the 32 students had ever held a soldering iron before, I think that getting each to make 64 good solder connections is a pretty positive outcome.  They’ll have 3 more labs this quarter where they will have to solder (their own designs, not just headers), but I think that they’ll approach those labs with more confidence now.

The PteroDAQ downloads were not quite as successful.  I think that everyone managed to get the MBED.ORG download software installed, and transferred the daq_kl25z.bin executables to the KL25Z boards. Most (all?) got PteroDAQ working with the lab computers. But few, it any got PteroDAQ working on their own machines.  There were three classes of problems:

  • On Windows 7 machines, I forgot how to use the mbed-usb-windows.inf files to install Windows drivers for the USB port on the KL25Z board. I looked it up after class before going home and found a page about installing Windows drivers for Arduino boards that seems to have all the right instructions (but use the .inf file in the PteroDAQ extras directory, not arduino.inf): http://arduino.cc/en/guide/windows#toc4
  • On Windows 8 machines, I don’t know whether the same approach will work, but I hope that some of the students will try. The approach given in the MBED handbook did not seem to work, but I’m not very comfortable with Windows, so I may have missed something obvious to a serious Windows user.
  • On Mac OX 10 machines, we had two problems:
    1. OS 10.10, 10.10.1, and 10.10.2 were not willing to write to the MBED device. This seems to be a known problem that the MBED user community is pretty upset about. The MBED developers have been working (slowly) on the bug since last October, with patches for only a few of their many supported boards (not, so far as I can see, the KL25Z).  There are claims on the developer forum about the bug that OS X 10.10.3 beta finally fixes the bug, but no one in their right mind would suggest that students install Apple beta code on a machine that they plan to use for anything. A student was going to enter an “issue” ticket on the PteroDAQ website, but it doesn’t seem to be there yet.
    2. If the Windows 7 machines in the lab were used to put the daq_kl25z.bin onto the boards, then OS 10.10 seemed to work ok (a student got it running), but OS 10.10.1 and 10.10.2 machines failed.  The problem seemed to be with Tkinter: the selection of the port for the KL25Z was not sticky—it deselected itself within a second of being selected. Some of the students had freshly downloaded versions of Python 3.4, so the problem doesn’t seem to be with old code, though I suppose a Tcl/Tk incompatibility with Python is possible—I didn’t have any of the students try re-installing Tcl.  I hope that a student with an OS 10.10.1 or 10.10.2 machine will post an issue ticket about this issue on the PteroDAQ website also.

    I’m now very glad that I did not “upgrade” my old OS 10.6.8 Mac to 10.10 on my 2009 MacBook Pro—it seems that I would have broken many of the things that I rely on my Mac for. Perhaps I’ll wait until I get new a new laptop before “upgrading”—and I won’t buy a new Apple as long as they don’t work with MBED, even though my current laptop has a very sick battery and is beginning to show its age. (I have no intention of buying a MacBook with only one USB-C port, either: I routinely use the power cable, the ethernet port, the firewire port, the display port, both USB ports, and the SD card port, and often use three or four of these at once.)

It would be really nice to have installation instructions with PteroDAQ—I forgot some steps of how to do the installation on Windows (the driver installation), and it would be nice to have a written description of the steps for a Mac that I could just point students to, rather than walking them through it.

I set up a mailing list for the class this evening, and I hope that students who manage to get PteroDAQ working on Windows 8 or OS 10.10.1 or 10.10.2 will share the information.

2014 April 17

Hysteresis lab ended well

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.

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.

2013 January 31

First soldering lab went fairly well

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

Today’s lab, the hysteresis oscillator lab, went fairly well, though it needs a bit of tweaking for next year.  There were three parts to the lab: finding the upper and lower threshold voltages of the 74HC14N Schmitt-trigger chip, choosing a resistor and capacitor for the relaxation oscillator and testing it on the breadboard, then soldering the circuit and demonstrating it working as a capacitance touch sensor.

The first part, finding the threshold voltages, took longer than I expected.  Students needed more help than I thought they would in setting up a circuit to determine the thresholds—not unreasonably more, but I was a little over-optimistic about how independent they would be at this point.   I think I should provide a bit more support for the threshold measurements in the lab handout, and allow a bit more time for it. Using a bench power supply to provide the input voltage confused them and did not really save much time compared to setting up a pot from the 5V supply, as they did for the microphone characterization.

The hysteresis oscillator was the main design challenge, deepening their understanding of RC timing.  They had the circuit for the oscillator (though I should switch to using a CircuitLab circuit, since the Eagle one for the board was too confusing with the extra symbols for off-board connectors and extra holes).  All they needed to do was to pick appropriate resistor and capacitor values and wire it up.  There was one constraint and one design goal.

constraint
the low pulse width has to be between 20µsec and 1 msec
goal
the low pulse width has to increase by 40% or more when the capacitive touch sensor is touched

For the pre-lab students were supposed to have computed the approximate increase in capacitance of the touch sensor  they made (Al foil covered with a layer of packing tape) when touched by a finger, but many were scrambling to do it during lab, which increased the lab time. I did not tell students whether they had gotten the value right, nor whether their resistor and capacitor values were reasonable. Instead, I told them what my Dad always said, “Try it and see!” [I need to make a poster for that!] In fact, some students appeared to have calculated the capacitance close enough, while others messed up their units and were off by a factor of 100–1000.  I hope that in their design reports, they provide both the corrected estimates and what they did with the initial mis-calculation.

I did do a 5-minute mini-lecture when one of the students was stumped because he couldn’t find a formula to compute the resistance and capacitance, and several other seemed similarly stuck but were too nervous to say so.  I had a mini-tirade about how the course wasn’t about finding the right formula, but about thinking through problems with the tiny set of  formulas on the study sheet they’d gotten the day before.  Then I calmed down and stepped them through a series of questions to show them how to think about the problem:  the goal was to pick R and C to get the right low pulse width.  What was the capacitor doing when the output was low?  About what voltage did it have? About what current was there?  How much charge had to be removed from the capacitor to get it from one threshold to the other?  How long would that take with that current?  I did say that they could use the proper exponential decay formula if they wanted, but that we only needed crude approximations, so a constant-current approximation was good enough.

One of the beauties of the Schmitt trigger oscillator is that it will oscillate over a huge range of resistor and capacitor values, so even if the students were way off in their component values, the circuit would still oscillate, once they wired it up correctly.  A lot of them are still rather careless about converting schematics to wires on the board, and fixing wiring errors was a big part of their debugging time.  Several still had the wires in place from the hysteresis voltage measurement, which really interfered with the oscillator.  When the oscillations were visible on the scope, I  had them touch their capacitive sensors to see how much the pulse width changed.  Most of the students who had mis-computed the capacitance of the touch found almost no change when the sensor was touched, but (with only a little hinting) could figure out that this meant they had used too large a capacitor and tried again with a much smaller one.  (I’m so glad I had them buy a large assortment of capacitors, so that they didn’t get strong hints about the “right” values from what was in the parts kit.)

Once they had an oscillator that responded to touch with a large change in period, I had the students estimate the low pulse widths from the scope display.  Many found that they were not in spec for the pulse width, so had to change their resistor values.  I think that this exploration of the design space is a valuable aspect of this lab, so I actually am pleased that students did not immediately get the “right” answers.  I hope that some students recorded the low pulse widths with and without the sensor touched, and use it to compute a better estimate of the capacitance of the touch.  (If they didn’t, that is a quick addition to the lab that they could do Monday after class, since it only requires the oscillator board, an oscilloscope, and a 5V power supply—they don’t even need the Arduino.)

Once they had the oscillator working, I had them connect up to the Arduino boards, downloading the following code that I had written for them:

// Capacitive sensor switch
// Sun 2013 Jan 27 15:23 Kevin Karplus

// To use, connect the output of the hysteresis oscillator to
// pin CAP_PIN (default is digital pin 2) on the Arduino.
// The code turns on the LED on pin 13 when a touch is sensed.

// The Arduino measures the width of one LOW pulse on pin CAP_PIN.
// The LED is turned on if the pulse width is more than high_pulse_usec
// The LED is turned off if the pulse width is less than low_pulse_usec
// The LED state is unchanged if the pulse width is between these

// pin that oscillator output connected to
#define CAP_PIN (2)

// Two thresholds for detecting touch by change in period of oscillator
// The initial values here are not used---the values are automatically
// set when the Arduino is reset.
// The sensor should not be touched until the LED is flashed 3 times,
// to indicate that the automatic sensing is done.
static uint16_t low_pulse_usec=40;
static uint16_t high_pulse_usec=50;

void setup(void)
{
    pinMode(CAP_PIN,INPUT);
    pinMode(13, OUTPUT);
    digitalWrite(13, 0);

    // Assuming that the touch sensor is not touched when resetting,
    // find the maximum typical value for untouched sensor,
    // and use this for the lower threshold.
    low_pulse_usec=1;
    uint32_t start_time=millis();
    while (millis()-start_time < 300)
    {   uint32_t pulse=pulseIn(CAP_PIN,LOW);
        if (pulse>low_pulse_usec)
	    {    low_pulse_usec =pulse;
	    }
    }
    low_pulse_usec += 1;	// add some room for noise

    // Set the high threshold for detecting the pulse at 20% longer low time
    high_pulse_usec = 12*low_pulse_usec/10;

    // flash the LED three times to indicate that the board is ready
    digitalWrite(13, 0);
    delay(100);
    digitalWrite(13, 1);
    delay(100);
    digitalWrite(13, 0);
    delay(100);
    digitalWrite(13, 1);
    delay(100);
    digitalWrite(13, 0);
    delay(100);
    digitalWrite(13, 1);
    delay(100);
    digitalWrite(13, 0);
    delay(100);
}

void loop(void)
{
    // Measure the pulse width from the hysteresis oscillator
    uint32_t pulse_width= pulseIn(CAP_PIN,LOW);

    if (pulse_width>= high_pulse_usec)
    {   // pulse is long enough to turn LED on
    	digitalWrite(13, 1);
    	// wait, to make sure LED stays on for 1/5 second
        delay(200);
    }
    else if (pulse_width<= low_pulse_usec)
    {   // pulse is short enough to turn LED off
    	digitalWrite(13,0);
    	// wait, to make sure LED stays off for 1/5 second
        delay(200);
    }
}

Most students had no trouble getting this code to turn an LED on and off from their capacitance touch sensor. A few students had trouble with poor wire connections to the Arduino headers. The 24-gauge wire that is provided in the lab is really too fine a gauge—a 22-gauge wire would work better. I think I may want to mention the flexible wire jumpers that I use for connecting off a breadboard (I prefer short solid wires on the breadboard, but flexible wires for off-breadboard connections). There are lots of hobbyist electronics places that sell the jumper wires (for as low as $4.32 for 65 jumpers ordered from China or $5.50 for 75 shipped from California by wosang). They aren’t really needed for the course, so I didn’t include them in the parts kit, but they do make connection to the Arduino a bit easier.

My co-instructor gave a brief tutorial on soldering, which included having students melt solder on scraps of copper-covered PC boards (blanks, not etched) to see the flow when the solder is hot enough.

The students were all showing me their solder joints after soldering up the boards, and most were ok, though I had to send a few back for reheating the cold solder joints. One student who was in a hurry had to reheat his solder joints twice, because they were cold both times, and the oscillator did not work. After the second time, he heated the joints enough and the board worked beautifully. (He was late for his next class, though.) A couple of student had gotten solder blobs into vias that they needed to put components through. In one case, we were able to clear it fairly easily with a solder sucker, but in the other case, the via and attached trace delaminated from the board by the time the hole was cleared. It is probably easier for the student to start over with a new board (I ordered lots of extras of this board), rather than try a complicated repair. Only one student soldered the 14-pin DIP in backwards. While it is possible to unsolder the chip and turn it around, that’s a real pain and it will be faster to start over with a new board and a new chip—the 50¢ board and 30¢ chip are not worth trying to salvage. The 60¢ screw terminal probably is worth removing—not for the part value but for the desoldering practice, since it is pretty easy to remove and reuse.

Overall, the soldering went fairly well for a group of students who had never held a soldering iron in their lives. A few students did not get the soldering finished, but will come in over the weekend (supervised by the undergrad group tutor) or after class on Monday (supervised by me). There will be two more soldering projects later this quarter, after which the students will be as good as most hobbyists at through-hole soldering (I’m not going to try surface-mount soldering with them!)

I’m not sure where best to break this lab in two next year. There are really three distinct parts: determining the hysteresis voltages, designing the relaxation oscillator, and soldering the oscillator (perhaps plotting out the full Vout vs. Vin transfer characteristic). I think it could profitably be broken into three shorter labs, spending a bit more time on characterizing the 74HC14N, then having a day to think about the RC values before coming back to the lab, then having a separate day just doing the soldering.

Overall, I think that the students are beginning to get the idea of the course, and starting to have some fun with the labs. I definitely need more time for the labs next year—I was in the lab from 2 to 7 today, and that is too long a stretch at once. I’m beginning to think that I’ll need to have three days a week of lab and only two of lecture.

2012 October 23

Rethinking the pressure sensor lab

I’ve had several posts now relating to building a shaker table and putting together a pressure sensor lab project for the circuits course:

  1. Pressure sensing lab possibilities
  2. PC board for pressure sensor
  3. Characterizing tactile transducer
  4. Characterizing tactile transducer again
  5. New amplifier and shaker table
  6. Good and bad news for circuit course
  7. Pressure sensor assembly
  8. Pressure sensor miswired
  9. Pressure sensor noise problems

I’m beginning to think that this lab, as I originally envisioned it, is both too much work to set up and too much work for the students. It was also beginning to look like a major spill hazard (much more so than the thermistor lab or the electrode characterization lab).

I want to back off now and see whether there is a lab that fits better into the course and is less trouble both for me and for the students.  Let’s look at the different parts of the lab, and see which are the most important—discarding the parts that are more trouble than they are worth.

  • Building an audio amplifier (op amp plus one discrete transistor) to drive shaker table.
  • Building an instrumentation amplifier with gain in the range 500–2000 to read strain-gauge bridge pressure sensor.
  • Calibrating pressure sensor with a water column.
  • Inducing pressure waves in water with shaker table, and measuring with pressure sensor.
  • Making measurements at two ends of a flexible hose to try to characterize water in hose using the hydraulic analogy.

I like the idea of having students build an audio amplifier.  In fact, we were planning a simple amplifier in an earlier lab, so extending it to drive more current than the op amp chip can source is a good one.  But we don’t need to build a shaker table for that—we can buy cheap 4Ω or 8Ω speakers and have them build amplifiers for the speakers.

I definitely like the idea of having the students learn about strain gauges and build an instrumentation amplifier for them.  The $5 MPX2300DT1 pressure sensor is a good example of a strain-gauge bridge (with temperature compensation).  We could go with the uncompensated MPX53DP for $7.80, the $8 MPXV53GC7U or the $11 temperature compensated MPX2053DP.  I rather like the sturdier “unibody” packaging for the differential pressure sensors (the DP suffix), and we could attach a hose to them directly, since they have barbed ports (which look like they are designed for 3/16″ ID tubing).  I’d still want a breakout board with screw terminals for the sensor, but assembling it would be easier, since the sensor can be soldered as a through-hole component and  screwed to the PC board, eliminating the gluing I needed for the MPX2300DT1.

I’m currently leaning towards a simpler (and cheaper) setup—eliminating the shaker table, the ¾” PVC plug, and the PVC water reservoir, and just having an MPX2053DP (or even MPX53DP) pressure sensor on a breakout board.  This would discard the hydraulic analogy part of the lab, but students would still build an instrumentation amplifier, characterize the pressure with a water column (easily measured as the height of water in clear tubing), and use the pressure sensor to measure breath pressure (inhalation and exhalation).

The maximum pressure of human breath is about 25kPa or 100″ H2O, so the ±50kPa range of the differential sensor should be plenty. The MPX2053 sensor is spec’ed at 800µV/kPa with a 10V power supply, so with a 5V supply it would provide 400µV/kPa.  We probably want a 0–5V output for a -25kPa to +25kPa input, so an amplifier gain of 250 is called for.  That’s a bit less touchy than the gain of 1000 I  used with the MPX2300DT1, but will still be good warmup for the EKG amplifier (which needs higher gain and has to use two stages to avoid saturating from small DC offsets in the first stage).

The uncompensated MPX53DP is spec’ed at 1.2mV/kPa at 3v (2mV/kPa at 5V), so less gain would be needed for the uncompensated part.  If you don’t need temperature correction, then the cheaper part gives you greater sensitivity. I’ll have to think about which would be pedagogically more useful—currently I lean towards the temperature-compensated part, as a concept that they should learn and because it forces them to make a higher gain amplifier.

Building the instrumentation amp and making breath pressure measurements should only take one 3-hour lab period, rather than two, so if I go with this design, I’ll need to come up with another lab.  Perhaps a second audio amplifier lab, with an output transistor and some filtering would be a good lab to insert I have to decide whether that should be a soldering lab or a breadboard lab.  I think that the two instrumentation labs (pressure sensor and EKG) should be done by soldering on a PC board, but I’m not sure the instrumentation amps should be their first soldering projects.

« Previous PageNext Page »

%d bloggers like this: