Acquiring 12-lead EKG data

Here is an example of using the component software to acquire a set of 12-lead EKG traces. In this example, amplifier #4 is used as the data acquisition electronics. Four electrodes, made from 1964 FDR silver dimes filed down to remove the embossing, are applied dry and attached to the limbs and chest with masking tape in order to create the 12 standard configurations, or "leads", of the EKG. The limb electrodes are connected to the amplifier using 10 gauge speaker wire, while the chest electrode is connected via more flexible 24 gauge wire. A voltage divider is used to attenuate the output signal approximately 5:1 so that the V1-V6 lead signals do not clip the sound input port of the Mac.

The signal is first acquired by the Data AcQuisition component. Four second records (epochs) of 1024 points each are used to store the input data, giving a sampling rate of 256 Hz and a Nyquist limit of 128 Hz. This is well outside the gain band of the amplifier, so that no aliasing of the signal should occur. A Fourier filter consisting of a sharp lowpass cutoff filter at 50 Hz is then used to eliminate most of the 60 Hz AC noise. Each record of data is saved in a First-In-First-Out data component which has been configured to store 10 individual epochs. After data acquisition has been performed, the FIFO can then be scanned in index mode by using a slider to peruse the data and select one of the records for further display and processing. Twelve 1d plots, one for each of the leads, are sequentially connected to the output of the FIFO in order to receive a single record, chosen by varying the slider. The individual plots begin empty on the right side of the flow diagram, and are then moved to the bottom of the window after they have been filled with data.

At the start of data acquisition for each lead, the FIFO is initially empty:

Both the raw and filtered signals are displayed in real time throughout data acquisition, although only the filtered signal is saved in the FIFO. The Fourier lowpass filter removes most of the AC noise which may be present in the input:

Once the FIFO is full, data acquisition is stopped and the slider is used to peruse and select one of the 10 records saved in the queue. This record is then placed in its own 1d plot, which is locked, detached from the FIFO, and saved for further display or analysis.

Although this setup is very flexible and easy to use, it does require the user to attach plots, peruse the FIFO, and detach plots during the course of the entire 12-lead acquisition process. In order to speed up the overall process, I have created another component example which avoids attaching and detaching plots by using a software switch to selectively send filtered data to one of 12 different FIFOs, one for each of the 12 different leads. In this example, all the user needs to do during acquisition is to click in the switch window to select which of the 12 FIFOs will receive the currently acquired data, if any. Data accumulated in each of the FIFOs can then be examined and extracted after the entire acquisition process is complete, as a post-processing step, without wasting time.

The end result of the overall acquisition process is a set of 12 1d plots, each containing a selected data record from one of the 12 leads. As an alternative, a complete set of 12 FIFOs could also be saved, so that more than one record of each lead is available for further processing.

All 12 plots can be displayed together to show the entire 12-lead sequence of data. In this dataset, a voltage divider was used to keep the V1-V6 lead signals from clipping, so that the 6 limb lead signals appear attenuated. If desired, the voltage divider can be removed or bypassed in order to acquire the 6 limb leads without attenuation, in order to compute the orientation of the heart axis, etc...

©Copyright Sky Coyote, 2001-2002.