ECG using a Soun
Medical signal processing on a PC
Martin Klaper
Is it possible to use a computer with an ordinary sound card to record an ECG (electrocardiogram) signal and measure someone’s pulse? This question has been researched in a university dissertation and answered convincingly in the positive. The heart monitor described here is the fruit of this work, and the software is available for free download from the Elektor Electronics website.
Elsewhere in this issue we describe how to record an ECG signal using a Gameboy games console fitted with a special insertion card. Here we show how it can be done in a more experimental way using an ordinary sound card or the audio input of a laptop computer. For this we need a
sensor (see Figure 1), which in the simplest case can be just a tube with contact surfaces at either end that can be gripped like the handlebars of a bicycle. The weak signal that is picked up is amplified by a factor of 1,000 and presented to the audio input of the computer.
Subsequent processing is carried out using a Java program. It conditions the signal using a digital filter, stores it and displays it on the screen. The program also monitors the pulse and automatically calculates the pulse rate with a digital display and audio output. The individual readings can be stored in a
42
elektor electronics - 10/2006
d Card file for later analysis. Test data sets are also available on the Internet [1] from medical databases, and these can also be processed and displayed using the program.
Specifications
Input impedance: Input dynamic range: Amplifier current consumption: Optocoupler current consumption: Common mode rejection ratio (CMRR): Gain: Bandwidth: Recording rate: > 1 MΩ 5 mVpp approximately 11 mA approx. 2.2 mA > 70 dB approx. 1,000 (60 dB) approx. 0.4 Hz to 35 Hz (depending on sound card) in practice unlimited, typically 60 kbyte per minute
ECG
As described in detail in the Gameboy
Links: [1] www.physionet.org/physiobank/ ECG sample data [2] http://en.wikipedia.org/wiki/Electrocardiogram [3] http://java.sun.com/javase/downloads/index.jsp Java compiler and development environment. The Java Runtime Environment (JRE), current version 5.0, is required to run the program and the J2SE Development Kit (JDK), current version 5.0, is required to compile modified versions of the program. [4] www.bluej.org/download/download.html Simple Java development environment with tutorial, ideal for beginners. [5] www.eclipse.org/downloads/ Eclipse is a full-featured Java development environment for professionals. [6] http://audio.rightmark.org/download.shtml RMAA (RightMark Audio Analyser). [7] www.dspguru.com; www.musicdsp.org/archive.php?classid=0 Various topics in DSP. 10/2006 - elektor electronics 47