You are on page 1of 35

Application Report

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Vishal Markandey ............................................................................................................................. ABSTRACT The medical development kit (MDK) provides a development platform to TI medical customers, third parties, and other developers. This application report focuses on the C5515 MDK; however, the analog front ends that are included can also be used with other platforms. Please be aware that an important notice concerning availability, standard warranty, and use in critical applications of Texas Instruments semiconductor products and disclaimers thereto appears at the end of this document.
NOTE: Disclaimer Statement: Do not use this medical development kit for the purpose of diagnosing patients. This application report may not include all of the details necessary to completely develop the design. It is provided as a reference and only intended to demonstrate the ECG application.

Contents 1 Introduction .................................................................................................................. 2 2 Front-End Architecture ..................................................................................................... 5 3 DSP Subsystem ........................................................................................................... 11 4 PC Application ............................................................................................................. 17 5 Installation .................................................................................................................. 17 6 Running the Demo Application .......................................................................................... 20 7 Options and Selections ................................................................................................... 21 8 References ................................................................................................................. 22 Appendix A Front-End Board Schematics ................................................................................... 23 Appendix B Front-End Board BOM ........................................................................................... 30 Appendix C Sensors and Accessories ....................................................................................... 33 Appendix D MEDICAL DEVELOPMENT KIT (MDK) WARNINGS, RESTRICTIONS AND DISCLAIMER .......... 34 List of Figures 1 2 3 4 5 6 7 8 9 10 11 12 MDK Hardware Overview .................................................................................................. 3 ECG Board ................................................................................................................... 4

........................................................................................... 6 .......................................................................................... 7 Right-Leg-Drive Circuit ..................................................................................................... 7 Lead-Off Detection Circuit ................................................................................................. 8 Lead I Formation ............................................................................................................ 9 LPF for Lead II .............................................................................................................. 9 Block Diagram of ADS1258 .............................................................................................. 10 Interface Between ADS1258 and DSP ................................................................................. 10 DSP Software Architecture ............................................................................................... 12 DC Removal Filter Response ............................................................................................ 13
ECG Front-End Block Diagram De-Fibrillation Protection Circuit
ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)
Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

Introduction 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

www.ti.com

Pole and Zero Location for IIR Filter .................................................................................... 13 1Hz Signal Response via DC Removal Filter .......................................................................... 14 MBF Frequency Response ............................................................................................... 15 Buffer-Shifting Convolution Algorithm ................................................................................... 15 ECG Front-End Mounted on the C5515 EVM ......................................................................... 18 Input Dialog Box ........................................................................................................... 20 Display on the EVM LCD Screen........................................................................................ 21 ECG_I_II .................................................................................................................... 23 ECG_LEAD_V1_V2_V3 .................................................................................................. 24 ECG_LEAD_V4_V5_V6 .................................................................................................. 25 ECG_ADC .................................................................................................................. 26 ECG_LEAD_OFF_DET ................................................................................................... 27 Right Leg Drive ............................................................................................................ 28 PWR_CONN_INTRFCE .................................................................................................. 29 ECG Cable Details ........................................................................................................ 33 List of Tables

1 2 3

J22 Connector Interface .................................................................................................. 11 Release CD Contents ..................................................................................................... 19 Bill of Material .............................................................................................................. 30

Introduction
A number of emerging medical applications such as electrocardiography (ECG), digital stethoscope, and pulse oximeters require DSP processing performance at very low power. The TMS320C5515 digital signal processor (DSP) is ideally suited for such applications. The C5515 is a member of TI's C5000 fixed-point DSP platform. To enable the development of a broad range of medical applications on the C5515, Texas Instruments has developed an MDK based on the C5515 DSP. A typical medical application includes: An analog front end, including sensors to pick up signals of interest from the body Signal processing algorithms for signal conditioning, performing measurements and running analytics on measurements to determine the health condition User control and interaction, including graphical display of the signal processing results and connectivity to enable remote patient monitoring

1.1

Medical Development Kit (MDK) Overview


The MDK is designed to support complete medical applications development. It includes the following elements: Analog front-end boards (FE boards) specific to the key target medical applications of the C5515 (ECG, digital stethoscope, pulse oximeter), highlighting the use of the TI analog components for medical applications C5515 DSP evaluation module (EVM) main board Medical applications software including example demonstrations

C5000, Code Composer Studio are trademarks of Texas Instruments. All other trademarks are the property of their respective owners. 2 ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)
Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

www.ti.com

Introduction

Figure 1 shows an overview of the MDK hardware, consisting of individual analog front-end boards for ECG, digital stethoscope, pulse oximeter, and the C5515 DSP EVM. Any of the analog front-end boards can be connected, one of at a time, to the C5515 EVM using universal connectors on the front-end boards and the EVM. The analog front-end boards connect to the appropriate sensors for the ECG, digital stethoscope or the pulse oximeter, and perform analog signal conditioning and analog-to-digital (A/D) conversion of the signals from the sensor. Then, the digital signal is sent to the C5515 EVM where the C5515 DSP performs signal processing algorithms for the application. The DSP is also responsible for managing user control and interaction including graphical display of the signal processing results. The signal processing results can also be transferred from the C5515 EVM to a PC for further display, analysis, and storage using the PC application software that is provided with the MDK.
Front-End Daughterboards Common Platform Data process, memory, display, user input, etc.

ECG Front End

Univ. FE Con

Color LCD Display

Univ. FE Con

Digital Stethoscope Front End

Univ. FE Con

C5515 EVM

Univ. FE Con

Pulse Oximeter Front End

Keypad

Figure 1. MDK Hardware Overview

1.2

MDK ECG System


An electrocardiogram (ECG/EKG) is the recording of the electrical activities of the heart and is used in the investigation of heart disease. The electrical waves can be measured by selectively placed electrodes (electrical contacts) on the skin.

1.2.1

Key Features The key features of the MDK ECG system are: 12 lead ECG output using 10 electrode input Defibrillator protection circuitry Diagnostic quality ECG with bandwidth of 0.05 Hz to 150 Hz Heartbeat rate display Leads off detection Real-time 12 lead ECG waveform display on EVM LCD screen, one lead selectable at a time Zoom option for the Y-axis (amplitude) on EVM LCD screen Real-time 12 lead ECG waveform display on PC, three leads at a time Zoom function on X-axis (time) and Y-axis (amplitude) on PC application Freeze screen option on PC Application Recording of ECG data and offline view option of recorded ECG data on PC application

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

Introduction

www.ti.com

1.2.2

MDK Hardware Several elements of the MDK ECG system are: C5515 EVM ECG front-end board ECG cable

1.2.2.1

C5515 EVM

The EVM comes with a full compliment of on-board devices that suit a wide variety of application environments. For further details on the C5515 EVM, see the Medical Devlopment Kit provided with your EVM. Key components and interfaces of the C5515 EVM used in the MDK ECG system include: Texas Instrument's TMS320C5515 operating at 100 MHz User universal serial bus (USB) port via the C5515 Inter-integrated circuit (I2C) /serial peripheral interface (SPI) electrically erasable programmable read-only memory (EEPROM) External memory interface (EMIF), I2C, universal asynchronous receiver/transmitter (UART), SPI interfaces SAR External IEEE Standard 1149.1-1990, IEEE Standard Test Access Port and Boundary-Scan Architecture (JTAG) emulation interface Embedded JTAG controller Color LCD display Keys (user switches) The EVM operates from a + 5 V external power supply or battery and is designed to work with TIs Code Composer Studio integrated development environment (IDE). Code Composer Studio communicates with the EVM board through the external emulator, or on-board emulator. 1.2.2.2 ECG Front-End Board

Figure 2 shows the ECG front-end board. The potentials captured by the electrodes are passed through the defibrillator protection (DP) circuit in the ECG front-end board. Then, the front end board derives 8 out of 12 ECG leads and provides the digital input to the DSP subsystem. The front-end board can be interfaced with the EVM board through a universal front-end connector. The front-end board is interfaced with and powered by the C5515 EVM board through the universal front-end connector by using I2C and I2S interfaces. The 16 channel analog-to-digital converter (ADC) (ADS1258) on the front-end board is configured for 500 Hz sampling with 24-bit data resolution. ADC is interfaced with the C5515 using the SPI bus.

DB-15 Conn. for Electrode Connection

Figure 2. ECG Board

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

www.ti.com

Front-End Architecture

1.2.2.3

ECG Cable

The ECG cable consists of four limb and six chest electrodes. This cable is connected to the front-end board through the DB15 connector. The ECG electrodes pick up ECG signals from the ECG simulator/patient and send them to the ECG front-end board; an off-the-shelf ECG cable is used. For more details regarding ECG cable, see Appendix C. 1.2.3 MDK Software The software for the MDK application includes: C5515 software application PC application 1.2.3.1 C5515 Software Application

