Prop EKG

Custom PCB Boards Getting Started Tips Timing Pulse Generation Object Exchange FAQ Programming Examples

A Simple Heart Rhythm Monitor Utilizing the Parallax Propeller Microcontroller

Warning!

Risk of Electrical Shock!

bullet This circuit places electrodes across the heart.  Therefore, there is an inherent risk of electrical shock.  Connecting high voltage to this circuit, while in use, could result in significant injury or death. bullet To minimize risk, power the circuit from a standard 9V battery.  Do not allow high voltage to come in contact or proximity with either the body or the circuit. bullet This circuit has not been certified to be safe and is not asserted to be safe.  Use this circuit at your own risk. bullet Do not use when the possibility of a lightning strike exists. bullet Avoid the build up and discharge of static electricity. bullet Do not use this circuit if you have a medical condition. bullet Use of the optocoupled data output inherently increases the risk of shock.  So, for maximum safety keep the circuit and the body completely isolated and removed from all conductors. bullet This is not a complete list of dangers or precautions.

Use the info provided here at your own risk!

 

bullet

Videos:

bullet

Using the thumbpads to detect heartbeat with flashing LED:

bullet

bullet

Using the optoisolated serial link with Windows to graph thumbpad EKG data:

bullet

bullet

Screenshot:

bullet

bullet

A screen capture of the PropEKG Windows application displaying actual EKG data from both channels.
bullet

Photos:

bullet
The following photos show the construction and layout of the PropEKG circuit board.
bullet

bullet

 PropEKG circuit board with one of two EKG circuit installed.  These are the basic components required to measure EKG data with the thumbpad connections.
bullet

bullet

 Layout of the PropEKG as viewed in the design software provided by ExpressPCB.  Top layer is shown in red, bottom layer in green.
bullet

bullet

Photo of the top and bottom of the PropEKG circuit board.  A ground plane is used to increase noise immunity.  The ground plane is removed in the area of the optoisolator and thumbpad.  Note that the thumbpad areas on top and bottom are connected by vias so that fingers on the bottom also make a connection.  The green wire (analog ground) area is between thumb pads and touching this area with one or both thumbs can reduce noise.  Note also that thumbs can touch each other without much reducing the EKG signal.
bullet

bullet

Photo of the fully populated PropEKG with both EKG channels installed.  Also, the white bridge wire, connecting white wires of both channels, is installed.  The slide switch is installed for future use as an input selector.   The wires to connect to EKG electrodes have not yet been installed.

 

bullet

Schematics:

bullet bullet
Schematic diagram of one channel of the EKG circuit.
bullet
A complete circuit diagram of one channel of the analog EKG circuit is shown in figure above..  The circuit board has provisions for two identical channels, although only one is required for basic operation.  The only active components are two 8-pin DIP amplifiers, the AD627 instrument amplifier (U1) and the TC1029 dual OPAMP (U2A and U2B).
An analog ground at Vcc/2 is formed by the resistor divider of R1 and R2.  C1 and C2 are used to filter high frequency transients from this analog ground.  In the usual case, the body is connected to this ground using the green wire (but, this grounding is not always necessary when operated from battery power).
The AD627 instrument amplifier amplifies the very small EKG voltage coming in through the black and white wires, through R3 and R4.  R5 and R6 pull down these inputs to analog ground and reduce noise and allow single channel operation without the green wire.  The AD627 has the impressive ability to amplify the EKG signal above the noise floor even with a large amount of common mode noise on the inputs.  With pins 1 and 8 not connected, the AD627 has the default of 5X, which gives the maximum common-mode rejection
U2A, one of the two opamps of the TC1029 chip, is configured as an error integrator with R8 and C5.  It’s function is to gently force the output level of the AD627 to be close to the analog ground (Vcc/2).  This is done by integrating the difference between the output of the AD627 and analog ground and feeding the result into the ground reference pin of the AD627.  This is necessary because the 100X amplification of the AD627’s output performed by U2B, the second opamp of the TC1029, and the need to stay within the power supply rails.  U2B is configured as a simple 100X inverting amplifier using R9 and R10 with analog ground as reference.
R11 and C6 form a low-pass filter on the output of U2B.  This is fed to Propeller ADC (analog-to-digital conversion) circuit formed by R12, R13, C7 and C8.
The remaining circuitry of the PropEKG is nearly identical to that used by the Propeller Education Kit, except for the addition of an optoisolated output to a computer.  This modified circuit is shown in the figure below.  An H11L optoisolator in 6-pin DIP package provides electrical isolation up to 7500 V.  This provides a safer means of capture EKG data with a computer.  The PropEKG Propeller firmware and Windows software are designed for this interface.  It has been found to operate up to 57600 baud reliably.  Note that this is a one-way connection.  In fact, voltage from the TX pin of the PropPlug (which idles with an output of 3.3 Volts) is used to power the receive side of the H11L.
bullet

bullet

Modified basic Propeller circuit to allow optoisolated output to computer using a PropPlug.
 
bullet

Block Diagram

bullet

bullet

Basic block diagram of the PropEKG.
bullet
A basic block diagram for the PropEKG is shown in Fig. 3.  It contains a diagram of how the EKG leads are color coded and connected to the body.  Note that the body image is from http://en.wikipedia.org/wiki/Electrocardiogram.  There is a great deal of information there about EKG.
The green wire is analog ground and is usually connected to the right leg, although it can be connected anywhere and is not always even required for the PropEKG.
Lead I is the signal between the black and white wires.  This is the most important EKG signal and measures the voltage across the heart by connecting to left and right arms.  The PropEKG circuit board is equipped with conductive pads for left and right thumbs to make this measurement without wires.
Lead II is the signal between the red and white wires.  The PropEKG circuit board contains vias to allow a jumper between white wires on the board so that only one white wire to the subject is required.
The Propeller digitizes the EKG data using the sigma-delta ADC technique.  Five pins are used for each channel with three of them grounded to reduce stray capacitance between the used pins.
The PropEKG provides LEDs to give a visual indication of the heartbeat.  An optoisolated serial connection to the PC via the PropPlug is available.
bullet

Software

bullet
Download the Propeller firmware here  
bullet
Download the Windows App (more or less working) here