top of page

Interfacing The AD8232 ECG sensor to the Arduino Board

In this tutorial, I'm going to show you how to Interface the AD8232 ECG Sensor to the Arduino uno.


Items Required

1 x AD8232 ECG Sensor

1 x Arduino board (I am using An Arduino Uno).

1 x USB cable

1 x Computer with Arduino software installed

1 x Breadboard

Surface Electrodes



Circuit Theory:

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.It can be used by hobbyist to measure electrical activity of the heart.

AD8232 Heart Monitor
AD8232 Heart Monitor

NOTE: This device is not intended to diagnose or treat any conditions.


The ECG Signal

The ECG is separated into two basic Intervals, the PR Interval and the QT Interval, described below


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 beginning 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.


Pin Connections

The AD8232 Heart Rate Monitor breaks out nine connections from the IC.The five pins you need are labeled GND, 3.3v, OUTPUT, LO-, and LO+.


Board Label Pin Funtion

GND Ground

3.3V 3.3v Power Supply

OUTPUT Output Signal(A0)

LO- Leads-off Detect –(Pin 11)

LO+ Leads-off Detect + (PIN 10)


Note:-The Pins LO- and LO+ detect whether the electrodes are connected to the body.



 

Step 1

Connect the circuit as per Circuit diagram


Arduino Interfaced to Ad8232
Circuit Diagram

Circuit Diagram Construction
Circuit Diagram Construction


Step 2:

Open a new window in the Arduino terminal and type the following code



Once the code is uploaded connect the surface electrodes to the body as per the below diagram.

Surface Electrode Placement Diagram
Surface Electrode Placement Diagram

It is recommended to place 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.



Red: RA (Right Arm) Yellow: LA (Left Arm) Green: RL (Right Leg)


Once connected you can see the graph on the serial monitor.


Output
Output On serial Monitor

Buy your arduino here: https://amzn.to/3n4dy1B

Buy your AD8232 sensor here: https://amzn.to/3LL5qNO


Visit our store for more fun products here


87 views

Comments


bottom of page