The hardware is initialized by the DSP on the EVM. The DSP reads the digitized signals from the ADC through the SPI interface. The DSP subsystem conditions the ECG signals by removing DC offset and noise using digital filters. Then, the DSP subsystem derives the remaining four ECG electrodes, lead off status, and heart rate. The DSP subsystem also displays one channel ECG wave form, lead off information and heart rate on the LCD screen and sends the the ECG data to the PC application through the UART interface. 1.2.3.2 PC Application

The PC application, which has to be installed on the PC, can be used for viewing the ECG waveform, heart rate, and lead off information. It also provides options to zoom, store and playback the signals transmitted from the EVM. The PC application can operate in two modes: online and offline.

Front-End Architecture
The front-end board has a DB15 connector to allow connection for 10 electrode ECG cables; it can be interfaced with the EVM board through the universal front-end connector. The C5515 EVM board supplies power to the front-end board through the universal front-end connector.

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

Front-End Architecture

www.ti.com

Figure 3 shows the ECG front-end board architecture.


Reference Voltage Instrumentation Amp Low Pass Filter 150 Hz Defibrillator Protection INA128 ADS1258 Crystal 32.768 KHz REF5025 -5 V TPS60403 -2.5 V TPS72325 +2.5 V TPS73025 Power supply

Analog MUX

ADC

SPI

Defibrillator Protection

I2C OPA335 Buffer

Defibrillator Protection

I/O Expander OPA335 RLD Averaging of RA,LA,LL signals

PCA9535

Lead Off Detection Current Injection

TLV3404 Comparator

Figure 3. ECG Front-End Block Diagram The front-end board contains the following stages: Defibrillator protection Right leg driving circuit Lead off detection Derives eight ECG leads using differential amplifier (instrumentation amplifier) Low-pass filtering (anti-aliasing) Analog-to-digital conversion (ADC)

2.1

Defibrillator Protection

WARNING
If defibrillator is used for development purposes, use of medical grade EVM input power supply (Accessory Part Number: SL Power AULT Model MW173KB0503F01) is strongly recommended. Use of the Isolator (Accessory Part Number: MOXA Model Name: TCC-82) that isolates the MDK from the PC is also strongly recommended. These accessories provide additional supplemental protection to development users from high voltages that may be present when introducing defibrillator voltages during development simulation. There may also be other voltage transients sourced from the defibrillator to accompanying interface hardware such as a personal computer when used in conjunction with the ECG/EVM development hardware.
The defibrillator protection circuit protects the ECG system while the defibrillator is used on the patient.
6 ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)
Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

Front End Connectors

DB15 INA128

www.ti.com

Front-End Architecture

The neon lamps and clamping diodes (zener diodes) are connected across the electrode input lines, to provide protection from the defibrillator pulse. The neon lamps give the first level of protection and the clamping diodes give the second level of protection. These shunting devices are used to bypass large voltage applied during defibrillation. The neon lamp (NE2 series) shunts voltages above 70 V-80 V. Zener diodes, with a breakdown voltage of 9.1 V, are used for shunting the voltage dropped across neon lamps to a safe 11.6 V ( VCC + VZ = 2.5 + 9.1) before it appears across the instrumentation amplifiers. A current limiting resistor (R1) of 20K with high energy withstanding capability (~ 2.5J) and power rating (> 1W) is placed in the series on each input line, which limits the current flow. One more current limiting resistor (R2) of 10K is put in between the neon lamp and the zener diodes to prevent high current from passing through the zener diodes. Figure 4 depicts the protection circuitry.
-VCC R1 Electrode Neon Lamp +VCC R2 Vz To Instrumentaion Amplifier

Figure 4. De-Fibrillation Protection Circuit

2.2

Right Leg Drive Circuit


A right-leg-drive circuit (RLD) is used as an alternative to the grounding of a patient with the MDK ECG system. In the RLD circuit, an electrode attached to the right leg is driven by the output of an auxiliary operational amplifier, where the common-mode voltage is sensed and amplified. The negative feedback of a common-mode signal in this circuit drives the common-mode voltage low. In turn, the bodys displacement current flows to the op-amp output circuit, which reduces the pickup of the ECG system and effectively grounds the patient. The averaging is done with the electrode signals RA, LA and LL. OPA335 is used as the inverting amplifier for the RLD circuit. The gain of the RLD circuit design is -39.

Figure 5. Right-Leg-Drive Circuit

2.3

Lead-Off Detection
The lead-off detection circuit detects the lead status for all the electrodes except RL.The lead-off detection has pull up registers, comparator (TLV3404) and an I2C port expander (PCA9535) as shown in Figure 6. The ECG electrode leads, except RL, are connected to a pull up resistor (10 M); when any one of the leads is disconnected, the voltage for that lead is pulled up to VCC (+ 2.3 V).

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

Front-End Architecture

www.ti.com

The pull up circuit outputs are connected to the negative and positive terminals of the comparator, and set to 500 mV (threshold voltage). When any lead gets disconnected, the output of the comparator for that lead becomes 0 V. The output of the comparator is connected to the I2C port expander. The port expander generates an interrupt to the DSP whenever there is any change in the input voltage. The interrupt service routine at the DSP reads the output of the port expander using I2C lines and, correspondingly, updates the lead-off status.

Figure 6. Lead-Off Detection Circuit

2.4

Lead Formation Using Instrumentation Amplifier


The following ECG leads are formed using instrumentation amplifier (INA128) and ECG electrode combinations: Lead I = LA RA Lead II = LL RA Lead V1 = V1 - (LA + RA + LL) / 3 Lead V2 = V2 - (LA + RA + LL) / 3 Lead V3 = V3 - (LA + RA + LL) / 3 Lead V4 = V4 - (LA + RA + LL) / 3 Lead V5 = V5 - (LA + RA + LL) / 3 Lead V6 = V6 - (LA + RA + LL) / 3 Where, RA, LL, LA and V1 to V6 are ECG electrodes. Lead I is formed by connecting LA to the instrumentation amplifiers non-inverting input, while RA is connected to the inverting input. Lead II is formed by connecting LL to the instrumentation amplifiers non-inverting input, while RA is connected to the inverting input. Uni-polar chest leads (Lead V1 to Lead V6) are formed by applying the corresponding electrodes to the non-inverting input of the instrumentation amplifier, while the inverting input is connected with the average of the RA, LA and LL signals. The average is calculated by addition using three equal value resistors.

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

www.ti.com

Front-End Architecture

Figure 7 shows the lead formation for Lead I.

Figure 7. Lead I Formation The instrumentation amplifier also provides amplification of the weak input signal. The gain of the amplifier is set to 8.35 by using a 6.8K (R4) nominal value precision resistor.

2.5

Low-Pass Filters (Anti-Aliasing)


An active first-order, low-pass filter (LPF) is used for anti-aliasing and for removing frequencies above 150 Hz from each of the ECG leads. The LPF has a cutoff at 150 Hz. The instrumentation amplifier output is fed to the LPF filter input. Figure 8 shows the implementation for the LPF.

Figure 8. LPF for Lead II

2.6

Analog-to-Digital Conversion (ADC)


Analog signals are converted to digital before sending them to the DSP sub-system. LPF output is connected as input to the ADC (ADS1258).

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

Front-End Architecture

www.ti.com

ADS1258 is a 16-channel, 24-bit delta-sigma ADC. Figure 9 shows the block diagram of ADS1258.
AVDD Internal Monitoring VREF DVDD ADS1258 GPIO CS DRDY SCLK DIN DOUT START RESET PWDN GPIO[7:0]

1 Analog Inputs 16:1 Analog Input MUX 16 Oscillator AINCOM AVSS MUX OUT ADC IN Extclk In/Out DGND 32.768 kHz Control 24-Bit ADC Digital Filter SPI Interface

Figure 9. Block Diagram of ADS1258 The following configuration is used for the ADS1258: Host to ADC interface Sampling frequency Data format ADC mode used Reference voltage SPI 500 Hz 24-bit linear Fixed channel mode 2.5 V

The eight ECG lead outputs from the LPF are connected to eight channels of the ADS1258. Using SPI interface, the ADC is connected to the C5515 for 500 sps/channels with 24-bit resolution. The ADS1258 is interfaced to C5515 DSP as shown in Figure 10.
SPI_CLK SPI_OUT SPI_IN SPI_CS SPI_START SPI_DRDY

C5505 DSP

ADS1258

C5505 EVM

ECG FE

Figure 10. Interface Between ADS1258 and DSP

2.7

