Gas station without pumps

2022 November 17

Holter monitor results

I got back the results from wearing the Holter monitor for 14 days today, and they were not what I expected.  I was expecting to see frequent PVCs, particularly when I was resting or sleeping. Instead the report had almost no PVCs but frequent PACs (premature atrial contractions) with runs of supraventricular tachycardia (runs of more than 3 PACs without normal beats in between).  “Isolated SVEs [supraventricular ectopy] were frequent (10.3%, 114645).” “2161 Supraventricular Tachycardia runs occurred, the run with the fastest interval lasting 6 beats with a max rate of 176 bpm, the longest lasting 26.7 secs with an avg rate of 133 bpm.”

Asymptomatic PACs (like asymptomatic PVCs) do not generally call for any treatment, but “many idiopathic PACs are relatively benign in the short term, although they can be associated with an increased risk of cardiac and all-cause mortality if they occur frequently.” [https://www.ncbi.nlm.nih.gov/books/NBK559204/] Most of the medical treatments seem to be focussed on lowering heart rate or blood pressure, neither of which seem appropriate for me (I have normal blood pressure and a low heart rate). The followup recommended for frequent PACs is an echo cardiogram, which I have now scheduled for mid-January (the soonest date that the clinic had available).

My sinus heart rate was about what I expected with “a min HR of 36 bpm, max HR of 160 bpm, and avg HR of 55 bpm”, though the 36 bpm minimum was a little lower than the 40bpm I expected—my sinus rate drops a little lower when I sleep than I expected. The recording of the 36bpm period does not look like my normal sinus rhythm—it looks like a series of ectopic beats with really tiny QRS complexes to me, but it did occur when I was asleep (in the middle of a period of very low heart rate). On another day, there was a recording of 37 bpm which showed normal QRS complexes, so my sinus rate does indeed drop that low.

The max of 160 bpm occurred when I was exercising fairly hard—pushing myself a bit on bicycling uphill to campus.  It is probably not my real maximum heart rate (I was not doing an all-out effort).  I looked up estimates of maximum heart rate and found three formulas: (220 – age), (207 – 0.7 age), and (211 – 0.64 age).  The first is very common, but clearly wrong for me, the second is adjusted for people over 40 years old and pretty accurately matches the observed maximum on the Holter monitor, and the third is adjusted for active people and may slightly overestimate my max heart rate.  If I ever need to take a stress ECG or stress echocardiogram, I’ll argue for them using the second formula rather than the first in estimating my max heart rate, so that the stress level is appropriately set.

One thing I wanted to know that is not reported in the short summary report from the Holter monitor is whether there was any correlation between the sinus rhythm and the ectopic beats—in particular, I wanted to know whether the ectopic beats occurred primarily when my sinus rhythm was very low.  If that is the case, then a pacemaker set to maintain a minimum sinus rhythm might be a possible treatment, should treatment ever be needed.  I downloaded the full report, which shows when the SVT runs occurred, and they seem to be primarily when I’m awake and active, which is the opposite of what I expected based on my observations of PVCs earlier in the year.

I wasn’t sure how one distinguishes a PAC from a PVC on a one-lead Holter monitor, so I watched a video (https://www.youtube.com/watch?v=7Vz8olVnGgU) from “Catalyst University”, which showed the difference between PVCs and PACs on a one-lead ECG. The crucial differences are whether the P-wave (from atrial depolarization) is observed and whether the resulting QRS complex is more or less normal or much longer duration that usual.  If the P-wave is observed and the QRS spike is normal duration and shape (though usually lower amplitude), then you have a premature atrial contraction.  If there is no P-wave and the QRS complex is much longer than usual, you have a PVC.  By these criteria, the observations I made earlier (see PVC again, for example) were clearly PVCs, and the examples of SVT runs shown in the report were indeed PACs. My most recent home ECG recordings have not shown me PVCs, but if I now have PACs instead, my inability to find PVCs may represent a change in what my heart is doing, rather than a failure in my rather crude code for detecting them.

I looked for genetic causes of PACs, but have not found much. Deletion of the STK11 gene is the only thing I’ve found so far, and there is no hint of that in my genome—I do have a SNP in an intron of a gene whose protein that interacts with it: STK11IP, as well as some SNPs in the intergenic region upstream of STK11.  None of these SNPs seem likely to be a major cause of problems.

2022 November 4

Holter monitor

Filed under: Uncategorized — gasstationwithoutpumps @ 11:38
Tags: , , , ,

For the past 10 days, I’ve been wearing a Holter monitor made by Zio, in order to determine the real frequency of my premature ventricular complexes (PVCs).

I’ve checked the PVCs myself with my own home-made ECG starting about a year ago, but my ECG can only be used when I’m awake and generally sitting in one place, so it does not catch the full range of my heart activity. Because the amplifier board had to be connected to PteroDAQ running on a breadboard connected to a laptop, the ECG setup is not very portable, and I had to sit still to avoid disturbing the circuitry. I couldn’t even use the laptop to browse the web or read email while recording, since changing my contact with the laptop changed the bias voltage on my body, which the amplifier took a second or two to recover from.  So I only recorded about 5–10 minutes at a time.

Some of my recordings got a lot of PVCs, and some got almost none. I did notice that raising my heart rate through exercise seemed to abolish the PVCs. So I think that my PVCs are “slow-rate-dependent” PVCs—that is, that I only get the extra ventricular contractions when my sinoatrial node does not start frequent enough contractions.  Because my heart rate is most likely lowest when I’m sleeping, the ECGs that I did myself probably missed most of the PVCs.

I mentioned my curiosity about what my real PVC burden was at my annual checkup, so my doctor ordered a 14-day recording with a Holter monitor.

Holter monitors have gotten quite small. This Zio monitor has electrodes about 9cm apart and just sticks onto the chest.

Here is a closeup of the Zio Holter monitor.

The adhesive that holds the Zio on sticks well to dry skin (though it makes my skin itch a bit), but one day this week I got a bit sweaty cycling up to campus in my rain suit, and the monitor started to slide around. It seems to be firmly in place again after my skin dried, but I think it is slightly lower than its original placement.

I have to mail the Zio back to the manufacturer for them to unload the recorded data and send a report to the cardiology department.  I’m hoping that the cardiologist will provide me with the information I’m interested (things like what my minimum heart rate is when I’m sleeping, what the PVC burden is when I’m sleeping and overall, whether my PVCs are indeed slow-rate-dependent, whether there is a minimum heart rate for me above which very few PVCs are seen, … ).

Right now the PVCs are completely asymptomatic, which just means that I can’t tell when I have them without using an ECG. For asymptomatic PVCs, all the treatments are worse than the PVCs, so nothing needs to be done now, but if anything changes, I’ll want to know.  The treatments I’m aware of include ablation of the cells that trigger the premature complex, beta blockers to lower heart rate (not appropriate for slow-rate-dependent PVCs), and electrical pacemakers to start extra heartbeats at the sinoatrial node when the pacemaker cells fail to do so on their own.  I believe that my father had a pacemaker just for that purpose, and I suspect I may be getting one in a decade or so.

2014 June 29

Soldered EKG from op amps

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

Today I decided to solder the EKG design from Instrumentation amp from op amps fine for EKG onto one of my instrumentation amp protoboards, leaving out the instrumentation amp chip—I wanted to see how much trouble it would be.  As it turned out, the build was fairly straightforward, but a little tedious. There are only dedicated spaces for 8 resistors on the board, but there are 9 resistors in the design I used, so one had to go elsewhere on the board.  I deliberately left out the low-pass filter on this implementation (eliminating one capacitor), which did not make a huge difference—I ended up with about 58µV peak-to-peak of 60Hz noise on my input signal (compared to about 40µV in the previous design with a capacitor for low-pass filtering), which is fairly small compared to the 870µV R spike or the 220µV T wave.  The 60Hz interference was large enough to interfere with the P wave and make it difficult to see whether or not there was a U wave.  Of course, these measurements were made in my bedroom/lab, which has a lot less 60Hz interference than the lab the students work in.  I’ll have to take the board into work and see how bad the interference is in that space.

Using a digital filter to remove the 60Hz noise reduced the 60Hz interference to under 100nV peak-to-peak (way lower than other noise components), producing very nice waveforms, even when sampling at 360 Hz.  I’ll probably want to include a digital filter Python script in the book so that people can see the cleaned up signals, even if there isn’t room in the course to design digital filters.

I still have to decide whether to have students do the EKG amplifier without the INA126P chip, using only op amps. Wiring up the bigger circuit takes time, and I’m not sure that 6 hours of lab will be enough time for students to debug their design and get it soldered—it took them long enough to solder the EKG with the INA126P chip, which has fewer components and fewer wires to route.  It took me quite a while to solder up the board, so it would probably take the students far too long.  Is the pedagogic value of designing and building a 2-op-amp instrumentation amp worth the time? I do want the students to end up with an EKG to take home, as it is a tangible artifact that can demo the function of.  I’m thinking that I could even drop the soldering of the pressure-sensor amp (since they don’t take home pressure sensors), and add soldering of the microphone pre-amp.  If I do that, I’ll probably want to redesign the protoboard again, making it an op-amp protoboard with no instrumentation amp slot, but with more resistor spaces.

Cutting one part that costs about $2.70 and the $1.90 thermometer might justify my switching back to the resistor assortment I used in Winter 2013:  1120 piece resistor assortment for $17.39 instead of 1280 piece resistor assortment (currently $10.65) without raising the lab fee.  Why would I want fewer resistors at a higher price? The 1120-piece assortment is 10 each of 112 values, while the 1280-piece assortment is 20 each of 64 values.  Also the 64 values don’t seem to be very repeatable from set to set, and some sets has duplicates (so only 62 or 63 different values).  The 112-value sets seem more reliably useful.  A hobbyist might be better off going one step further to the 3700-piece resistor assortment (25 each of 148 values), but I can’t justify the $31.48 price for my class. (The extra $14 would probably raise the lab fee.)

 

2014 June 26

Instrumentation amp from op amps fine for EKG

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

As I mentioned in Instrumentation amp from op amps still fails, I’ve been trying to decide whether to have students build an instrumentation amp out of op amps in the circuits course.  I decided that it wouldn’t work for the pressure-sensor lab, because of the large DC offset.  One could calibrate each amplifier, either in software (by recording a a few seconds of 0 pressure difference, and subtracting a constant fit to that region from the data) or in hardware, but I’d rather they had a more straightforward experience where the DC offset was small enough to be ignored.

I conjectured that instrumentation amp built from discrete op amps would work ok for the EKG lab, though, as the EKG already has to deal with much larger input voltage offsets due to differing electrode-skin contact.  So I added a second stage  with a gain of 81 to the instrumentation amp in the previous post with a gain of 19, to get a combined gain of 1539.  I put in the high-pass filter needed to eliminate the DC offset, and a low-pass filter to reduce noise slightly (and make aliasing less of a problem).  The corner frequency is a bit high (60Hz noise is not going to be reduced much), but that may allow a better view of the fast R spike in the EKG waveform.

    The EKG circuit has four modules: a virtual ground (here set to 0.5v), an instrumentation amp, a high-pass filter to eliminate DC bias, and a second-stage non-inverting amplifier with some low-pass filtering.

The EKG circuit has four modules: a virtual ground (here set to 0.5v), an instrumentation amp, a high-pass filter to eliminate DC bias, and a second-stage non-inverting amplifier with some low-pass filtering.

The amplifier worked surprisingly well. I did sometimes have trouble with 60Hz noise, but it did not seem to be any worse than the amplifier based on the INA126P. I can remove the noise by digital filtering, though I’ve only played with that by post-processing the data files, not by designing a notch filter to run in realtime on the KL25Z (something to do when I have more time).

Here are a few traces made with EKG circuit above, feeding into the PTE20-PTE21 differential input on the KL25Z board, recorded using PteroDAQ.

This is lead I, without filtering, showing a rather disturbingly large 60Hz noise signal.

This is lead I (LA–RA), without filtering, showing a rather disturbingly large 60Hz noise signal.

This is lead I (LA-RA), showing how the digital filter cleans up the signal. This was Bessel bandpass filtered to 0.3Hz to 100Hz, followed by notch 57Hz–63Hz, followed by notch 117Hz–123Hz. Each filter was a 5th-order Bessel filter, applied first forward in time then backward in time (using scipy's filtfilt function).

This is lead I (LA–RA), showing how the digital filter cleans up the signal. This was Bessel bandpass filtered to 0.3Hz to 100Hz, followed by notch 57Hz–63Hz, followed by notch 117Hz–123Hz. Each filter was a 5th-order Bessel filter, applied first forward in time then backward in time (using scipy’s filtfilt function).

This is lead II (LL-RA), which for some reason had rather low noise even without filtering.

This is lead II (LL–RA), which for some reason had rather low noise even without filtering.

I noticed that sampling at 360Hz allowed me to see a bit more of the structure of the S and T complex than I’ve seen previously, particularly in lead II, and I can even make out a little bump of a U wave just after the T wave.

I now have to decide whether to have students do the EKG amplifier without an INA126P chip, using only op amps. The design will be fairly heavily constrained, as they’ll need to get it all working on a single MCP6004 chip, but it will justify my spending a bit more time on how instrumentation amps work.

I may redesign the blinky EKG to use a single MCP6004 chip also, which would reduce the price of that substantially.

2013 July 10

Some failed designs

For the past couple of days I’ve been exploring variations on the Blinky EKG project, looking at alternative approaches.

For example, I looked at the possibility of eliminating the most expensive part (the instrumentation amp), and decided that building my own instrumentation amp out of op amps and discrete resistors was unlikely to be reliable.  I discovered (after doing calculations for 2-op-amp and 3-op-amp designs) that 1% tolerance on the resistors would produce poor common-mode rejection. In Common-mode noise in EKG, I reported measurements of the common-mode noise with a fairly short twisted-pair connection to the EKG electrodes (close to a best-case scenario).  I concluded that the common-mode noise was way too large for using unmatched resistors to be a reasonable design, and using an integrated instrumentation amp is still a good choice.

Yesterday,  I tried turning the question around? Could I eliminate the op-amp chip?  Currently, I’m using the op amp for two things: to provide a unity-gain buffer to make the reference voltage source between the power rails, and to do second-stage amplification after a high-pass filter removes the DC offset. To eliminate the op-amp chip, I need to replace both these functions.

Replacing the unity-gain buffer seems fairly easy—I could use a low-drop-out linear regulator to generate the reference voltage instead of a voltage divider and unity-gain buffer, which would be somewhat smaller and cheaper (11¢ rather than 25¢ in 100s).  I didn’t have an LDO linear regulator at home, so I tried using a TL431ILP voltage reference instead.  Unfortunately, it provides very little current, and was unable to maintain the desired voltage when hooked up to the reference voltage input of the instrumentation amp.  I believe that a part like the LM317L would work fine, though, and I may want to test that at some point.

Removing the second-stage amplifier is more problematic.  I can set the gain of the instrumentation amp up to 2000 or 2500 easily, but any DC component in the input differential signal results in saturating the amplifier (with a 6v output range, and a 1mV AC signal, we’d need the DC bias to be less than 1mV also to avoid hitting the power rails).  I tried putting high-pass filters in front of the instrumentation amp, but with the long time constants needed to avoid filtering out the EKG signal, the filters never settled to within 1mV of each other, and the instrumentation amplifier always saturated.

So I need to keep the first-stage gain small enough to avoid saturation, which means I need a second-stage amplifier.  I could use a single op amp for the second stage and a low-drop-out regulator for the reference voltage, which would produce a cleaner output signal (since my voltage-divider-plus-unity-gain-buffer reference introduces noise from the power lines).  The MCP6001 single op amp is only 18¢ in 100s (rather than 25¢ for the MCP6002 dual op-amp), but the MCP6001 is only available as a surface-mount component, which I think is inappropriate for a first soldering project.  The MCP6001 + LM317L would cost about 4¢ more than the MCP6002.

I considered redesigning the Blinky EKG to use the LM317L voltage regulator and the MCP6002, even though half the MCP6002 would be unused, but the LM317L needs a 1.5mA load to maintain regulation, and that seems like a lot for a battery operated device—more than the op amp or the instrumentation amp use (though less than the LED when it is lit).  Even using a TL431ILPR voltage reference (10¢ in 100s) and the unity-gain buffer would only need 1mA, and would save one resistor.  There are lower-current voltage references, like the LM385, but they cost a lot more (42¢ in 100s).

The non-rechargeable CR2032 batteries I’ve been using for the Blinky EKG have about a 225 mAh capacity, and cost about 19¢ in 100s (but the design needs 2, so 39¢).  I could probably get about a 100-hour life with the present Blinky EKG design—I need to measure the current and the duty cycle of the LED to get a better estimate.

The Blinky EKG weighs about 20g (not counting the wires to the electrodes), which is a bit heavy for a pendant or brooch. Most of the weight is in the batteries, but a lighter battery would give up a lot of running time.   The smaller batteries also cost a lot more, probably because Digikey only buys them in quantities around 10,000 rather than in the millions. (From other suppliers CR2032 batteries cost about 60¢ in 100s, not under 20¢).

It has been good to fool around with the Blinky EKG design, as it has gotten me to think a bit about design issues other than the first can-I-get-it-to-work one.  I rarely get my students past that point in their thinking, and I’m not sure how I would do so, as there is always so much time pressure to cover new stuff, that they get very little time to tinker with designs.

 

Next Page »

%d bloggers like this: