You are on page 1of 48

NOVEL DEVELOPMENT AND IMPLEMENTATION OF LOW POWER ECG MESUREMENT AND HEART RATE MONITOR FOR ELECTROCARDIOGRAM

PROJECT REPORT PHASE -I Submitted by

SEETHALAKSHMI P Register No: 710012401015


in partial fulfillment for award of the degree of

MASTER OF ENGINEERING
in APPLIED ELECTRONICS

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

ANNA UNIVERSITY REGIONAL OFFICE, COIMBATORE COIMBATORE-641047


DECEMBER 2013

ANNA UNIVERSITY REGIONAL OFFICE, COIMBATORE COIMBATORE -641047.


Department of Electronics and Communication Engineering
PROJECT WORK PHASE - I DECEMBER 2013

This is to certify that the project entitled is the bonafide record of project work done by

NOVEL DEVELOPMENT AND IMPLEMENTATION OF LOW POWER ECG MESUREMENT AND HEART RATE MONITOR FOR ELECTROCARDIOGRAM

SEETHALAKSHMI P Register No: 710012401015 of M.E (APPLIED ELECTRONICS) during the year 2012-2014

---------------------------Dr.V.R.VIJAYKUMAR, M.E., Ph.D.,

--------------------------Dr.R.VIJAYABHASKER, M.E., Ph.D.,

Head of the Department

Project guide

Submitted for the project viva-voce examination held on_____________

-----------------------Internal Examiner

----------------------External Examiner

ABSTRACT Real-time monitoring of cardiac health is helpful for patients with cardiovascular disease. Now a days the volume of Electrocardiogram (ECG) recorded in hospitals is increasing as the people suffering from heart diseases are increasing at an alarming rate. The ECG is one of the medical equipment that can measure the heart rate, convert it into a signal and present the data on a piece of paper or on a monitor. An ECG is a recording of the electrical activity on the body surface generated by the heart. Many telemedicine

systems based on ubiquitous computing and communication techniques have been proposed for monitoring the user's electrocardiogram (ECG) anywhere and anytime. Usually, electrodes are used in these telemedicine systems. However, electrodes require conduction gels and skin preparation that can be inconvenient and uncomfortable for users and also requires more power. In order to overcome this issue, a new novel for low power ECG measurement is proposed and applied in developing in microcontroller for various measurement of electrocardiogram signal on PC and heart rate is displayed with the LCD. The software tool used for this ECG and heart rate measurement is CC studio 5.4v and oscilloscope with on PC and hardware kit is MSP430 Experimenter board.

ACKNOWLEDGEMENT First and foremost I place this project work on the feet of GOD ALMIGHTY who is the power of strength in each step of progress towards the successful completion of phase I project. I would like to express my sense of profound gratitude and indebtedness to

Dr.R.VIJAYABHASKER, M.E., Ph.D., for his invaluable guidance,


suggestion and timely supervision for successful completion of the phase I project. I am highly indebted to Dr.V.R.VIJAYKUMAR, BE., M.E., Ph.D., Head of the Department of ECE for providing invaluable insights into the subject and helping me wherever possible. I thank Dr.K.SARAVANA KUMAR, MBA., Ph.D., Dean-Campus Anna University, Regional Office, and Coimbatore for his great support with blessings. I also extend my heartfelt thanks to all staff members of ECE Department who have rendered their valuable help in making this project successful. Above all I would like to thank all the members of my family and friends for their constructive criticism and constant support in making this project a grand success.

SEETHALAKSHMI P Reg No.:7100124101015 M.E APPLIED ELECTRONICS