Front-End Connector
The front-end board is connected to the EVM through the universal front-end connector, which consists of three connector interfaces with legends on the EVM: J20, J21, and J22.

10

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

www.ti.com

DSP Subsystem

2.7.1

J20 Connector Interface at C5515 EVM The mating for this connector is maintained, but no signals are used by the ECG front-end board.

2.7.2

J21 Connector Interface at C5515 EVM This connector carries the 5 V, 3.3 V and 1.8 V from the C5515 EVM. These voltages act as the primary source for the ECG front-end board.

2.7.3

J22 Connector Interface at C5515 EVM This connector carries GPIOs, I2C, SPI and interrupt (INT1) connections from the C5515 EVM to the front-end board. Pin mapping for the used interfaces are shown in Table 1. Table 1. J22 Connector Interface
Connector Pin Number 1 3 7 11 12 13 15 16 20 Signal Assigned SPI_START SPI_CLK SPI_CS SPI_IN SPI_DRDY SPI_OUT I2C_INT I2C_SCL I2C_SDA

DSP Subsystem
The DSP software, running on the C5515 EVM, takes the digitized signal from the front-end board and processes it the same. The DSP receives eight ECG lead data from the ADC through the SPI interface. Then, filters are applied to remove DC signal, 50/60 Hz power line noise, and unwanted signals. The filtered signal is used to detect the heart rate and to obtain four ECG leads: Lead III, aVR, aVL and aVF. The software is designed to handle the following activities: Data acquisition through ADC Lead-off detection DC signal removal Multi band-pass filtering ECG leads formation QRS (HR) detection Display of ECG data UART communication

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

11

DSP Subsystem

www.ti.com

Figure 11 shows the high-level architecture of DSP subsystem.

From ADC

SPI

QRS Algorithm (HR)

Lead Off Detection

Lead Off Status

I2C

From I2C Expander

HR

Lead Off Interrupt

UART RS232

8 ECG Leads

Display

PC Display
Figure 11. DSP Software Architecture The various blocks of the DSP subsystem are described in the following sections.

3.1

Data Acquisition
Using the C5515 timer, an interrupt is generated every 250 ms to sequentially acquire 500 sps of eight ECG leads. The interrupt service routine (ISR) issues a set channel number and (SOC) command to the ADC to acquire 24-bits of ECG data for the selected channel. The acquired data is provided to the infinite impulse response (IIR) filter module after downscaling to 20 bits; the data read for the same channel happens after every 2 ms. The ADC is interfaced with the DSP through the SPI bus.

3.2

Lead-Off Detection
The lead status is read in the IIR for INTR1 of the C5515 (external interrupt 1). This interrupt is generated in the front ECG board by the I2C port expander as and when the lead status is changed.

3.3

Interrupt Service Routine (IIR) Filter - DC Signal Removal


The DC signals from the eight ECG leads are removed by using the first-order IIR filter. The following transfer function is used for the filter:
H (z ) = Y (z ) X (z ) = 1 - z -1 1 - a z -1'

To provide DC attenuation of 22 dB, the value of alpha is chosen as 0.992. The IIR filter output is downscaled to 16 bits and then provided to the finite impulse response (FIR) filter.

12

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

4 ECG Leads

8 Channel Data Reader Data Acquisition Timer Based Interrupt

IIR Filter (DC Removal)

FIR Filters

ECG Lead Computation (Lead Info)

SPRAB36B June 2010

www.ti.com

DSP Subsystem

Figure 12 shows the frequency response for the filter.

Figure 12. DC Removal Filter Response Figure 13 shows the pole and zero location for the IIR filter. The pole is located at z = 0.992 and zero at 1 in the Z plane.

Figure 13. Pole and Zero Location for IIR Filter

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

13

DSP Subsystem

www.ti.com

Figure 14 shows 1 Hz signal response via the DC removal filter.

Figure 14. 1Hz Signal Response via DC Removal Filter

3.4

FIR Filter
The multi band-pass filter (MBF) is used for removing unwanted signals and power line noise from the DC removed ECG lead data. The MBF digital filter being used is the FIR hamming window with the order of 351, which provides cutoff at 150 Hz and notch at 50/60 Hz; the notch frequency is compile-time programmable. This filter also provides a very sharp cutoff at 150 Hz with attenuation of 60 dB at stop-band and notch at 8 dB attenuation. The sampling frequency is 500 samples/second.

14

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

www.ti.com

DSP Subsystem

Figure 15 shows simulation results for the MBF.

Figure 15. MBF Frequency Response Buffer-shifting convolution algorithm is used for the realization of the MBF filter. The filter window is shifted for every filtered sample and to insert the new sample into the buffer as depicted in Figure 16.
.....

x(n) New Data

x(n-1)

x(n-2)

x(n-L+2)

x(n-L+1)

Current time, n

Discarded x(n) x(n-1) x(n-2) .....


x(n-L+1)

Next time, n+1

Figure 16. Buffer-Shifting Convolution Algorithm

3.5

ECG Lead Computation


Eight ECG lead data from the MBF filter is fed to the ECG lead formation module. This module computes the remaining four ECG lead data using the following formula: Lead III = Lead II - Lead I Lead aVR = - Lead II + 0.5 * Lead III Lead aVL = Lead I - 0.5 * Lead II Lead aVF = Lead III + 0.5 * Lead I

3.6

QRS (HR) Detection Algorithm


QRS detection is based on the first derivative of the Lead II ECG signal and threshold. Once five consecutive QRS are detected, the heart rate is calculated by taking the average of the five RR intervals.
15

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

DSP Subsystem

www.ti.com

The following steps are involved for calculating heart rate: 1. Calculate the first derivative of the Lead II ECG signal samples. The first derivative for any sample is calculated as: y0(n) = |x(n + 1) x(n - 1)| Where, y0(n) is the first derivative. x(n + 1) is the sample value for (n + 1)th sample x(n 1) is the sample value for (n 1)th sample The initial 2sec of the first derivatives in a buffer are stored and the maximum value (P) in this buffer are obtained. 2. Calculate the threshold as 0.7 * P. 3. Compare each of the first derivative values calculated with the calculated threshold. 4. Mark the ECG sample index (S1) of that particular sample, whenever a derivative crosses the threshold. 5. Detect the QRS peak by scanning the next 40 derivatives (MAXIMA_SEARCH_WINDOW = 40) and obtaining the maxima (M1). This maxima (M1) value is stored in another buffer.

6. Skip the next 50 samples (SKIP_WINDOW = 50) to take care of the minimum RR interval that can occur in case of maximum detectable heart rate (i.e., 240 BPM), after detecting a QRS peak. 7. Detect the next five QRS peaks by repeating steps 3 to 6. 8. Calculate the RR interval as the number of samples between two consecutive QRS peaks. 9. Calculate heart rate using the following formula: HR per Minute = (60 * Sampling Rate)/(Average RR interval for five consecutive RR intervals) 10. Recalculate threshold from the QRS peak values detected.

3.7

LCD Display
The LCD display shows the ECG, heart rate, and lead-off status. The display is controlled using the SW7 and SW8 keys on the EVM as mentioned in Section 7.1.1. For each of these keys, an interrupt is generated and communicated to the DSP through the SAR interrupt. The interrupt service routine for the key that is pressed takes care of the corresponding action for the interrupt.

3.8

Universal Asynchronous Receiver/Transmitter (UART)


The data sent to the PC through UART has eight ECG lead data; these signals are sent at 250 sps/lead. The PC application derives the remaining four ECG leads using the Lead I and Lead II data. A synchronization frame (header) of 5 bytes is also sent to the UART interface every 1 s. The packet number, heart rate, and lead status values are sent along with the ECG header. The header is followed by interleaved samples of eight ECG leads. The interval between the two ECG data packets is 500 ms. The packet number gets incremented for every new sample sent. The UART configuration is set as 115200 bps, 8 bits data, 1 stop bit and no parity.

16

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

www.ti.com

PC Application

ECG Header
Packet Number Lead Status (Low) Lead Status (High)

00

80

00

80

00

Heart Rate

ECG Data
Current Channel Low 8 Bits Current Channel High 8 Bits

PC Application
The PC application is used for viewing the ECG waveform and ECG values. It also provides options to zoom, store and playback the signals. The PC application has two modes of operation: online and offline. Online mode: the ECG data is plotted in real-time as a scrolling display Offline mode: the recorded ECG data is displayed for analysis Two timers run on the application for online mode: acquisition and display timer. The acquisition timer is set for 100 ms intervals and reads the data from the serial port. After fetching the data from serial port, it parses the stream of bytes to different variables like packet number, heart rate, lead-off status and to the ECG data object containing the digital value of eight leads ECG samples. The four non-acquired leads, Lead III, aVR, aVL and aVF data, are derived from Lead I and Lead II as follows: Lead III = Lead II - Lead I aVR = - Lead II + 0.5 * Lead III aVL = Lead I - 0.5 * Lead II aVF = Lead III + 0.5 * Lead I The ECG data object for each sample is stored in a queue buffer. The display timer is set to an interval of 60 ms and is used to plot the ECG wave forms, and update the heart rate and lead-off status information on the screen. This timer is elapsed every 60 ms; in each elapsed event 15 samples of the leads are plotted on the screen.

