Gas station without pumps

2015 March 18

Freshman design projects moderately successful

I just finished grading this year’s freshman design projects. I think that the projects were more successful this year than last year, in part because I kept the students focussed on electronics and programming (for which they had lab access and which I could help them debug), and in part because the projects were somewhat less ambitious.

There were two groups doing EKGs and 4 groups doing blood pressure meters.  Both EKG groups managed to demonstrate their projects working, as did one of the blood-pressure groups.  (I’m being fairly generous here about what “working” means—they had to get their electronics to work, capture the data, and plot the waveforms, but further interpretation or software was not required.)  The other three blood pressure groups did not manage to demonstrate their projects, but one of them managed to plot waveforms for the pressure measurements (without getting their high-pass filter and amplifier working for the pulse measurements).

Some things I learned for next year:

  • Tell the students what op amp to get.  A number of students picked op amps that turned out to be rather old-fashioned ones with very low input impedance (as low as 2MΩ), rather limited output ranges, and external nulling circuits. The cheap MCP6002 or MCP6004 chips would have worked better at lower cost.  In fact, I gave one group that seemed to have a good schematic (but couldn’t get their circuit to work) an MCP6002 chip, which they wired in place of the op amp they had been using, and their circuit worked immediately.  I would have done the same for other groups, but the others with poorly chosen op amps were about a week behind and did not have circuits that were that close to being functional.
  • Warn students sooner not to use FedEx.  My son’s and my experience with FedEx this year has been that they are ludicrously slow. At least one group was burned by a ridiculously long delivery time, having ordered with FedEx delivery just hours before I warned the class about them.  (The US Post Office is faster and cheaper for lightweight electronics orders from Digi-Key.)
  • Students who never ask questions in class probably don’t understand much that is going on—all the groups that successfully demonstrated their projects had at least one active participant in class.
  • Students who fail to turn in their progress report are almost certainly not going to complete the project on time—I need to be more assertive in getting them moving and demanding that they show me their schematics.  Almost everyone had errors in their schematics on their first design (and one of the successful groups went through 4 incorrect designs before getting to one that worked).  Students that are afraid to show me incorrect or incomplete work don’t get the feedback they need to correct the problems—I need to normalize errors more and insist on seeing stuff, even if it is wrong.
  • The MXP5050DP pressure sensors are very easy for students to use, though a bit pricey at $16 each.  The built-in amplifier makes doing pressure measurements with an Arduino fairly trivial (hook up the three wires of the sensor to A0, +5V, and GND).  They were a good choice for the freshman design seminar, though I’ll continue to use MPX2053DP sensors without an integrated amplifier for the applied circuits class—that assignment is intended to get students to design with an instrumentation amp and to understand a bit about strain gauges.
  • Get the students to plot stuff earlier in the quarter. One group tried installing gnuplot on a Mac in the lab in the last few hours, which did not go well for them.  They did eventually find a plotting program that they could install and run, but then did not have time to run the data they collected through the filtering program I’d written for the class.  Their signals were pretty clean, though, and the plots they produced were good even with just the RC high-pass filter in their amplifier, without digital filtering.
  • The students seemed (for the most part) pretty excited about the projects—even those whose projects didn’t quite work seem to have gotten a lot out of the lab times.  I should look in a couple of years to see how many have stuck with engineering majors (I suspect that some might switch to computer science or computer engineering, rather than sticking with bioengineering, but that’s ok).

2014 June 1

Blood pressure monitor

I thought of a new variant on the pressure sensor lab for the circuits course: a blood pressure monitor.  I happen to have a home blood pressure monitor with a cuff and squeeze bulb that can be detached from the monitor and hooked up to the MPS2053 pressure sensor instead.  With this setup and an instrumentation amp, I can easily record the pressure in the cuff and observe the oscillations in the cuff pressure that are used for oscillometric blood pressure measurement.

Cuff pressure measurements using an MPX2053DP sensor, and instrumentation amp, and a KL25Z microcontroller board running PteroDAQ software.

Cuff pressure measurements using an MPX2053DP sensor, and instrumentation amp, and a KL25Z microcontroller board running PteroDAQ software.

The fluctuations can be observed by removing a baseline (fitting an exponential decay to the dropping pressure, for example, and the subtracting it out) or by using some sort of digital filter. I tried using a 0.3Hz–6Hz bandpass filter (4th order Bessel filter, applied using scipy.signal.filtfilt):

Oscillations corresponding to the pulse are very visible when the slow pressure decay is filtered out.  I've zoomed in on just the time of the dropping pressure, marked with lines on the previous plot.

Oscillations corresponding to the pulse are very visible when the slow pressure decay is filtered out. I’ve zoomed in on just the time of the dropping pressure, marked with lines on the previous plot.

The pulse is very easy to see (about 40.4bpm in this sample—low even for me), but figuring out the systolic and diastolic pressure from the fluctuations is a bit messy:

The oscillometric method of measuring blood pressure with an automated cuff yields valid estimates of mean pressure but questionable estimates of systolic and diastolic pressures. Existing algorithms are sensitive to differences in pulse pressure and artery stiffness. Some are closely guarded trade secrets. Accurate extraction of systolic and diastolic pressures from the envelope of cuff pressure oscillations remains an open problem in biomedical engineering.  
[Charles F Babbs, Oscillometric measurement of systolic and diastolic blood pressures validated in a physiologic mathematical model, BioMedical Engineering OnLine 2012, 11:56 doi:10.1186/1475-925X-11-56 http://www.biomedical-engineering-online.com/content/11/1/56]

One shortcut is to find the maximum amplitude of the envelope of the oscillations, and look at the pressures at fractions of the amplitude:

However, it has been shown that the pressure, Pm, at which the oscillations have the maximum amplitude, Am, is the mean arterial pressure (MAP). Empirical and theoretical work has shown that the systolic and diastolic pressures, Ps and Pd respectively, occur when the amplitudes of oscillation, As and Ad respectively, are a certain fraction of Am:

  • Ps is the pressure above Pm at which As/Am = 0.55
  • Pd is the pressure below Pm at which Ad/Am = 0.85

[Dr. Neil Townsend, Medical Electronics, Michaelmas Term, 2001, http://makezine.com/go/obpm]

I’m too lazy right now to try to come up with a good envelope follower and find the times for 55% and 85% of peak. The peak seems to be around 48.3s in this plot with magnitude of 0.336kPa and a predicted MAP of 16.28kPa (122mm Hg).  I based the MAP on low-pass filtering the signal to remove the fluctuations and make a good smooth curve for finding the systolic and diastolic pressure, once times on the envelope are picked.  Again, a 4th order Bessel filter applied with filtfilt looks good:

Low-pass filtering removes the fluctuations, so that picking two time points can give clean pressure readings for the systolic and diastolic pressure.

Low-pass filtering removes the fluctuations, so that picking two time points can give clean pressure readings for the systolic and diastolic pressure.

From the standpoint of the course, the filtering to get a good signal is probably too difficult, but students could record the cuff pressure and observe the fluctuations. They might even be able to do some crude RC filtering, though this is really an application that calls out for digital filtering.

%d bloggers like this: