Low cost Electro-Cardio-Gram using LabVIEW

DOI : 10.17577/IJERTV3IS090546

Download Full-Text PDF Cite this Publication

Text Only Version

Low cost Electro-Cardio-Gram using LabVIEW

Raafe Karim Khan Department of Electrical & Electronics, Manipal Institute of Technology

Koushik Kumar Jami Department of Electrical & Electronics, Manipal Institute of Technology

Vedant Karia

Department of Electrical & Electronics, Manipal Institute of Technology

AbstractHealthcare should be made available to the common man regardless of his or hers social and or economic status. The approach to our project is to make a portable Electro-Cardio-Gram which is not only cost effective but also at the same time at par with other organizations. Pressure is the measurand which we are interested in; to make this possible we will be using specially fabricated bio-electrodes. We will be tapping these pressure transduced signals and feeding it to LabVIEW via a data acquisition card. We will be measuring heart rate and we will monitor the changes in pressure taking place due to excitation and relaxation of the myocardium. We will aim to setup a network over internet protocol to send messages so that doctors can know when there are abnormalities taking place within the body. Not only that but we will also be maintaining factual data of the patient and time stamp of the data produced by him or her in real time[1].

Keywordshealthcare, pressure, bio-electrodes, LabVIEW data acquisition card, myocardium, real time


    According to a World Health Organisation report roughly 40% of Indians in the world between the ages 30 to 40 are prone to heart ailment[2]. This number would amount to millions of people, majority of which are still living in rural and or sub-urban areas. Health care is still a luxury in a country like India, an India which is destined to be a superpower, and an India which is home to over one billion people. The final outcome of our project is to make health care unified, affordable and accessible.


    The measurand which is of primary importance to us is pressure. Pressure within the body is created due to the excitation and relaxation of the myocardium[3]. The myocardium is the main muscle of the heart and is also attached to the aorta which happens to be the main artery of the heart

    1. Parts of the heart

      The heart is a very complex organ to study and all the processes it drives are in synchronisation and also in real time. To study the heart we shall divide it into smaller parts, all of which drive a unique process and are vital for sustainability. The various parts of the heart are as follows

      • Aorta

      • Purkinje fibres

      • Pulmonary trunk

      • Right and left ventricles

      • Right and left atrium

      • Pulmonary trunks

        Fig. 1. Parts of the heart

    2. Heart as a biological source of energy

    The heart is one of the only organs which functions throughout our lifetimes. Extraction and retraction of the hearts muscles takes place every minute. This results in pressure differentials taking place which produces echoing or profound sound signals. Using various transducers these signals can be tapped and extracted for biomedical applications. The heart in simple terms circulates blood in the body and it generates the pressure required for transportation of blood to the far ends of the body. In this way the heart is a biological source of energy.


    The heart is analogous to an alternator. The same way alternators supply current, the heart supplies blood. Electrical pressure is applied by the generator so as to facilitate movement of charges which in turn causes current to run through cables. Similarly the heart generates pressure which facilitates the flow of blood smoothly within the body. The sound produced due to the process can be converted to suitable electrical signals using transducers. Hence the heart is considered to be a source of electrical energy.

    1. Electrical activity

      The electrical activity of the heart is due to polarization and repolarization of the myocardium. Due to this an electrical pulse is created which we have to measure in real time. This signal is important to us because the instrument i.e. the Electro-Cardio-Gram basically monitors and measures the electrical activity of the heart.

      Fig. 2 Polarization and depolarization cycle

      The figure above shows that this kind of activity is due to two minerals. Sodium (Na) and Calcium (Ca) facilitate the process of expansion and contraction of the muscles of the heart which in turn result in polarization and depolarization.

    2. P-Q-R-S-T-U-V wave

      The P-Q-R-S-T-U wave is the typical waveform produced by a normal human being. The waveform peaks at certain instants and then undergoes depression. This is in strict synchronization with the muscular activity of the heart and primarily due to the polarization and depolarization of the heart muscles which is triggered due to mineral activity[9].

      Fig. 3. The P-Q-R-S-T-U-V wave

    3. Interpretation of the wave

      The wave nature of a normal person, with no heart problems is strictly speaking the same and is uniform. From person to person the amplitudes of the various parts may be different and or their timing intervals may be different but the wave nature, its characteristics are the same for one and all.

      1. P-R section: If the P-R wave is greater than 0.22 seconds we say that the patient has a first degree heart blockage. If from the data generated the P-R section of the wave seems to be widening after successive beats then we say that the patient is suffering from a second degree heart blockage. If there is no discernible relationship between the P section and the rest of the wave we say that the patient is suffering from a third degree heart blockage

      2. Q-R-S section:The width of this section of the wave should be less than 0.12 seconds. Some texts say that this width should be less than 0.10 seconds. Any extended deviation from the above in excess is said to be a condition of ventricular conduction failure

      3. S-T section: This section of the wave should sit on the isoelectric line. This section should be slightly elevated and slanted at a certain angle for a normal and healthy person. A person is said to be suffering from ischemia if this section of the wave is planar. This is an abnormality and must be treated for with due initiative. The U wave should not be prominent as well[6].


    Design of any system requires simulation to back a hardware setup. Software simulations are invariably idealistic and neglect extraneous variables, but are an indication of what the output of a hardware system must closely resemble. Developing a circuit of National Instruments Multisim, helped us get the PQRSTUV wave with great accuracy

    Fig. 4. Simulation results

    Fig. 5. Stages of the wave


    The Electro-Cardio-Gram follows a very simple principle. We tap signals from a bio-surgical electrode which we condition further and feed these signals to LabVIEW through a data acquisition device. A simple block diagram representation is given below.

    Fig. 6. Generalised block diagram of the ECG

    1. Leads/ Sensors

      The leads which we are using are surgical electrodes[4]. They are light in weight and easily available in market. They are not bio-hazardous but can be used for limited operations only.

    2. Signal conditioning

      The circuit which we have designed uses a specially fabricted instrumentation amplifier integrated circuit [4] developed by Texas Instruments called the INA-129. The features of the IC are as follows:

      • Low offset voltage : 50V max

      • Low drift : 0.5V/°C max

      • Low input bias current : 5nA max

      • High CMRR : 120dB max

      • Inputs protected : ± 40V

      • Wide supply range : ± 2.25V to ±18 V

      • Low quiescent current : 700A

      • 8 pin plastic DIP, SO.

    3. Data acquisition

      For the purpose of acquiring data in real time we will be using an arduino board. The arduino is an open source platform which allows computing to be interactive and extremely intuitive. The arduino has an 8 bit Atmel

      microprocessor at the heart of things. The arduino has 6 analog ports and 14 digital I/O ports which allow the arduino to interact with the physical world and perform complex computations[5].

    4. LabVIEW

      LabVIEW is a graphical user interface developed by National Instruments which is basically a back end C program. It has a basically a drag and drop feature and is both flexible and easy to code. LabVIEW has been globally accepted by both academia as well as the industry.

    5. Circuit schematic

    The circuit for the system was relatively simple and follows the principles of green architecture in electronics system design! The entire system was made with lead free components and was found to be compliant with the ROHS standards. Some of the features of the system to name a few are; it is portable, light in weight, occupies very little area and the total cost of the system was only a few tens of dollars! The sensors used for tracking the trace of polarization and depolarization are bio-electrical probes; basically transducers which give an output voltage for a corresponding pressure differential inside the body[4]. Some of the other sensors used were infrared temperature sensors and a capacitive microphone coupled with a stethoscope, which makes an analog stethoscope completely digitized. Obviously the sensors were pre-calibrated against common bio-medical and health care practices [5] of the democratic republic of India.

    Fig. 7. Circuit as on a breadboard

    Fig. 8. PCB schematic of the system designed


The system so designed underwent through rigorous testing, the results of which were extremely promising and showed great results. The system was on a whole, light in weight. It was about 500 grams in weight, excluding the arduino board. The system covers about 75 sq.cms, therefore it requireds little space for physical placement. It is also extremely portable making it a great fit for modern day healthcare use.

  1. System economics

    The system in addition to being portable, light in weight and area friendly was also extremely inexpensive. The entire system was prepared in under $5 excluding the arduino board. In a country like India, this could help reaching out to the common man who continues to receive average to sub- average healthcare facilities.

  2. Sampled data

    The sampling rate chosen for the arduino is 1KS/second. This is not a default value but it was chosen so that the number of taps in the FIR filter could be reduced. Data which was sampled was also displayed and stamped from the time the process was initiated.

    Fig. 9. Sampled data with timestamp

  3. Harmonic content

    Line frequency was observed to be predominant. Even after using a band reject filter digitally through LabVIEW, it was greatly suppressed.

    Fig. 10. Source harmonics

  4. Digital and analog filtering

    The use of physical discrete components would introduce some amount of noise and result in unwanted variations in the output. Cascaded filters are used and multiple samples were taken. Not only that but various distortion management tools

    were used to eliminate line frequency. Double filtering was done to remove all ripples which arose due to the regulated power supply unit.

    To further reduce inefficiencies we use a notch filter at the source end to remove source harmonics which occurred between 45Hz 55Hz.

    Fig. 11. Disappearing harmonics

  5. Reconstruction