5 5.1

Installation Components and Accessories Required


The following components and accessories are required for the MDK ECG installation. C5515 EVM with power supply ECG front-end board (ECG FE) Code Composer Studio v3.3 RS232 cable USB cable 10 lead ECG patient cable C5515 DSP application software PC application software

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

17

Installation

www.ti.com

5.2

Hardware Installation
1. Mount the ECG front-end board on top of the C5515 EVM at connectors J20, J21 and J22. Ensure that there is a firm connection between the front-end board and the EVM.
JTAG Header J4 DB9 J14

DB15 P1

Power Jack J7

Power Switch SW4

Figure 17. ECG Front-End Mounted on the C5515 EVM 2. Connect the USB cable between the PC and the C5515 EVM for the debug mode of operation. 3. Connect the C5515 emulator JTAG cable to the C5515 EVM. 4. Connect the serial cable (UART) to the DB9 connector (J13) of the C5515 EVM and the other end to the serial port of the PC, for viewing the signals on the PC application. 5. Connect the ECG cables to DB15 connector P1. 6. Connect the other end of the ECG cable (there are 10 leads) to an ECG simulator. 7. Power on the system using slide switch SW4 on the C5515 EVM.
NOTE: The ECG simulator has 10 connector points that are assigned to different electrodes, i.e., RA, RL, LA, etc. Ensure that the ECG leads are connected to the corresponding connectors on the simulator.

5.3
5.3.1

Software Installation
System Requirements The following installations are required to run the software provided with the MDK ECG kit. Code Composer Studio v3.3 bios_5_32_01 Spectrum Digital XDS510 USB driver for Code Composer Studio v_3.3 .NET 2.0 frame work

18

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

www.ti.com

Installation

Table 2 explains the content of the CD provided with the MDK ECG kit. Table 2. Release CD Contents
S Number 1 2 Directory/Filename ECGSystem_V_5_0 Output Contains Project source code Contains three files: ECGSystem.out c5505evm.gel and C5515 XDS510USB Emulator.ccs 3 4 PCApplication BootImageCreation.zip Executable for PC application Folder that contains the following files: bootImage.exe convertBind0.bat convertEnc0.bat convertInsecure.bat programmer.out readme.txt 5 Document Contains the following documents: ReleaseNote.txt Quick starter guide V6.0 doc

5.3.2

C5515 DSP Software (debug mode) Installation Steps 1. Copy the c5505evm.gel file from the CD to <CCS installation dir>/CC/GEL/. 2. Copy the ECGSystem directory from the CD to a local directory on the PC where Code Composer Studio is installed. C5515 DSP Software (standalone mode ) Installation Steps 1. Copy the BootImageCreation.zip file from the CD to a local directory on the PC where Code Composer Studio is installed. This path needs to be used later for Flashing; ensure that there are no spaces in the path name. 2. Copy the ECGSystem.out file from the CD to the < BootImageCreation> folder. 3. Execute convertInsecure.bat from the <BootImageCreation> folder to create the new InsecureBootImage.bin file. 4. Open Code Composer Studio. 5. Power on the C5515 EVM. 6. Select Debug Connect in Code Composer Studio to connect to the C5515 EVM. 7. Load programmer.out C5515 EVM from the < BootImageCreation> folder. 8. Select Debug Run in Code Composer Studio.

5.3.3

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

19

Running the Demo Application

www.ti.com

9. Enter 241:<BootImageCreation Folder>\InsecureBootImage.bin and press OK in the popup window shown in Figure 18.

Figure 18. Input Dialog Box 10. Wait until Programming Complete. 11. Power off the C5515 EVM and disconnect. 5.3.4 PC Application Installation Steps Prior to installing the PC application, ensure that .NET 2.0 framework is installed on the system. .NET 2.0 redistributable framework can be downloaded from the following URL: http://www.microsoft.com/downloads/details.aspx?familyid=0856eacb-4362-4b0d-8eddaab15c5e04f5&displaylang=en. 1. Open the PCApplication folder on the CD and double click on C55x ECG Medical Development Kit.msi. 2. Click Next on the welcome screen to continue the installation. 3. Browse to the folder where the application is installed. Select the installation mode for Everyone or Self and click Next. 4. Click Next on the Confirmation screen. This installs the application into the specified folder. 5. Click Close to complete and exit the installation.

Running the Demo Application


The ECG application can be run in two modes: standalone and debug. Standalone mode, for running from Flash memory Debug mode, for loading and debugging using Code Composer Studio

6.1

Running in Standalone Mode


1. Complete the installation steps provided in Section 5.3. 2. Power on C5515 EVM using slide switch SW4. 3. Switch on the ECG simulator to view the ECG signal on the C5515 EVM.

6.2

Running in Debug Mode


1. 2. 3. 4. 5. 6. 7. 8. Complete the installation steps provided in Section 5.3. Power on the C5515 EVM using slide switch SW4. Open Code Composer Studio. Click on Debug Connect in Code Composer Studio to connect to the C5515 EVM. Click on Project Open in Code Composer Studio and select the ECGSystem.pjt file. Click on File Load .out file in Code Composer Studio. Execute the application. Switch on the ECG simulator to view the ECG signal on the C5515 EVM.

20

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

www.ti.com

Options and Selections

6.3
6.3.1

Running the PC Application


Online Mode The following steps are required to view signals in online mode using the PC application: 1. Connect the RS232 cable between the PC COM port and the C5515 EVM. 2. Complete the installation steps provided in Section 5.3. 3. Open the PC application. 4. Select online mode and click OK. 5. Select the available COM port and click OK. 6. Signals transmitted from the C5515 EVM can be viewed on the PC application.

6.3.2

Offline Mode The following steps are required to view signals in offline mode stored on the PC using the PC application: 1. Open the PC application. 2. Select offline mode and click OK. 3. Browse and select the previously saved .wav file and click OK. 4. View the static ECG waveforms along with the heart rate and lead-off status on the PC application.

7 7.1
7.1.1

Options and Selections On the C5515 EVM


ECG Display on the C5515 EVM Side The ECG display on the LCD screen starts by showing the ECG Monitor followed by lead and heart rate; by default, ECG Lead II is displayed. SW7 switch on the EVM can be pressed to view one channel after the other. Pressing the switch displays the next ECG lead in a cyclic manner: II, I, III, aVR, aVL, aVF, V1, V2, V3, V4, V5 and V6. The SW8 switch on the EVM can be used for the zoom in and zoom out feature for the ECG waveform. Low, Medium (default) and High are the three levels of zooming provided. If all 10 leads are connected, a green color dot is displayed at the lead status location on the EVM display. In case any one lead fails, the failed lead name is displayed at the lead status location. If more than one lead off is detected, a red color dot is displayed at the lead status location.

Displaying Lead

Lead Status

Figure 19. Display on the EVM LCD Screen

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

21

References

www.ti.com

7.1.2

PC Application By default, three leads are displayed simultaneously. The sequence of the leads are I, II, III, aVR, aVL, aVF, V1, V2, V3, V4, V5 and V6. Lead-off status and heart rates are displayed on the screen and the values are refreshed once every second. The serial port connection status (RS232) for the device is displayed on the status bar. The following features are available on the PC application. Next (up arrow) - This button can be used to view the next three lead wave forms. Previous (down arrow) - This button can be used to view the previous three lead wave forms. Scaling on Amplitude - This button can be used to vertically zoom in and zoom out of the ECG waveform display on the PC application. Scaling on Time - This button can be used to horizontally zoom in and zoom out of the ECG waveform display on the PC application. Start Recording - This can be used to start the recording of the ECG waveform. During recording, this same button is used for the Stop Recording operation. Note that after the start recording option is selected, the zoom options get disabled. Stop Recording - This can be used to stop recording and save the ECG waveform as an .ECG file. It can be played back using the PC application in offline mode. Freeze - This button can be used to view a static waveform. Particular portions of the waveform can be viewed by moving the Left and Right cursors during the Freeze option. Unfreeze - Pressing this button enables the waveform to be in continuous scrolling mode. Cancel: This can be used to close the form.

References
TMS320VC5505 DSP Medical Development Kit (MDK) Quick Start Guide (SPRUGO1)

