• Home
  • Prakash
    • R and D
    • Smart Home
  • Basics
    • Capacitors
      • Color codeing Disc Capacitor Capacitor characterstics Polarity Non Polarity Series Connection Parallel Connection
    • Diodes
      • Zener Diode Light Emitting Diode Signal Diode Photo Diode
    • Inductors
    • Transistor
      • Silicon Germenium NPN PNP MOSFET SCR
    • Resistors
      • Color codeing 4-Band 5-Band Series Parallel Potential Meter
    • Logics
      • Analog Logic
      • Digital Logic
      • Hexa Decimal Numbers
      • Octal Numbers
      • Binary Fraction
      • Binay to Decimal
    • OP-Amplifiers
      • Basics
      • Oscillators
      • Transistor Switch
      • 555 IC circuits
      • Waveform Generators
      • 741 IC Circuits
    • Power supply
      • Transformer
      • Halfwave Rectifier
      • Fullwave Rectifier
      • Bridge Rectifier
      • 78xx Series
      • 0 to 30v Regulator
  • Modules
    • H-Bridge
      • L293D Bridge
      • Relay Bridge
    • RF 434MHz Modules
    • Relay Modules
    • Push to ON switch
    • Push to OFF switch
  • Sensors
    • Analog sensors List-1
      • LDR Photo Diode Solar Cell Transducers Temperature Humidity Sensor Soil Moisture Ranger Sensor Range Detection
    • Analog sensors List-2
      • Flame Sensor Force Sensor Flex Sensor Ambient Sensor Motion Sensor Vibration Sensor Sound Sensor UltraSonic Sensor GrayScale Sensor
    • Digital Sensors
      • Touch Sensor Tilt Sensor Signal
    • 3-Axis Sensor
    • Gyro Sensor
  • Projects
    • Embedded
      • Mini Projects 8051 Arduino NodeMCU MSP430 Raspberry IOT ARM
    • C #
      • Visual Basic Visual Studio
    • Matlab
    • VLSI
    • PHP-HTML
    • Contribute
  • Downloads
  • Technology

ECG MONITORING SYSTEM

AD8232 Heart Rate Monitor Hookup Guide

Share on TwitterShare on FacebookPin It

Introduction

The AD8232 is a neat little chip used to measure the electrical activity of the heart. This electrical activity can be charted as an ECG or Electrocardiogram. Electrocardiography is used to help diagnose various heart conditions. Now for the disclaimer:
NOTE: This device is not intended to diagnose or treat any conditions.
AD8232

Covered in this Tutorial

In this tutorial, we will go over the basics for getting your AD8232 Heart Rate Monitor up and running. First, an overview of the board and all its features will be presented. Then, we'll show you how hook it up to your favorite microcontroller and how to create visual data using Processing.

Suggested Reading

If you are not familiar with any of the following concepts, you may want to review them before moving ahead.

Understanding the ECG
In general terms, lets look at what an ECG is representing and how we're able to sense it. The ECG is separated into two basic Intervals, the PR Interval and the QT Interval, described below.
Note: All information comes from the Waves and Intervals section of the ECG Wikipedia page .
alt text
Credit Wikipedia.org
alt text
Diagram of the heart. Credit Wikipedia.org

PR Interval

The PR interval is the initial wave generated by an electrical impulse traveling from the right atrium to the left. The right atrium is the first chamber to see an electrical impulse. This electrical impulse causes the chambers to "depolarize". This forces it to contract and drain deoxygenated blood from both the Superior and Inferior vena cava into the right ventricle. As the electrical impulse travels across the top of the heart it then triggers the left atrium to contract. The left atrium is responsible for receiving newly oxygenated blood from the lungs into the left ventricle via the left and right pulmonary veins. The pulmonary veins are red in the diagram because they are carrying oxygenated blood. They are still called veins because veins carry blood towards the heart. Science!

QT Interval

The QT Interval is where things get really interesting. The QRS is a complex process that generates the signature "beep" in cardiac monitors. During QRS both ventricles begin to pump. The right ventricle begins to pump deoxygenated blood into the lungs through the left and right pulmonary arteries. The pulmonary arteries are blue in the diagram because they are carrying deoxygenated blood. They are still called arteries because arteries carry blood away the heart. Science, Again! The left ventricle is also begining to pump freshly oxygenated blood through the aorta and into the rest of the body. After the initial contraction comes the ST segment. The ST segment is fairly quiet electrically as it is the time where the ventricals waiting to be "re-polarized". Finally the T wave becomes present to actively "re-ploarize", or relax the ventricles. This relaxation phase resets the ventricles to be filled again by the atriums.
alt text
Heartbeat with corresponding ECG Credit Wikipedia.org

Connecting the Hardware

In this guide, we'll connect the AD8232 Breakout to an Arduino microcontroller. We will build a simple cardiac monitor that will allow you to measure the electrical activity of the heart in real time!



Pin Connections

The AD8232 Heart Rate Monitor breaks out nine connections from the IC. We traditionally call these connections "pins" because they come from the pins on the IC, but they are actually holes that you can solder wires or header pins to.
alt text
We'll connect five of the nine pins on the board to your Arduino. The five pins you need are labeled GND, 3.3v, OUTPUT, LO-, and LO+.
Board LabelPin FunctionArduino Connection
GNDGroundGND
3.3v3.3v Power Supply3.3v
OUTPUTOutput SignalA0
LO-Leads-off Detect -11
LO+Leads-off Detect +10
SDNShutdownNot used

Connecting Headers to the Board

You can use any method you'd like to make your connections to the board. For this example, we'll solder on a five-pin length of male-male header strip and use a breadboard and jumpers to make our connections.
alt text
Headers installed
Follow the diagram below, to make necessary connections. The SDN pin is not used in this demo. Connecting this pin to ground or "LOW" on a digital pin will power down the chip. This is useful for low power applications.
alt text
Connection Diagram
Now that the electronics are complete, let's look at sensor pad placement. It is recommended to snap the sensor pads on the leads before application to the body. The closer to the heart the pads are, the better the measurement. The cables are color coded to help identify proper placement.
Cable ColorSignal
BlackRA (Right Arm)
BlueLA (Left Arm)
RedRL (Right Leg)

alt text
Sensors connected to Heart Monitor
alt text
Typical Sensor Placements

Uploading the Sketch and Connecting with Processing

By this point, you should have the hardware connected and ready.
The example sketch can be found on github here. You can cut and paste the code straight from github or clone the repository and open the file. For more on using the SparkFun Github repositories, read this handy tutorial. If you've never worked with the Arduino IDE before, please see this tutorial.
alt text
Upload sketch to Arduino Pro-Mini
Now that you have a sketch running, let's get the processing sketch ready. The processing sketch will give you a visual output of what's going on. The example processing sketch can be found here. The example Processing sketch works with the Processing IDE v2.2.1. Later versions may not work with the example code so makes sure to download the stable release for v2.2.1 from the Processing IDE Download page.
alt text
Run the Processing sketch
If the processing sketch does not work, you may need to modify the following line:
myPort = new Serial(this, Serial.list()[2], 9600);
You may need to change the parameter inside Serial.list()[N]. A List of available COM ports will appear in the lower portion of the sketch window. Remember that COM port selection begins at 0. Typically your Arduino will appear as the highest COM number if it is the only device connected to your computer.
alt text
The Arduino shows up as COM38. This is found in the Serial List at array element "2".
If everything is working correctly, you should see a nice box pop up and start displaying the output signal.
alt text
"Normal" heart rate of an SFE engineer
If your subject decides to remove the sensors, the leads off detection will kick in and display a flat blue line.
alt text
"Flight, we just lost Lovell!"

Tips and Tricks

ECG's are notoriously noisy. This is because you are measuring muscle activation. The further sensor pads are from the heart, the more muscle noise you will see. These are commonly referred to as "Motion Artifacts". So here are some simple tips to improve the signal quality.
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
Terms and Conditions -
Privacy Policy -

Contact Us

Name

Email *

Message *