Various stages of filtering, re-sampling and data manipulation tools were used and the P-Q-R-S-T-U wave was reconstructed from the crude data which was logged and received on the graphical interface of the front panel of the LabVIEW program.

It will be seen from the figure below, the black waveform is the semi rude waveform received by the processor over a short period of operation. The weighted average was taken which can be seen from the red color line. We can clearly make out the P-Q-R-S-T-U-V points on the wave. This test was conducted at normal temperature and standard pressure conditions on a normal and healthy person in completely relaxed position.The heart rate was calculated to be around

85.47 beats/ minute. Formula for the same is given by

= 300(1)

Where RR is the heart rate, 300 is the standardized constant and R is the number of boxes between each R wave

    1. number of boxes between each instance of a peak. These were recorded values as and when process was started and terminated successfully. The above method of determining the heart rate is known as box method[6]. This method is the easiest to understand and is accepted as a standard worldwide

      Fig. 12. P-Q-R-S-T-U-V wave


      The advantages of the system designed are as follows:

      • Inexpensive

      • User friendly

      • Easy to understand

      • Highly cost effective

      • Continuous monitoring

      • Data manipulation is easy with LabVIEW

      • Accurate

      • Auto-calibration feature

      • Compact

      • Weight is less than 500grams

      • Eco-friendly and follows green computing standards[8]

      • No pollution whatsoever

        The entire module has many features incorporated into it.

        Some of which are:

      • Trace of the signal

      • Rhythm Will also indicate arrhythmia[7]

      • Heart rate

      • Axis deviations can easily be inferred from the graphs

      • Time and date stamp

      • Hospital UID

      • Name

      • Age

      • Sex

      • Previous history (Yes/No)

      • Problems reported can be logged onto the hospital intranet server

      • Consulting Doctor Data and history


First we would like to thank the almighty. For without his divine guidance and support we would have been unable to successfully complete this paper.

We would like to thank Dr.Vinod V. Thomas, Director, Manipal Institute of Technology, Dr. B.K. Singh, Former Head of Department of Electrical & Electronics, Manipal

Institute of Technology for granting us permission to work late at night in the laboratories and letting us make use of the resources available within the institute from time to time.

We would also like to thank Prof. James Anthony Pinto, Professor, Department of Electrical & Electronics Engineering, Manipal Institute of Technology for his guidance and undying support. He was the driving force behind this work and it wouldnt have been possible to complete this module without his expertise.

We would also like to thank the engineers of National Instruments for their timely help when it came to programming the system on the LabVIEW platform. Without their useful tips we wouldnt have been able to acquire the signals as desired.

Lastly and most importantly we would like to thank our families and my friends for without them we would not be where we stand today.


  1. K. Y. Kong, C. Y. Ng, and K. Ong, "Web-Based Monitoring of Real- Time ECG Data," Proc. Computers in Crdiology, pp. 189-192, Sept. 2000

  2. http://www.healthxchange.com.sg/News/Pages/Indians-and-Hear- tDisease-Nature-or-nurture.aspx

  3. L. Schamroth,An Introduction to Electrocardiography, 7th ed. Oxford: Blackwell Science ltd; 1990.

  4. E.M. Spinelli, N. Martínez, M. A. Mayosky, R.P. Areny, Novel Fully Differential Biopotential Amplifier With DC Suppression , IEEE Transactions on BME, Vol. 51, no. 8, 2004.

  5. "Programming Arduino Getting Started with Sketches". McGraw-Hill.

    Nov 8, 2011. Retrieved in 2013-03-28

  6. 2.J. D. Bronzio,The Biomedical Engineering Handbook , IEEE Press, 2000

  7. D. L. Rollins, C. R. Killingsworth, G. P. Walcott, R. K. Justice, R. E. Ideker, and W.M. Smith, "A Telemetry System for the Study of Spontaneous Cardiac Arrhythmias," IEEE Trans. Biomedical Engineering, vol.47, pp. 887-892, July 2000

  8. Raafe Karim Khan, Sandhyalaxmi G Navada . " Daylight Harvesting Control System ", Vol. 3 – Issue 9 (September – 2014), International Journal of Engineering Research & Technology (IJERT) , ISSN: 2278- 0181 , www.ijert.org

  9. S.W. Leung and Y.T. Zhang, "Digitization of Electrocardiogram (ECG) Signals Using Delta-Sigma Modulation," IEEE Proc. Engineering in medicine and Biology Society, vol. 4, pp. 1964-1966,1998.

Leave a Reply