22

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

A.1

www.ti.com

+2.5_VCC D NI C1 LOW PASS FILT ER (LPF1) Fc=159Hz TP16 U1A 0.1uF

-2.5_VCC

J1

INST RUMENTAT ION AMPLIFIER (IA1) +2.5_VCC +2.5_VCC

SPRAB36B June 2010


3 2 1
R1 10M TP8 GAIN 8.35 C2

DEFIBRILLATOR PROT ECT ION (DP1)

8 2 InOut
R5 10K R6 0E

D1 9.1V R3 10K R4 D2 C3 R8 C98 RA 6.8K CON3 -2.5_VCC

7 2 1 Vo V4
0.1uF 0E -2.5_VCC C5 0.1uF -2.5_VCC C4 0.1uF OPA2335

0.1uF

V+

DB15_RA

R2

22K

V+ U2 VinRg1 1 6 In+
L EAD_I

LPF_I

DS1 MC08010000 9.1V R9 +2.5_VCC J2 +2.5_VCC

8 LA 3 Rg2 Vin+ VRef 5


INA128

22nF D NI

4
10M

3 2 1
CON3 -2.5_VCC -2.5_VCC

Front-End Board Schematics

DEFIBRILLATOR PROT ECT ION (DP2) D3 9.1V R11 10K LA RA LL RA D4 DS2 MC08010000 9.1V 22nF D NI C99 LL LA

Appendix A Front-End Board Schematics

DB15_ LA

R10

22K

The schematics for the ECG front-end board are shown below:

Figure 20. ECG_I_II


+2.5_VCC INST RUMENTAT ION AMPLIFIER (IA2) D NI +2.5_VCC

Copyright 2010, Texas Instruments Incorporated


C6 -2.5_VCC R12 D5 9.1V R17 R19 D6 DS3 MC08010000 9.1V 22nF D NI CON3 -2.5_VCC 10M C8 0.1uF -2.5_VCC C100 J3 +2.5_VCC 10K LL RA 6.8K

LOW PASS FILT ER (LPF2) Fc=159Hz 0.1uF TP9 GAIN 8.35

V+ In-

U1B

TP17

DEFIBRILLATOR PROT ECT ION (DP3)

2 1 Vo 8 3 Rg2 Vin+ V4 6

V+ U3 VinRg1

Out
L E AD_II R13 10K R14 R18 0E C7

7 5
OPA2335

L PF_II

In+ V-

DB15_LL

R16

22K

Ref 5

INA128 0E

0.1uF

3 2 1

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


+2.5_VCC

23

24
INST RUMENTAT ION AMPLIFIER (IA3) V1 C9 C10 0.1uF U4A -2.5_VCC DEFIBRILLATOR PROT ECT ION (DP4) R20 6.8K GAIN 8.35 D7 9.1V C11 R26 AVG_LA_RA_LL +2.5_VCC D NI +2.5_VCC LOW PASS FILT ER (LPF3) Fc=159Hz TP18

8 2 InOut
R21 10K 0E R22

7
TP10

0.1uF

V+

2 1 Vo V4
OPA2335 C12 0.1uF

V+ U5 VinRg1 1 6 In+
LEAD_V1

LPF_V1

Front-End Board Schematics

DB15_V1 R27 D8 10M C13 0.1uF -2.5_VCC DS4 MC08010000 9.1V 22nF D NI CON3 -2.5_VCC C101 J4 +2.5_VCC

R24 22K 10K

R25

V1

8 3 Rg2 Vin+ VRef 5


0E -2.5_VCC INA128 0.1uF

3 2 1

+2.5_VCC

D NI V2 C14 -2.5_VCC DEFIBRILLATOR PROT ECT ION (DP5) GAIN 8.35 LEAD_V2 R29 10K R30 R34 0E C15 R28 6.8K D9 9.1V DB15_V2 R35 D10 10M C16 0.1uF -2.5_VCC DS5 MC08010000 9.1V 22nF D NI CON3 -2.5_VCC +2.5_VCC C102 J5 +2.5_VCC R32 22K R33 V2 10K AVG_LA_RA_LL INST RUMENTAT ION AMPLIFIER (IA4) +2.5_VCC LOW PASS FILT ER (LPF4) Fc=159Hz TP19

7
TP11

0.1uF

V+ In-

U4B

2 1 Vo 8 3 Rg2 Vin+ VRef 5


INA128

V+ U6 VinRg1 6

Out 5 In+ V0.1uF 0E

7
OPA2335

LPF_V2

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


3 2 1
D N I +2.5_VCC V3 INST RUMENTAT ION AMPLIFIER (IA5) +2.5_VCC C17 C18 -2.5_VCC DEFIBRILLATOR PROT ECT ION (DP6) R36 D11 9.1V DB15_V3 R40 22K R41 10K V3 R43 D12 DS6 MC08010000 9.1V C103 22nF D NI +2.5_VCC J6 +2.5_VCC 10M AVG_LA_RA_LL 6.8K LOW PASS FILT ER (LPF5) Fc=159Hz

Figure 21. ECG_LEAD_V1_V2_V3

Copyright 2010, Texas Instruments Incorporated


7
0.1uF TP12

8 2 V+ InU7A

0.1uF

TP20

2 1

V+ U8 VinRg1 Vo 8 3

GAIN 8.35

Out 6
LEAD_V3 R37 10K R38 R42 0E C19

1 3

LPF_V3

In+ VRg2 Vin+ V4 Ref 5


INA128 0E 0.1uF

OPA2335

4
C20 0.1uF -2.5_VCC

3 2 1
CON3 -2.5_VCC

C21 0.1uF -2.5_VCC

SPRAB36B June 2010

www.ti.com

www.ti.com

V4 C22 -2.5_VCC DEFIBRILLATOR PROT ECT ION (DP7) GAIN 8.35 R44 6.8K D13 9.1V C23 R50 AVG_LA_RA_LL

INST RUMENTAT ION AMPLIFIER (IA6) +2.5_VCC

D NI LOW PASS FILT ER (LPF6) Fc=159Hz

SPRAB36B June 2010


7
TP13 0.1uF

6 InOut 7

V+
U7B

TP21

2 1 Vo VOPA2335

V+ U9 VinRg1 6 In+
LEAD_V4 10K 0E R45 R46

LPF_V4

DB15_V4 R51 D14 10M C24 0.1uF DS7 MC08010000 9.1V 22nF D NI CON3 -2.5_VCC -2.5_VCC +2.5_VCC V5 C26 -2.5_VCC DEFIBRILLATOR PROT ECT ION (DP8) GAIN 8.35 LEAD_V5 R53 10K R54 R58 0E C27 R52 6.8K D15 9.1V R56 10K R59 D16 DS8 MC08010000 10M C29 0.1uF -2.5_VCC 9.1V 22nF D NI CON3 -2.5_VCC C105 J8 +2.5_VCC 22K R57 V5 AVG_LA_RA_LL INST RUMENTAT ION AMPLIFIER (IA7) +2.5_VCC D NI +2.5_VCC C104 J7 +2.5_VCC

R48 22K

R49

10K V4

8 3 Rg2 Vin+ VRef 5


0E INA128 0.1uF

3 2 1

C25

LOW PASS FILT ER (LPF7) Fc=159Hz

8 2 V+ InOut 3 In+ V0.1uF 0E -2.5_VCC U10A

0.1uF TP22

7
TP14

0.1uF

2 1 Vo 8 3 Rg2 Vin+ VRef 5


INA128

V+ U11 VinRg1 6

1
OPA2335

LPF_V5

DB15_V5

4
C28 0.1uF

3 2 1

Figure 22. ECG_LEAD_V4_V5_V6


+2.5_VCC

Copyright 2010, Texas Instruments Incorporated


V6 INST RUMENTAT ION AMPLIFIER (IA8) +2.5_VCC C30 -2.5_VCC DEFIBRILLATOR PROT ECT ION (DP9) R60 D17 9.1V R64 22K R65 10K V6 R67 D18 DS9 MC08010000 9.1V C106 22nF D NI J9 +2.5_VCC 10M AVG_LA_RA_LL 6.8K

D NI

LOW PASS FILT ER (LPF8) Fc=159Hz TP23

0.1uF GAIN 8.35

TP15

V+ In2 1 V+ U12 VinRg1 Vo 8 3

U10B

Out 6
LEAD_V6 R61 10K R62 R66 0E C31

7 5

LPF_V6

In+ VRg2 Vin+ V4 Ref 5


INA128 0E 0.1uF

OPA2335

DB15_V6

3 2 1
CON3 -2.5_VCC

C32 0.1uF

+2.5_VCC

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


-2.5_VCC