TABLE OF CONTENTS CHAPTER NO. ABSTRACT LIST OF TABLES LIST OF FIGURES LIST OF ABBREVIATIONS 1 INTRODUCTION 1.1 1.2 1.3 1.4 2 OVERVIEW OBJECTIVE OF THE WORK MOTIVATION OF THE WORK CHAPTER ORGANISATION
[[

TITLE

PAGE NO. Iii viii ix x 1 1 2 2 3 4 4 4

LITERATURE REVIEW 2.1 A WEARABLE MULTI PARAMETER MEDICAL MONITORING AND ALERT SYSTEM 2.2 BLUETOOTH TELEMEDICINE PROCESSOR FOR MULTICHANNEL BIOMEDICAL SIGNAL TRANSMISSION VIA MOBILE 2.3 A MOBILE CARE SYSTEM WITH ALERT MECHANISM 2.4 A MULTICHANNEL PORTABLE ECG SYSTEM WITH CAPACITIVE SENSORS 2.5 AN INTELLIGENT TELECARDIOLOGY SYSTEM USING A WEARABLE AND WIRELESS ECG TO DETECT ATRIAL FIBRILLATION 2.6 A SMART HEALTH MONITORING CHAIR FOR NONINTRUSIVE MEASUREMENT OF BIOLOGICAL SIGNALS

HARDWARE DESCRIPTION 3.1 INTRODUCTION ABOUT MSP430 EXPERIMENTER BOARD 3.1.1 3.2 3.3 Board Features

7 7

8 9 10 10 10 10 10 11 12 12 12 13 13 13 13 14 14 14 14 14 15 15 16 19 20

MICROCONTROLLER BLOCK DIAGRAM MSP430FG4618 SPECIFICATIONS 3.3.1 3.2.2 3.2.3 3.2.4 3.2.5 3.2.6 3.2.7 3.2.8 3.2.9 3.2.10 3.2.11 3.2.12 3.2.13 3.2.14 3.2.15 3.2.16 3.2.17 3.2.18 Peripherals CPU DMA controller Oscillator and system clock Brownout, Supply Voltage Supervisor Digital I/O Basic Timer1 and Real-Time Clock LCD_A drive with regulated charge pump Watchdog timer Universal serial communication interface USART1 Hardware multiplier Timer_A3 Timer_B7 Comparator A ADC12 DAC12 OA

3.4

PIN DIAGRAM AND DESCRIPTION 3.4.1 Pin Description

3.5 3.6

MSP 430FG4618 MICROCONTOLLER FEATURES APPLICATIONS OF MSP430

SYSTEM DESIGN AND IMPLEMENTATION 4.1 OVERVIEW 4.1.1 4.1.2 4.1.3 4.2 Introduction to ECG Electrocardiographs Fingertip capacitance

21 21 21 22 23 24

IMPLEMENTATION OF ECG MONITORING SYSTEM

SIMULATION RESULTS AND DISSCUSSION 5.1 OVERVIEW OF THE SOFTWARE 5.1.1 5.2 5.3 5.4 5.5 Steps to execute the CC studio

27 27 28 29 30 30 32 33 34

CALCULATING THE HEART RATE TESTING THE APPLICATION WITH CC STUDIO HEART RATE MONITORING PC SCOPE FOR ECG DISPLAY

CONCLUSION 6.1 FUTURE WORK

REFERENCES

LIST OF TABLE TABLE NO. 3.4.1 TITLE Pin description of MSP430FG4618 PAGE NO 16

LIST OF FIGURE FIGURE NO. 3.1 3.2 3.4 4.1.2 4.1.3 4.2 4.3 5.3 5.4 5.5 TITLE MSP430 Experimenter Board MSP430FG4618 Block diagram Pin Diagram of MSP430FG4618 ECG waveform Capacitive Sensing Plate ECG Monitoring System Complete Schematic of the Application Execution of program Snapshot of heart rate monitoring PC Scope Program for ECG Display PAGE NO 7 9 15 22 23 24 26 30 31 32

LIST OF ABBREVIATIONS ACLK ADC ARM ASIC BP CCS CPU DCO DMA DSP ECG FLL GPRS HR IDE I2C JTAG LCD LED LF MCLK Auxiliary clock Analog to Digital Converter Advanced RISC Machine Application Specific Integrated Circuits Blood Pressure Code Composer Studio Central Processing Unit Digitally Controlled Oscillator Direct Memory Access Digital Signal Processor Electrocardiogram Frequency Locked Loop Global Positioning Remote Sensing Heart Rate Integrated Development Environment Inter Integrated Circuit Joint Test Action Group Liquid Crystal Display Light Emitting Diode Liner Frequency Main clock

MCU MI MSP MUX OA PC PPG PWM RAM RISC RTC SMCLK SPI SVS SVM USB FET

Microcontroller Myocardial infarction Mixed Signal Processor Multiplexer Operational Amplifier Personal Computer Photoplethysmograph Pulse Width Modulation Random Access Memory Reduced Instruction Set Real Time Clock Sub-Main clock Serial Programming Interface Supply Voltage Supervisor Supply Voltage Monitoring Universal Serial Bus Flash Emulation Tool

USCI UART USART

Universal serial communication interface Universal Asynchronous Receive Transmit Universal Synchronous/Asynchronous Receive Transmit

USI WDT

Universal Serial Interface Watch Dog Timer

CHAPTER 1 INTRODUCTION
1.1 OVERVIEW Nowadays, the volume of Electrocardiogram (ECG) recorded in hospitals is increasing as the people suffering from heart diseases are increasing at an alarming rate. The ECG is one of the medical equipment that can measure the heart rate, convert it into a signal and present the data on a piece of paper or on a monitor. An ECG is a recording of the electrical activity on the body surface generated by the heart. ECG measurement information is collected by electrodes placed at designated locations on the body. It is the best way to measure and diagnose abnormal rhythms of the heart [2] and [3], particularly abnormal rhythms caused by damage to the conductive tissue that carries electrical signals, or abnormal rhythms caused by electrolyte imbalances [4] and [7]. In a Myocardial infarction (MI), the ECG can identify if the heart muscle has been damaged in specific areas, though not all areas of the heart are covered [8] and [9]. The ECG cannot reliably measure the pumping ability of the heart, for which ultrasound-based (echocardiography) or nuclear medicine tests are used. It is possible to be in cardiac arrest with a normal ECG signal (a condition known as pulse less electrical activity). Electro-cardiogram (ECG) is [13] one of frequently used and accurate methods for measuring the heart rate. ECG is an expensive device and its use for the measurement of the heart rate only is not economical. Low-cost devices in the form of wrist watches [20] are also available for the instantaneous measurement of the heart rate. Such devices can give accurate measurements but their cost is usually in excess of several hundred dollars, making them uneconomical. Most hospitals and clinics in the UK use integrated devices designed to measure the heart rate, blood pressure,

and temperature of the subject. Although such devices are useful, their cost is usually high and beyond the reach of individuals. This paper describes the design of a low power ECG monitoring system which monitors ECG and heart rate measurement system which measures the heart rate of the subject by touching 4 symbols by the arms and then displaying the heart rate on Liquid Crystal Display (LCD) and the ECG waveform is shown by oscilloscope software on the PC. The device has the advantage that it is microcontroller based and thus can be programmed to display various quantities, such as the normal, maximum and minimum rates over a period of time and so on. Another advantage of such a design is that it can be expanded and can easily be connected to a recording device or a PC to collect and analyze the data for over a period of time. 1.2 MOTIVATION OF THE WORK The motivation behind the project was the need for a small, portable and ultra-low power wireless EEG recording system that is built from commercially available electronic components, to help the research of animal behavior and learning. There are many implementations of portable EEG and ECG monitoring devices, but most of them were designed using special ASIC or custom built integrated circuits. These were either never commercialized or are far too expensive to be used in academic researches. This work is part of a wider university project that was initiated to research the implications of in brain activity. This thesis work aims to help support the heart rate experiments by providing a necessary tool and lowering the research expenses. 1.3 OBJECTIVES OF THE WORK A novel low power ECG measurement was proposed in this study. This application report describes how to build a digital heart-rate monitor
2

using a MSP430FG4618 microcontroller (MCU). The heartbeat rate per minute is displayed on an LCD. In addition, the application outputs a digital data stream via an RS232 serial port to allow ECG waveform display on a PC. The entire application runs using a CR2032 3-V lithium battery. The experimental result presented that the low power ECG measurement performs better for ECG measurement and heart rate, and is practicable for daily life applications. 1.4 CHAPTER ORGANIZATION The major objective of Phase-I project work is ECG implementation and execution in target board. Chapters are organized as follows: Chapter 1 Gives the brief introduction about ECG monitoring system and motivation and of the project. Chapter 2 Describes and analyzes the previous works, related to different journals, IEEE standards and their drawbacks. Chapter 3 Discusses about the representation and the architecture of the hardware description of MSP430FG4618/F2013. Chapter 4 Discusses about the system design and implementation OF the ECG monitoring system. Chapter 5 Discusses about the simulation results.

CHAPTER 2 LITERATURE SURVEY


2.1 A WEARABLE MULTI PARAMETER MEDICAL

MONITORING AND ALERT SYSTEM In [24], U. Anliker et al, presents a development of a wearable medical monitoring and alert system aimed at people at risk from heart and respiratory disease. The system combines multi parameter measurement of vital signs, online analysis and emergency detection, activity analysis and cellular link to a telemedicine center in an unobtrusive wrist worn device. A prototype of both the wrist device and the medical center software has been implemented. 2.2 BLUETOOTH TELEMEDICINE PROCESSOR FOR SIGNAL

MULTICHANNEL

BIOMEDICAL

TRANSMISSION VIA MOBILE CELLULAR NETWORKS In [21], M. F. A. Rasid et al, states that the present scope and future potential of mobile communications in telemedicine. A modular structured GPRS based mobile system is presented to illustrate the concept. The unit carried by the patient comprises a processing unit with a wireless connection to a Bluetooth-enabled mobile telephone. The processor/telephone unit accepts signals from up to four sets of sensors attached to the patient. The prototype version is designed to transmit digitized signals to a hospital server via the GPRS mobile telephone cellular network, which allows the transmission of medical data as well as speech. As evidenced by the literature outlined in Section I, the system is expected to become a powerful aid to monitoring and diagnosis as well as a convenient means of communication.

2.3

A MOBILE CARE SYSTEM WITH ALERT MECHANISM In [13], R. G. Lee,et al, states that role-based mobile healthcare

system for chronic patients with an integration of multiple physiological parameter extraction devices. For the personal mobile device construction as the mobile healthcare system front-end, physiological parameter extraction devices and mobile phones as personal mobile gateways were designed and constructed separately. The separation in design leads to three major advantages: high flexibility in architecture; good expandability in functions; and simplicity in hardware design. By using mobile phones as integration devices and utilizing a program to design software modules with various functions, personal mobile devices are not only powerful and flexible in functions, but also provide a shortcut to the goal. It reduces both the time and cost needed for system development. 2.4 A MULTICHANNEL PORTABLE ECG SYSTEM WITH CAPACITIVE SENSORS In [18], M. Oehleret al, illustrated that system based on capacitive electrodes for measuring a multichannel ECG with a fixed sensor array. The integration of the sensor array in a Tablet PC allows a very compact affordable ECG system especially for easy access to the measurement of body surface potential maps. The measurements were taken through clothes. No ground contact is required to measure a multichannel ECG. The Tablet PC provides a new, fast diagnostic tool through the real-time view of the electrocardiogram without any preparation procedure.

2.5

AN INTELLIGENT TELECARDIOLOGY SYSTEM USING A WEARABLE AND WIRELESS ECG TO DETECT ATRIAL FIBRILLATION In [16], C. T. Lin, et al, demonstrates that the proposed intelligent

telecardiology system is capable of accurately detecting AF episodes and instantaneously alerting both the user and the healthcare personnel, facilitating early medical intervention. Furthermore, this intelligent

telecardiology system is superior to conventional healthcare devices because it integrates all the key elements in one system. This novel system cannot only be used for inpatients and outpatients, but also provides a long-lasting health monitor to normal people. Patients wearing the lightweight three-limb lead wireless ECG device can hardly feel its presence, but still enjoy a sense of protection. 2.6 A SMART HEALTH MONITORING OF CHAIR FOR

NONINTRUSIVE SIGNALS

MEASUREMENT

BIOLOGICAL

In [1], H. J. Baek et al, states that healthcare chair system may be used to reliably monitor users during daily activities. Unlike conventional medical devices, this system does not require active user input and is therefore suitable for long-term daily health monitoring. Recent

improvements in biological signal recording through clothing enables many applications for unconstrained biological signal monitoring in healthcare. By integrating these technologies into a chair system, we successfully and simultaneously measured ECG, PPG, and BCG through clothing in a nonintrusive fashion. Continuous beat-to-beat HR and BP were also successfully monitored using the obtained signals.

CHAPTER 3 HARDWARE DESCRIPTION


3.1 INTRODUCTION ABOUT MSP430 EXPERIMENTER BOARD This versatile MSP430 Experimenter Board features a MSP430F2013 and a MSP430FG4618 and is compatible with TIs wireless evaluation modules. Two JTAG headers are accessible to program and debug each MSP430 individually and allow for communication to external devices or between the two MSP430s. Power may be supplied over the USB FET or from the included AAA batteries.

Figure 3.1 MSP430 Experimenter Board The combination of the tiny MSP430F2013 and the highly-integrated MSP430FG4618 provides nearly every combination of peripherals available from the MSP430 family. The integrated TI wireless evaluation module

header and the large amounts of RAM on the MSP430FG4618 makes it an ideal platform for wireless applications. The wide range of integrated peripherals and hardware connectivity allows for nearly infinite development possibilities and makes it the ideal learning platform the MSP430 MCU architecture. A TI Flash Emulation Tool, like the MSP-FET430FUIF, is required to program and debug the MSP430 devices on the experimenter board. 3.1.1 BOARD Features Mixed signal microprocessor 430 experimenter board has the following feature in detail, Devices Featured: MSP430FG4618, MSP430F2013 Integrated peripherals: 12-bit Digital-to-Analog Converter, 12bit SAR Analog-to-Digital Converter, 16-bit Sigma Delta Analog-to-Digital Converter, Operational Amplifiers, DMA, Multiplier, LCD Controller, Communication Interfaces: SPI, UART, I2C, IrDA Programming and Debugging: Can be programmed using any MSP430 Flash Emulation Tool (MSP-FET430UIF) Wireless expansion: Compatible with the following TI Wireless Evaluation Modules: CC1100, CC1101, CC1150, CC2500, CC2550, & CC2420 Board Features: Microphone, buzzer, LCD, capacitive touchpad, 2x push buttons, prototyping space, RS232 communication interface, 2x JTAG Programming Interfaces, 3.5mm headphone jack (audio output)

3.2

MICROCONTROLLER BLOCK DIAGRAM MSP430 Experimenter Board has the microcontroller called

MSP430FG4618 .The figure 3.2 shows the internal block diagram that explains various peripherals in the architecture of the microcontroller.

Figure3.2 MSP430FG4618 Block diagram

3.3

MSP430FG4618 SPECIFICATIONS This section covers the specifications of the MSP430FG4618 mixed

signal microcontroller in detail. The architecture, combined with five lowpower modes, and is optimized to achieve extended battery life in portable measurement applications. The digitally controlled oscillator (DCO) allows wake-up from low-power modes to active mode in less than 1 s.

3.3.1

Peripherals Peripherals are connected to the CPU through data, address, and

control buses and can be handled using all instructions. 3.3.2 CPU The MSP430 CPU has a 16-bit RISC architecture that is highly transparent to the application. All operations, other than program-flow instructions, are performed as register operations in conjunction with seven addressing modes for source operand and four addressing modes for destination operand. The CPU is integrated with 16 registers that provide reduced instruction execution time. The register-to-register operation execution time is one cycle of the CPU clock. Four of the registers, R0 to R3, are dedicated as program counter, stack pointer, status register, and constant generator respectively. The remaining registers are general-purpose registers. Peripherals are connected to the CPU using data, address, and control buses, and can be handled with all instructions. 3.3.3 DMA controller The DMA controller allows movement of data from one memory address to another without CPU intervention. For example, the DMA controller can be used to move data from the ADC12 conversion memory to RAM. Using the DMA controller can increase the throughput of peripheral modules. The DMA controller reduces system power consumption by allowing the CPU to remain in sleep mode without having to awaken to move data to or from a peripheral. 3.3.4 Oscillator and system clock The clock system in the MSP430xG461x family of devices is supported by the FLL+ module, which includes support for a 32768-Hz watch
10

crystal oscillator, an internal digitally controlled oscillator (DCO), and a highfrequency crystal oscillator. The FLL+ clock module is designed to meet the requirements of both low system cost and low power consumption. The FLL+ features digital frequency locked loop (FLL) hardware that, in conjunction with a digital modulator, stabilizes the DCO frequency to a programmable multiple of the watch crystal frequency. The internal DCO provides a fast turn-on clock source and stabilizes in less than 6 s. The FLL+ module provides the following clock signals: Auxiliary clock (ACLK), sourced from a 32768-Hz watch crystal or a high frequency crystal Main clock (MCLK), the system clock used by the CPU Sub-Main clock (SMCLK), the subsystem clock used by the peripheral modules ACLK/n, the buffered output of ACLK, ACLK/2, ACLK/4, or ACLK/8 3.3.5 Brownout, Supply Voltage Supervisor The brownout circuit is implemented to provide the proper internal reset signal to the device during power-on and power-off. The supply voltage supervisor (SVS) circuitry detects if the supply voltage drops below a user selectable level and supports both supply voltage supervision (the device is automatically reset) and supply voltage monitoring (SVM, the device is not automatically reset).The CPU begins code execution after the brownout circuit releases the device reset. However, VCC may not have ramped to VCC (min) at that time. The user must insure the default FLL+ settings are not changed until VCC reaches VCC (min). If desired, the SVS circuit can be used to determine when VCC reaches VCC (min).

11

3.3.6

Digital I/O There are ten 8-bit I/O ports implementedports P1 through P10: All individual I/O bits are independently programmable. Any combination of input, output, and interrupt conditions is possible. Edge-selectable interrupt input capability for all the eight bits of ports P1 and P2. Read/write access to port-control registers is supported by all instructions. Ports P7/P8 and P9/P10 can be accessed word-wise as ports PA and PB respectively.

3.3.7

Basic Timer1 and Real-Time Clock The Basic Timer1 has two independent 8-bit timers that can be

cascaded to form a 16-bit timer/counter. Both timers can be read and written by software. Basic Timer1 is extended to provide an integrated real-time clock (RTC). 3.3.8 LCD_A drive with regulated charge pump The LCD_A driver generates the segment and common signals required to drive an LCD display. The LCD_A controller has dedicated data memory to hold segment drive information. Common and segment signals are generated as defined by the mode. Static, 2-MUX, 3-MUX, and 4-MUX LCDs are supported by this peripheral. The module can provide a LCD voltage independent of the supply voltage with its integrated charge pump. Furthermore it is possible to control the level of the LCD voltage and, thus, contrast by software.

12

3.3.9

Watchdog timer (WDT+) The primary function of the WDT+ module is to perform a controlled

system restart after a software problem occurs. If the selected time interval expires, a system reset is generated. If the watchdog function is not needed in an application, the module can be configured as an interval timer and can generate interrupts at selected time intervals. 3.3.10 Universal serial communication interface (USCI) The USCI modules are used for serial data communication. The USCI module supports synchronous communication protocols like SPI (3 or 4 pin), I2C and asynchronous communication protocols like UART, enhanced UART with automatic baud rate detection, and IrDA. The USCI_A0 module provides support for SPI (3 or 4 pin), UART, enhanced UART and IrDA. The USCI_B0 module provides support for SPI (3 or 4 pin) and I2C. 3.3.11 USART1 The hardware universal synchronous/asynchronous receive transmit (USART) peripheral module is used for serial data communication. The USART supports synchronous SPI (3 or 4 pin) and asynchronous UART communication protocols, using double-buffered transmit and receive channels. 3.3.12 Hardware multiplier The multiplication operation is supported by a dedicated peripheral module. The module performs 16_16, 16_8, 8_16, and 8_8 bit operations. The module is capable of supporting signed and unsigned multiplication, as well as signed and unsigned multiply and accumulates operations. The result of an operation can be accessed immediately after the operands have been loaded into the peripheral registers. No additional clock cycles are required.
13

3.3.13 Timer_A3 Timer_A3 is a 16-bit timer/counter with three capture/compare registers. Timer_A3 can support multiple capture/compares, PWM outputs, and interval timing. Timer_A3 also has extensive interrupt capabilities. Interrupts may be generated from the counter on overflow conditions and from each of the capture/compare registers. 3.3.14 Timer_B7 Timer_B7 is a 16-bit timer/counter with seven capture/compare registers. Timer_B7 can support multiple capture/compares, PWM outputs, and interval timing. Timer_B7 also has extensive interrupt capabilities. Interrupts may be generated from the counter on overflow conditions and from each of the capture/compare registers. 3.3.15 Comparator_A The primary function of the comparator A module is to support precision slope analog-to-digital conversions, battery-voltage supervision, and monitoring of external analog signals. 3.3.16 ADC12 The ADC12 module supports fast, 12-bit analog-to-digital

conversions. The module implements a 12-bit SAR core, sample select control, reference generator and a 16 word conversion-and-control buffer. The conversion-and-control buffer allows up to 16 independent ADC samples to be converted and stored without any CPU intervention. 3.3.17 DAC12 The DAC12 module is a 12-bit, R-ladder, voltage output DAC. The DAC12 may be used in 8- or 12-bit mode, and may be used in conjunction
14

with the DMA controller. When multiple DAC12 modules are present, they may be grouped together for synchronous operation. 3.3.18 OA The MSP430xG461x has three configurable low-current generalpurpose operational amplifiers. Each OA input and output terminal is software-selectable and offer a flexible choice of connections for various applications. The OA op amps primarily support front-end analog signal conditioning prior to analog-to-digital conversion. 3.4 PIN DIAGRAM AND DESCRIPTION The figure 3.4 shows the pin diagram of MSP430FG4618.The controller as 100 pins with PDIP (plastic dual inline package) where the pins protrude from the both ends of the IC package.

Figure 3.4 Pin Diagram of MSP430FG4618


15

3.4.1

Pin description The following table 3.4.1 shows the pin description of

MSP430FG4618 in detail. Table 3.4.1 pin description

16

17

18

3.5

MSP 430FG4618 MICROCONTOLLER FEATURES Ultra low power consumption o Active mode o Standby mode o Off mode(ram retention) Five power saving modes Low supply voltage range 1.8v to 3.6v Ultra-fast wakeup from standby mode in less than 6s 16-bit RISC architecture Basic clock module configuration o Internal frequencies up to 16MHZ with one calibrated frequency o Internal very low power, low frequency (LF) oscillator o 32 KHZ crystal o External digital clock source 16-bit timer A with two capture/compare registers Universal serial interface(USI) supporting SPI & I2C Brownout detector 12-bit A/D and dual D/A converter with internal reference
19

:400 A at 1MHz , 2.2v : 1.3 A :0.22 A

Serial onboard programming On-chip emulation logic with spy-bi-wire interface 16-bit RISC architecture ,125ns instruction cycle time 3.6 APPLICATIONS OF MSP430 This section describes the following application as follows, Portable medical meters, such as blood glucose meters, pulse oximeters Insulin pumps Digital thermometers Heart rate monitors Glass Break Detector Solar Power Inverters Telecom Shelter: Wireless Battery Monitoring

20

CHAPTER 4 SYSTEM DESIGN AND IMPLEMENTATION


4.1 OVERVIEW In this chapter let us discuss about the implementation of this application. The system comprises the modules like design of

electrocardiograph monitoring ECG circuit. Let us see about the implementation of the systems in the following sections. 4.1.1 Introduction to ECG Heart rate is one of the most frequently measured parameters of the human body and plays an important role in determining an individuals health. Heart rate measurement is becoming a part of the typical consumer lifestyle, and many electronic devices such as iPods, exercise equipment, and mobile phones are becoming able to accurately measure heart rate. The following Methods used to measure heart rate o o o o Electrocardiography Photoplethysmography Oscillometry(Blood pressure monitor method) Phonocardiography.

Each of these methods measures different phenomenon that occur in human body during the heart beat or cardiac cycle to determine heart rate. 4.1.2 Electrocardiographs The contraction and relaxation of cardiac muscles causes blood to flow in and out of the heart. During each cardiac cycle, a group of tissue in the heart called the sino atrial node (a.k.a., the pacemaker of heart) generates

21

electrical impulses that spread all through the heart and cause rhythmic contraction and relaxation of heart muscles. These electrical impulses can be detected by placing electrodes in specific points in human body. An electrocardiogram (ECG) captures this varying electrical impulse so shows the overall rhythm of the heart. This method requires placement of two or more electrodes on specific points of the human body. The ECG signal is characterized by six peaks and valleys labeled with successive letters of the alphabet: P, Q, R, S, T, and U .The P-peak is produced by muscle contraction of the atria. The R-peak shows the ending of atrial contraction and the beginning of ventricular contraction. Finally, the T-peak marks the ending of a ventricular contraction. The magnitude of the R-peak normally ranges from 0.1 mV to 1.5 mV.

Figure 4.1.2 ECG waveform

The average heart rate is calculated by first measuring the time interval, denoted RR interval, between two consecutive R peaks and taking the average reciprocal of this value over a fixed window, usually 15, 30 or 60
22

seconds. This average is then scaled to units of beats per minute (bpm). Rpeak is a part of the RQS complex which represents ventricular depolarization. Before calculating the heart rate, we must processing the ECG in the analog (amplification, common mode voltages suppression and filtering) and digital (digital filtering) domains. Most of these functions can be performed by the microcontroller in real time. 4.1.3 Finger Touch Capacitance Touch sensors have been around for years, but recent advances in mixed signal programmable devices are making capacitance-based touch sensors a practical and value-added alternative to mechanical switches in a wide range of consumer products. This article walks through a design example of a touch-sensitive button that can be actuated through a thick glass overlay. The following figure 4.1.3 symbol 4 is used as a touch sensing pad in MSP430 Experimenter board.

Figure 4.1.3 Capacitive Sensing Plate

Typical capacitive sensor designs specify an overlay of 3mm or less. Sensing a finger through an overlay becomes increasingly more difficult as
23

the overlay thickness increases. In other words, as the overlay thickness increases, the process of tuning the system moves from science to art. To demonstrate how to make a capacitive sensor that pushes the limits of todays technology, the thickness of the glass overlay in this example is set at 10mm. Glass is easy to work with, readily available, and transparent so you can see the underlying sensor pads. Glass overlays also have direct application in white goods. 4.2 IMPLEMENTATION OF ECG MONITORING SYSTEM The following section describes the entire application of block diagram in detail. The ECG monitoring system diagram is shown in figure 4.2.

Figure 4.2 ECG Monitoring System

At the heart of any capacitive sensing system is a set of conductors that interact with electric fields. The tissue of the human body is filled with

24

conductive electrolytes covered by a layer of skin, a lossy dielectric. It is the conductive property of fingers that makes capacitive touch sensing possible .A simple parallel plate capacitor has two conductors separated by a dielectric layer. Most of the energy in this system is concentrated directly between the plates. Some of the energy spills over into the area outside the plates, and the electric field lines associated with this effect are called fringing fields. A parallel plate capacitor is not a good choice for such a sensor pattern. Placing a finger near fringing electric fields adds conductive surface area to the capacitive system. The additional charge storage capacity added by the finger is known as finger capacitance, CF. The capacitance of the sensor without a finger present is denoted as CF in this article, which stands for parasitic capacitance. A common misconception about capacitive sensors is that the finger needs to be grounded for the system to work. A finger can be sensed because it can hold a charge, and this occurs if the finger is floating or grounded.MSP is used as processor to control the flow of heart rate in human body and LCD display is used to display the valve of heart rate signal for every second. The pulse measures blood oxygenation by sensing the infrared and red-light absorption properties of deoxygenated and oxygenated hemoglobin. This comprised of a sensing probe that attaches to a patients ear lobe, toe or finger and is connected to a data acquisition system for the calculation and display of oxygen saturation level, heart rate and blood flow. Power source to the controller is about only 3.3V .That is produced by in built lithiyam AAA battery or from PC power. For mid-range and highend applications where higher performance and higher measurement accuracy are necessary, there is a need for higher performance processors and high precision analog components that provide lower system power. The complete schematic application of ECG measurement system is shown in figure 4.3.

25

Fig4.3 Complete Schematic of the Application

26

CHAPTER 5 SIMULATIONS RESULTS AND DISSCUSSION


5.1 OVERVIEW OF THE SOFTWARE The software used for ECG measurement and heart rate detection is Code Composer Studio is an integrated development environment for developing applications for Texas Instruments embedded processors. Texas Instruments embedded processors include DSPs, ARM based devices and other processors such as MSP430. Code Composer Studio includes a real time operating system called DSP/BIOS or SYS/BIOS. Code Composer Studio or CCS includes support for OS level application debug as well as low-level JTAG based development. CCS is based on the Eclipse open source software framework. Code Composer Studio version 4 is based on a modified version of Eclipse. Code Composer Studio version 5 uses an unmodified version of Eclipse, and also includes support for Linux, as well as Microsoft Windows. Previous versions of CCS used a proprietary IDE. Code Composer Studio (CC Studio) is an integrated development environment (IDE) for Texas Instruments (TI) embedded processor families. CC Studio comprises a suite of tools used to develop and debug embedded applications. It includes compilers for each of TI's device families, source code editor, project build environment, debugger, profiler, simulators, real-time operating system and many other features. The intuitive IDE provides a single user interface taking you through each step of the application development flow. Familiar tools and interfaces allow users to get started faster than ever before and add functionality to their application thanks to sophisticated productivity tools.

27

To install this version of Code Composer Studio(tm), follow these steps: (1) Double-click on setup_CCS_4.2.1.xxxxx.zip (2) On the menu bar, go to Actions -> Extract (3) Select the directory where you wish to extract the files (4) Select all of the following: a. "All files/folders in archive" b. Overwrite existing files c. Use folder name (5) De-select the following: a. Open Explorer Window b. Skip older files (6) Click on Extract (7) Once extraction has successfully completed, click on setup_CCS_4.2.1.xxxxx.exe. 5.1.1 Step to execute the CC studio The steps as follows 1. Create a new Project by selecting File New CCS Project. 2. Enter a project name, select "MSP430" as the Project Type and click next until the Device Selection Page is shown. Select the Device Variant used in the project. 3. Add the flashing LED code example to the project by clicking Project Add Files to Active Project... Code examples are located in <Installation Root>\msp430\examples\ according to the device family that you are using.

28

4. If using a USB Flash Emulation Tool such as the MSP-FET430UIF or the eZ430 Development Tool, they should be already configured by default. 5. To compile the code and download the application to the target device, go to Target Debug Active Project. 6. The application may be started by selecting Target Run (F8) or clicking the green Play button on the toolbar. 7. To terminate the debug session click go to Target Terminate All. 5.2 CALCULATING THE HEARTBEAT RATE The number of heart beats per minute is calculated using a three beat average. Two variables in the C main function counter and pulse period, accurately track the time scale. Each output sample from the QRS discriminator is compared against a set threshold to detect the presence of a beat. Pulse period is incremented by one during every sample period. Because each sample occurs every 1/512 second, it is easy to track the time scale based on the number of counts in the pulse period variable. A 128-sampleTime window is used as a debounce time using counter. Every time a beat is detected, counter is reset and the LCD icon with four arrows is turned on to represent the heart beat. If a beat is not detected for 128 consecutive samples, a separation between successive beats is identified and the LCD icon with four arrows is turned off. The pulse period is accumulated for three consecutive beats. On the third beat, pulse period is used for the calculation of heart-rate per minute and reset.
= 1/ [ / (3 512 60)] = 92160/

5.3

TESTING THE APPLICATION WITH CC STUDIO


29

The Figure 5.3 shows the execution level of the pulse are sensed by using the Fingertip Capacitive touch sensors and it sends the message to the MSP430 controller through LCD display.

Figure 5.3 Execution of program 5.4 HEART RATE MONITORING At the heart of any capacitive sensing system is a set of conductors that interact with electric fields. The tissue of the human body is filled with conductive electrolytes covered by a layer of skin, a lossy dielectric. It is the conductive property of fingers that makes capacitive touch sensing possible. A simple parallel plate capacitor has two conductors separated by a dielectric layer. Most of the energy in this system is concentrated directly between the

30

plates. Some of the energy spills over into the area outside the plates, and the electric field lines associated with this effect are called fringing fields. Part of the challenge of making a practical capacitive sensor is to design a set of printed circuit traces which direct fringing fields into an active sensing area accessible to a user. A parallel plate capacitor is not a good choice for such a sensor pattern. Placing a finger near fringing electric fields adds conductive surface area to the capacitive system. The additional charge storage capacity added by the finger is known as finger capacitance, CF. The capacitance of the sensor without a finger present is denoted as CP in this article, which stands for parasitic capacitance. A common misconception about capacitive sensors is that the finger needs to be grounded for the system to work. A finger can be sensed because it can hold a charge, and this occurs if the finger is floating or grounded. The output of heart rate detection using finger tip capacitance is shown in fig 5.4 the symbol 4 is used as touch sensing.

Figure 5.4Snapshot of heart rate monitoring

31

5.5

PC SCOPE FOR ECG DISPLAY When using the "Heart rate with ECG Demo" program, an RS-232

level shifter is required between the ECG board and a PC. Only the TX P4.0/UTXD1line is required, because no handshake is used for the serial communication. The baud rate of the serial communication to the PC is 115.2 kbps. For displaying ECG, the PC must run scope.exe using command line option of Windows. The scope.exe is an open source PC application program. For convenience, this application program is provided in theoscilloscope.zip file under the source files along with this application report .Figure 5.5 shows the screen capture of the ECG display using the PC Scope application program.

Figure 5.5 PC Scope Program for ECG Display

The following Figure5.5 shows the graph for the electrocardiograph measures the heart beat rate in y axis and the time in x axis every second, each ECG graph has the 6 intervals to measures the heart rate.

32

CHAPTER 6 CONCLUSION
This work describes a prototype for a novel low power ECG measurement is developed, fabricated, and experimentally validated in this study. The focus of this thesis has been to design a compact ECG monitoring device using commercially available electronic components. The project work is presented starting with the objectives and the specifications that were laid down. The following chapters then introduce the main building elements of the designed circuit, and support the decisions that were made regarding component selection. The layout of the monitoring device prototype was also designed, taking into account the fabrication technology available in the departmental work-shop. The dimensions of the board could therefore be further reduced if the board manufacturing and component mounting steps were to be carried out by professionals. The monitoring node was built on a matrix breadboard, while the MSP430 Experimenter board from Texas Instruments. The ECG signal quality acquired by using our low power ECG measurement was consistent for all subjects, and the variation of ECG signal quality is very stable, even under motion. Overall, our proposed low power ECG measurement provides potential for routine and repetitive ECG measurements, although its biocompatibilities still needed further validated. This project was successfully implemented and the output of heart rate is displayed on LCD and ECG waveform on the PC by using oscilloscope software.

33

6.1

FUTURE WORK The project can be further developed in future by adding expert

system features like speed variations with moving screen, exact heart rate with analysis, displaying 12 lead graphs, and monitoring ECG wave form on PC monitor. We can enhance the feature of the project by enabling the transmission of ECG signals through mobiles via wireless or Bluetooth. This project can be further developed in future to monitor ECG signal with different type of electrode.

34

REFERENCES 1. Baek, H. J., Chung, G. S., Kim, K. K., and Park, K. S., (2012), A smart health monitoring chair for nonintrusive measurement of biological signals, IEEE Trans. Inf. Technol. Biomed., Vol. 16, No. 1, pp. 150_158. 2. Braunwald, E., Heart Disease: A Textbook of Cardiovascular Medicine, Fifth Edition, p. 108, Philadelphia, W.B. Saunders Co., 1997ISBN 0-7216-5666-8. 3. Daniel Paulus., Thomas Meier., (2009), ECG-Amplifier. 4. Dash, Dr. P. K., (2002), Electrocardiogram Monitoring, Indian J.Anaesth. 46 (4): 251-256. 5. Eilebrecht, B., Schommartz, A., Walter, M., Wartzek, T., Czaplik, M., and Leonhard, S., (2010), A capacitive ECG array with visual patient feedback,'' in Proc. Int. Conf. IEEE Eng. Med. Biol. Soc. 6. Fonseca, C., Cunha, J. S., Martins, R., Ferreira, .V, Barbosa, J. M. d. Sa and Silva, A. M. d., (2007) ,A novel dry active electrode for EEG recording, IEEE Trans. Biomed. Eng., Vol. 54, No. 4, pp. 162165. 7. Houghton, A.R., and Gray, D., (2003), Making sense of the ECG. Hodder Arnold Publishings. 8. Hurst, J., (1998) ,Naming of the waves in the ECG, with a brief account of their Genesis, Vol. 98, No. 18, pp 562. 9. http://www.biopac.com/Manuals/app_pdf/app109.pdf. 10. http://www.ti.com.

35

11. Kafeza, E., Chiu, D.K.W., Cheung, S.C., and Kafeza, M., (2004), Alerts in mobile healthcare applications: Requirements and pilot study, IEEE Trans. Inf.Technol. Biomed.Vol. 8, No. 2, pp. 173_181. 12. Lee, R.G., Chen, K.C., Hsiao, C.C., and Tseng, C.L., (2007), A mobile care system with alert mechanism,'' IEEE Trans. Inf. Technol. Biomed., Vol. 11, No. 5, pp. 507_517. 13. Lee, R.G., Chou, I.C., Lai ,C.C., Liu, M.H., and Chiu,

M.J.,(2005), A novel QRS detection algorithm applied to the analysis for heart rate variability of patients with sleep apnea, Biomed. Eng.Appl. Vol. 17, No. 5, pp. 258262. 14. Lin, C.T. , Liao, L.D., Liu, Y.H., Wang, I.J., Lin, B.S., and Chang, J.Y.,(2011), Novel dry polymer foam electrodes for long-term EEG measurement, IEEE Trans. Biomed. Eng., Vol. 58, No. 5, pp 430. 15. Lin, B. S., Liang, H. Y. , Chen, R. J. , Lee, Y. T. ,and Ko, L.W. , (2010), An intelligent tele cardiology system using a wearable and wireless ECG to detect atrial brillation,IEEE Trans. Inf. Technol. Biomed., Vol. 14, No. 3, pp. 16. Lu, M., (1994), The Design and Construction of an ECG Telemetry System, M.S. Thesis, University of Queensland. 17. Oehler, M., Ling, V., Melhorn, K., and Schilling, M., (2008), A multichannel portable ECG system with capacitive sensors,'' Physiol. Meas., Vol. 29, No. 7, pp. 783_793. 18. Patil, G.M., Subbarao, K., Mytri, V.D., Rajkumar, A.D., and Reddy. D.N., Embedded Microcontroller based Digital

Telemonitoring System for ECG, J. Instrum.Soc. India 37(2) 134149.


36

19. Rasid, M. F. A., and Woodward, B., (2005), Bluetooth telemedicine processor for multi-channel biomedical signal transmission via mobile cellular networks, IEEE Trans. Inf. Technol. Biomed., Vol. 9, No. 1, pp. 35_43. 20. Segura, Jose J., Frau, David Cuesta., and Luis Samblas-Pena Mateo Aboy ., ( 1686-1690), A Microcontroller Based Portable Electro-cardiograph Recorder, IEEE Transaction on biomedical Engineering.

37

You might also like