Front-End Board Schematics

25

U13

AVDD

DVDD

28

AINCOM

AVSS

GND_PAD

TEMP
D NI

DNC1 8
10uF TP29 0.1uF 100uF C79 OPA335 0.1uF C48 0.1uF 10uF C46 C47

In+ V2
C43 TP28 C44

32

49

TRIM

DNC2

Copyright 2010, Texas Instruments Incorporated


0.1uF 10uF 0.1uF 10uF R110 10K R111 R112 R114 R116 R118 10K R113 10K R115 10K R117 51E R119 R76 0E 10K 10K 10K 10K LPF_I L PF_II LPF_V1 LPF_V2 LPF_V3 LPF_V4 LPF_V5 LPF_V6

1uF

7 GND NC REF5025 4
-2.5_VCC TP30

C49

C50 0.1uF 10uF -2.5_VCC

-2.5_VCC Layout note: Move C44 as clos e to U13.31 & U13.30 pins a s possible and C33 close to U 13.6 pin

29

C45

DGND

26
AD C +2.5_VCC C33 C34 C35 C107 3.3_VCC TP31 TP32 +2.5_VCC U14 SPI_OUT S P I_DRDY C36

Front-End Board Schematics

GPIO0 GPIO1 GPIO2 GPIO3 GPIO4 GPIO5 GPIO6 GPIO7

14 15 16 17 18 19 20 21

ADC VOLTAGE REFERE NCE +2.5_VCC 0E 0E 0E 0E R70 R73 R74 +2.5_VCC 10K 10K C38 0.1uF R122 0E R121 0E R120 0E R79 0E U15 R77 R72 R68

DOUT DRDY CLKIO ADCINP ADCINN MUXOUTN MUXOUTP PLLCAP XTAL1 XTAL2

24 25 13 42 41 43 44 7 8

5
47E C37 2.2nF

0.1uF

0E R69 0E R71 0E R75 0E R78

4 3 2 1 48 47 46 45 40 39 38 37 36 35 34 33 AIN0 AIN1 AIN2 AIN3 AIN4 AIN5 AIN6 AIN7 AIN8 AIN9 AIN10 AIN11 AIN12 AIN13 AIN14 AIN15

V+ InOut 3
C39 22nF C40 4.7pF Y1 32.768KHz

TP24

5 4
R123

In+ V2
OPA335 C41 0.1uF

V+ InOut 1 VREFP VREFN 30 31

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


SPI_CLK S P I_IN SPI_START SPI_CS

10 11 12 22 23 26 27 PWDN RESET CLKSEL SCLK DIN START CS

+2.5_VCC

U16

2
0E

Figure 23. ECG_ADC


6 1 3
R80 100E 1K R81

VIN

VOUT

C42 4.7pF

-2.5_VCC

ADS1258

SPRAB36B June 2010

www.ti.com

www.ti.com

LOW PASS FILT ERS Fc = 15.9Hz

LEAD OFF DET ECT ION COMPARATORS

R124 0E R A' TP33 C51 R82 U17 5 100K R A' 0.1uF 3.3_VCC

C92 L A'

VCC

0.1uF

GND

IN1IN1+ IN2IN2+ IN3IN3+ IN4IN4+ OUT1 OUT2 OUT3 OUT4


TLV3404

U19

24

11

VCC

V4 V3'

V4'

VCC

C95 V4' T HRSH_VOL V5' T HRSH_VOL V6'

T HRSH_VOL

Figure 24. ECG_LEAD_OFF_DET

C96

GND

IN1IN1+ IN2IN2+ IN3IN3+ IN4IN4+ OUT1 OUT2 OUT3 OUT4


TLV3404

0.1uF +2.5_VCC V6' R83 100K_POT T HRSH_VOL R92 C54 10nF 100K_POT 1uF C55 TP44

R132 0E

V6

C97

0.1uF

Note: If LPF not required put a 0 ohm jumper on the resistor path and do not populate capacitors

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


T HRSH_VOL V1' V2' T HRSH_VOL

Front-End Board Schematics

-2.5_VCC

11

12

Copyright 2010, Texas Instruments Incorporated


I2C I/O EXPANDER V1' U18 0.1uF 100K100K100K100K100K100K100K100K TP34 TP36 C52 R84 R85 R86 R87 R88 R89 R90 R91 T HRSH_VOL

R131 V5' T HRSH_VOL

0E

A0 A1 A2 PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 PB0 PB1 PB2 PB3 PB4 PB5 PB6 PB7

GND

SPRAB36B June 2010


4 IN- VCC OUT
T HRSH_VOL L A'

RA

C89

0.1uF

R125 0E

LA

C90

3 IN+ GND TLV3401 2

0.1uF

R126 0E LL' 3.3_VCC TP41 3.3_VCC TP35

LL

C91

0.1uF

R127 0E

V1

3.3_VCC

0.1uF

1 7 8 14
C53 R93 0.1uF 10K 4.7K 4.7K TP25 TP26 TP27 R94 R95

LL'

R128 0E V2' T HRSH_VOL

V2

C93

2 3 6 5 9 10 13 12

R129 V3' TP37 3.3_VCC C56 U20 0.1uF TP38 TP40 TP39

0E

V3

C94

INT SCL SDA

1 22 23

I2C_INT I2C_SCL I2C_SDA

0.1uF

R130 0E

1 7 8 14

0.1uF

21 2 3 4 5 6 7 8 9 10 11 13 14 15 16 17 18 19 20

V5

2 3 6 5 9 10 13 12

PCA9535

27

28
+2.5_VCC C57

Front-End Board Schematics

5 U21 3 IN- V+ OUT 1 IN+ VTLV2221 2 4

0.1uF

LA

C58 0.1uF -2.5_VCC RL DRIVE CKT C59 47pF R96 390K +2.5_VCC C60 0.1uF TP42 B UFF_LA R97 R98 10K R100 TP43 R103 R104 C62 R105 0.1uF -2.5_VCC 10K AVG_LA_RA_LL 10K 10K 10K 10K R99 RLD_VOL 10K RLD_VOL U23 C61 0.1uF -2.5_VCC DEFIBRILLATOR PROT ECT ION (DP10) +2.5_VCC GAIN -39

5 U22 3 IN- V+ OUT 1 IN+ VTLV2221 2


BUFF_LL

5 4 V+ InOut 3 In+ V2

D19 9.1V

B U FF_RA

RA

1 R133

390K

R101

10K

R102

22K

DB15_RL

D20 OPA335 9.1V C63 0.1uF +2.5_VCC -2.5_VCC DS10 MC08010000

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


+2.5_VCC C64 WILSON T ERMINAL

Figure 25. Right Leg Drive


0.1uF

Copyright 2010, Texas Instruments Incorporated


5 U24 3 IN- V+ OUT 1 IN+ VTLV2221 2 4
C65 0.1uF -2.5_VCC

LL

BUFFER FOR LA,RA&LL signals

SPRAB36B June 2010

www.ti.com

www.ti.com

GND

2 4 6 8 10
0.1uF 5_VCC TP4 3.3uH 3.3uH C81 10uF -5_VCC U27 LDO -2. 5V L2 U26 100uF

1 3 5 7 9 3
-5_VCC L3 TP5

5 CFLY+ OUT GND 4 2


TPS60403 1uF 10uF C71 C87

CFLY2 IN 1

TP1 POWER_CONN C80 J11 10uF BRD_DET0 BRD_DET1 C74 10uF 1uF C86 C70

S PI_IN SPI_OUT I2C_INT I2C_SCL I2C_SDA L1 +2.5_VCC DATA_CONN C88 EVM GND- FE GND ISOLAT ION J12 0.1uF -2.5_VCC BEAD

GND

SPRAB36B June 2010


LDO +2.5V 5_VCC U25 L4 +2.5_VCC 3.3uH TP6

CONNECTOR INT ERFACE

1
J10 C66 -5V INVERTER 1.8_VCC 3.3_VCC

5_VCC

IN EN NR 4

OUT

5
C82 C68 C69 2.2uF 0.01uF 10uF 10uF C83

3
C67 1uF 0.1uF

C75

C76

TP2

C77

C78

0.1uF TP3 TPS73025

100uF

-2.5_VCC L5 3.3uH TP7

SPI_START SPI_CLK

IN 3 EN

OUT NR

5
C72 C84 C85

SPI_CS S P I_DRDY

4
2.2uF 10uF 10uF C73 TPS72325 0.01uF

1 3 5 7 9 11 13 15 17 19
2.2uF

2 4 6 8 10 12 14 16 18 20

DECOUPLING +2.5V & -2.5V

J13

3 2 1
CON3 DB15_RL

2 4 6 8 10 12 14 16 18 20

1 3 5 7 9 11 13 15 17 19

RLD_VOL

ECG ELECT RODE CO NNECTOR P1

DUMMY_CONN 3.3_VCC 3.3_VCC FRONT END BOARD DET ECT ION MEC HANISM R106 10K BRD_DET0 10K BRD_DET1 R108

Figure 26. PWR_CONN_INTRFCE

Copyright 2010, Texas Instruments Incorporated


DB15_V6 DB15_V1 DB15_V5 DB15_LL DB15_V4 DB15_LA DB15_ V3 DB15_RA DB15_V2 R107 0E D NI R109 BRD_DET1 0E ECG STETH SPO2 1 0 1 1 1 0 BRD_DET0

8 15 7 14 6 13 5 12 4 11 3 10 2 9 1
CONNECTOR DB15

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)

Front-End Board Schematics

29

www.ti.com

Appendix B Front-End Board BOM B.1 Front-End Board BOM


Table 3 provides the bill of material for the digital stethoscope front-end board. Table 3. Bill of Material
Ite m 1 Quantit y 17 Value 0.1 mF Reference C1,C4,C9,C12,C17, C20,C25,C28,C89, C90,C91,C92,C93, C94,C95,C96,C97 C2,C3,C5,C6,C7, C8,C10,C11,C13, C14,C15,C16,C18, C19,C21,C22,C23, C24,C26,C35,C36, C38,C41,C44,C46, C27,C29,C30,C31, C32,C33, 48,C49, C51,C52,C53,C56, C64,C65,C66,C75, C77,C88 C57,C58, C60,C61,C62,C63 Description CAP CERM 0.10 mF 50 V 5% 0805 SMD Part Number 08055C104JAT2A Manufacturer AVX Corporation DNI DNI

49

0.1 mF

CAP CERM 0.10 mF 50 V 5% 0805 SMD

08055C104JAT2A

AVX Corporation

3 4 5 6 7 8 9 10 11 12 13 14

5 1 1 2 5 3 1 13 3 2 8 9

10 mF 2.2 nF 22 nF 4.7 nF 1 mF 100 mF 10 nF 47 pF 2.2 mF 0.01 mF 10 mF 22 nF

C34,C43,C50,C79, C107 CAP TANT LOESR 10 mF 16 V 10% SMD C37 C39 C40,C42 C45,C55,C67,C70, C71 C47,C76,C78 C54 C59 C68,C72,C74 C69,C73 C80,C81,C82,C83,C84, C85, C86,C87 C98,C99,C100,C101,C1 02, C103,C104,C105,C106 CAP CERM 2200 pF 5% 50 V NPO 0805 CAP CER 22000 pF 50 V X7R 0805 CAP CER 4.7 pF 50 V NPO 0805 CAP CERM 1.0 mF 10% 25 V X7R 0805 CAP ELECT 100 mUF 16 V TK SMD CAP CER 10000 pF 16 V NPO 0805 CAP CERM 47 pF 5% 50 V NPO 0805 CAP CER 2.2 mUF 25 V X7R 0805 CAP CERM 0.01 10% 50 V X7R 0805 CAP CER 10 mF 16 V X5R 0805 CAP CER 22000 pF 50 V X7R 0805

TPSB106K016R080 0 08055A222JAT2A 08055C223J4T2A 08055A4R7BAT2A 08053C105KAZ2A EEE-TK1C101P 0805YA103JAT4A 08055A470JAT2A 08053C225MAT2A 08055C103KAT2A

AVX Corporation AVX Corporation AVX Corporation AVX Corporation AVX Corporation Panasonic-ECG AVX Corporation AVX Corporation AVX Corporation AVX Corporation

EMK212BJ106KG-T Taiyo Yuden 08055C223J4T2A AVX Corporation Multicomp

15

10

MC08010000

DS1,DS2,DS3,DS4,DS5, Neon lamp DS6, DS7,DS8,DS9,DS10 D1,D2,D3,D4,D5,D6,D7, D8, D9,D10,D11,D12,D13,D 14, D15,D16,D17,D18,D19, D20 J1,J2,J3,J4,J5,J6,J7, J8, J9,J13 J10 J11 DIODE ZENER 1W 9.1 V SOD-106

MC08010000

16

20

9.1 V

PTZTE259.1B

ROHM

17 18 19

10 1 1

CON3 POWER_CONN DATA_CONN

CONN HEADER 3POS .100 VERT TIN Elevated Female Header 5x2 Elevated Female Header 10x2

22-28-4030 BB02-KD102-T03100000 BB02-KD202-T03100000

Molex Gradconn Gradconn

30

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

www.ti.com

Front-End Board BOM

Table 3. Bill of Material (continued)


Ite m 20 21 22 23 24 25 26 Quantit y 1 1 4 1 9 10 10 Value DUMMY_CONN BEAD 3.3 mH CONNECTOR DB15 10M 22K 10K Reference J12 L1 L2,L3,L4,L5 P1 R1,R9,R19,R27,R35,R4 3, R51,R59,R67 R2,R10,R16,R24,R32,R 40,R48,R56,R64,R102 R3,R11,R17,R25, R33,R41, R49,R57,R65,R101 R4,R12,R20,R28,R36, R44, R52,R60 R5,R13,R21,R29,R37, R45,R53,R61,R97, R98, R99,R100, R103,R104,R105 R6,R8,R14,R18,R22, R26,R30,R34,R38, R42,R46,R50,R54, R58,R62,R66,R68, R69,R70,R71,R72, R75,R77,R78, R79, R119,R120,R121, R122,R124,R125, R126,R127,R128, R129,R130,R131, R132 R73,R74,R93,R110, R111,R112,R113, R114,R115,R116, R117 R76 R80 R81 R82,R84,R85,R86, R87,R88,R89,R90, R91 R83,R92 R95,R94 R96,R133 R108,R106 R107,R109,R123 R118 U1,U4,U7,U10 Description Elevated Female Header 10x2 FERRITE BEAD 470 0805 INDUCTOR POWER 3.3 mH 1.3A SMD CONN D-SUB RCPT R/A 15POS PCB AU RES 10.0M 1/8W 1% 0805 SMD RES 22K 1W 5% 2512 SMD RES 10K 1/2W 5% 2010 SMD Part Number BB02-KD202-T03100000 BK2125HM471-T VLF4012AT3R3M1R3 745782-4 Manufacturer Gradconn Taiyo Yuden DK Corporation Tyco Electronics DNI

CRCW080510M0FK Vishay EA CRCW251222K0JN EG CRCW201010K0JN EF Y162406K8000T9R Y162410K0000T9R Vishay Vishay

27 28

8 15

6.8K 10K

High Precision Chip Resistor 6.8K High Precision Chip Resistor 10K

Vishay Vishay

29

38

0E

RES 0.0 1/8W 5% 0805 SMD

CRCW08050000Z0 EA

Vishay

30

11

10K

RES 10.0K 1/8W 1% 0805 SMD CRCW080510K0FK EA High Precision Chip Resistor 47 RES 1.00K 1/8 W 1% 0805 SMD High Precision Chip Resistor 100 m RES 100K 1/8W 1% 0805 SMD POT 100K 4MM SQ CERMET SMD Y162447R0000T9R CRCW08051K00FK EA Y1624100R000T9R CRCW0805100KFK EA 3314G-1-104E

Vishay

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

1 1 1 9 2 2 2 2 3 1 4 8 1 3 1

47E 1K 100E 100K 100K_POT 4.7K 390K 10K 0E 51E OPA2335 INA128 ADS1258 OPA335 REF5025

Vishay Vishay Vishay Vishay Bourns Inc Vishay Vishay Vishay Vishay Vishay TI TI TI TI TI DNI DNI DNI

RES 4.70K 1/8W 1% 0805 SMD CRCW08054K70FK EA High Precision Chip Resistor 390K TNPW0805390KBY TA

RES 10.0K 1/8W 1% 0805 SMD CRCW080510K0FK EA RES 0.0 1/8W 5% 0805 SMD RES 51 1/8W 5% 0805 SMD IC OP AMP CMOS SGL SPLY 8-MSOP CRCW08050000Z0 EA CRCW080551R0JN EA OPA2335AIDGKT INA128UA ADS1258IRTCT OPA335AIDBVT REF5025AID

U2,U3,U5,U6,U8,U9,U11 IC LOW PWR INSTR AMP , U12 8-SOIC U13 U14,U15,U23 U16 IC ADC 24 BIT 125 ksps 48-QFN IC OP AMP CMOS SGL SPLY SOT-23-5 IC PREC V-REF 2.5 V LN 8-SOIC

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

31

Front-End Board BOM

www.ti.com

Table 3. Bill of Material (continued)


Ite m 46 47 48 49 50 51 52 53 Quantit y 1 2 1 3 1 1 1 1 Value TLV3401 TLV3404 PCA9535 TLV2221 TPS73025 TPS60403 TPS72325 32.768KHz Reference U17 U18,U20 U19 U21,U22,U24 U25 U26 U27 Y1 Description IC OUT COMPARATOR NANOPWR SOT23-5 Part Number TLV3401IDBVR Manufacturer TI TI TI TI TI TI TI Epson Toyocom Corporation DNI

COMPARATOR LW POWER R-R TLV3404IDR 14-SOIC IC REMOTE 16-BIT I/O EXP 24-TSSOP IC RAIL-TO-RAIL OP AMP SOT-23-5 IC LDO REG HI-PSRR 2.5 V SOT23-5 IC UNREG CHRG PUMP V INV SOT23-5 IC LDO REG 200MA 2.5 V SOT23-5 CRYSTAL 32.7680 KHz 12.5 pF CYL PCA9535PWR TLV2221CDBVR TPS73025DBV TPS60403DBVT TPS72325DBVT C-001R 32.7680KA:PBFREE

32

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

www.ti.com

Appendix C Sensors and Accessories C.1 ECG Cable Details

Figure 27. ECG Cable Details Cable details: 10 lead ECG cable for philips/hp -snap, button (Part No: 010302013) http://www.biometriccables.com/index.php?productID=692 Cable details: 10 lead ECG cable for philips/hp -Clip-on type (P/n-010303013A) http://www.biometriccables.com/index.php?productID=693 Other compatible cables for MDK: HP/Philips/Agilent Compatible 10 Lead ECG cable

C.2

ECG Sensor
Sensor details: Disposable Electrodes - Medico Lead - Lok Vendor name: Medico Electrodes International Link : http://www.medicoleadlok.com/ Other compatible parts: Any Ag/AgCl solid gel ECG electrode on the market.

SPRAB36B June 2010

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

33

www.ti.com

Appendix D MEDICAL DEVELOPMENT KIT (MDK) WARNINGS, RESTRICTIONS AND DISCLAIMER


Not for Diagnostic Use: For Feasibility Evaluation Only in Laboratory/Development Environments. The MDK may not be used for diagnostic purposes. This MDK is intended solely for evaluation and development purposes. It is not intended for diagnostic use and may not be used as all or part of an end equipment product. This MDK should be used solely by qualified engineers and technicians who are familiar with the risks associated with handling electrical and mechanical components, systems and subsystems. Your Obligations and Responsibilities. Please consult the TMS320VC5505 DSP Medical Development Kit (MDK) Quick Start Guide (SPRUGO1) prior to using the MDK. Any use of the MDK outside of the specified operating range may cause danger to the users and/or produce unintended results, inaccurate operation, and permanent damage to the MDK and associated electronics. You acknowledge and agree that: You are responsible for compliance with all applicable Federal, State and local regulatory requirements (including but not limited to Food and Drug Administration regulations, UL, CSA, VDE, CE, RoHS and WEEE,) that relate to your use (and that of your employees, contractors or designees) of the MDK for evaluation, testing and other purposes. You are responsible for the safety of you and your employees and contractors when using or handling the MDK. Further, you are responsible for ensuring that any contacts or interfaces between the MDK and any human body are designed to be safe and to avoid the risk of electrical shock. You will defend, indemnify and hold TI, its licensors and their representatives harmless from and against any and all claims, damages, losses, expenses, costs and liabilities (collectively, "Claims") arising out of or in connection with any use of the MDK that is not in accordance with the terms of this agreement. This obligation shall apply whether Claims arise under the law of tort or contract or any other legal theory, and even if the MDK fails to perform as described or expected.

WARNING
If defibrillator is used for development purposes, use of medical grade EVM input power supply (Accessory Part Number: SL Power AULT Model MW173KB0503F01) is strongly recommended. Use of the Isolator (Accessory Part Number: MOXA Model Name: TCC-82) that isolates the MDK from the PC is also strongly recommended. These accessories provide additional supplemental protection to development users from high voltages that may be present when introducing defibrillator voltages during development simulation. There may also be other voltage transients sourced from the defibrillator to accompanying interface hardware such as a personal computer when used in conjunction with the ECG/EVM development hardware.

WARNING
To minimize risk of electric shock hazard, use only the following power supplies for the EVM module: Medical Development Applications: SL Power AULT Model MW173KB0503F01.

34

ECG Implementation on the TMS320C5515 DSP Medical Development Kit (MDK)


Copyright 2010, Texas Instruments Incorporated

SPRAB36B June 2010

IMPORTANT NOTICE
Texas Instruments Incorporated and its subsidiaries (TI) reserve the right to make corrections, modifications, enhancements, improvements, and other changes to its products and services at any time and to discontinue any product or service without notice. Customers should obtain the latest relevant information before placing orders and should verify that such information is current and complete. All products are sold subject to TIs terms and conditions of sale supplied at the time of order acknowledgment. TI warrants performance of its hardware products to the specifications applicable at the time of sale in accordance with TIs standard warranty. Testing and other quality control techniques are used to the extent TI deems necessary to support this warranty. Except where mandated by government requirements, testing of all parameters of each product is not necessarily performed. TI assumes no liability for applications assistance or customer product design. Customers are responsible for their products and applications using TI components. To minimize the risks associated with customer products and applications, customers should provide adequate design and operating safeguards. TI does not warrant or represent that any license, either express or implied, is granted under any TI patent right, copyright, mask work right, or other TI intellectual property right relating to any combination, machine, or process in which TI products or services are used. Information published by TI regarding third-party products or services does not constitute a license from TI to use such products or services or a warranty or endorsement thereof. Use of such information may require a license from a third party under the patents or other intellectual property of the third party, or a license from TI under the patents or other intellectual property of TI. Reproduction of TI information in TI data books or data sheets is permissible only if reproduction is without alteration and is accompanied by all associated warranties, conditions, limitations, and notices. Reproduction of this information with alteration is an unfair and deceptive business practice. TI is not responsible or liable for such altered documentation. Information of third parties may be subject to additional restrictions. Resale of TI products or services with statements different from or beyond the parameters stated by TI for that product or service voids all express and any implied warranties for the associated TI product or service and is an unfair and deceptive business practice. TI is not responsible or liable for any such statements. TI products are not authorized for use in safety-critical applications (such as life support) where a failure of the TI product would reasonably be expected to cause severe personal injury or death, unless officers of the parties have executed an agreement specifically governing such use. Buyers represent that they have all necessary expertise in the safety and regulatory ramifications of their applications, and acknowledge and agree that they are solely responsible for all legal, regulatory and safety-related requirements concerning their products and any use of TI products in such safety-critical applications, notwithstanding any applications-related information or support that may be provided by TI. Further, Buyers must fully indemnify TI and its representatives against any damages arising out of the use of TI products in such safety-critical applications. TI products are neither designed nor intended for use in military/aerospace applications or environments unless the TI products are specifically designated by TI as military-grade or "enhanced plastic." Only products designated by TI as military-grade meet military specifications. Buyers acknowledge and agree that any such use of TI products which TI has not designated as military-grade is solely at the Buyer's risk, and that they are solely responsible for compliance with all legal and regulatory requirements in connection with such use. TI products are neither designed nor intended for use in automotive applications or environments unless the specific TI products are designated by TI as compliant with ISO/TS 16949 requirements. Buyers acknowledge and agree that, if they use any non-designated products in automotive applications, TI will not be responsible for any failure to meet such requirements. Following are URLs where you can obtain information on other Texas Instruments products and application solutions: Products Amplifiers Data Converters DLP Products DSP Clocks and Timers Interface Logic Power Mgmt Microcontrollers RFID amplifier.ti.com dataconverter.ti.com www.dlp.com dsp.ti.com www.ti.com/clocks interface.ti.com logic.ti.com power.ti.com microcontroller.ti.com www.ti-rfid.com Applications Audio Automotive Communications and Telecom Computers and Peripherals Consumer Electronics Energy Industrial Medical Security Space, Avionics & Defense Video and Imaging Wireless www.ti.com/audio www.ti.com/automotive www.ti.com/communications www.ti.com/computers www.ti.com/consumer-apps www.ti.com/energy www.ti.com/industrial www.ti.com/medical www.ti.com/security www.ti.com/space-avionics-defense www.ti.com/video www.ti.com/wireless-apps

RF/IF and ZigBee Solutions www.ti.com/lprf

Mailing Address: Texas Instruments, Post Office Box 655303, Dallas, Texas 75265 Copyright 2010, Texas Instruments Incorporated

You might also like