Skip to content

arhangoyal/Electrocardiogram

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

Electrocardiogram

This tutorial will take you through the steps of building a 3-point electrocardiogram using an Arduino.

Before you begin, here’s a little info about ECGs:

An ECG detects your heart's electrical rhythm and graphs them out. This graph is called a tracing and it consists of several waves that recur with each heartbeat, about 60 to 100 times per minute. The wave pattern is used to diagnose various heart conditions. Ideally, the wave pattern should be a recurring one (sample output attached later). A typical ECG machine is bulky and expensive. For developing countries like India which have a high incidence of cardio-vascular diseases, a low-cost portable ECG machine is a boon to make medical facilities accessible in far flung rural areas.

Supplies

  • Arduino Uno / Nano
  • Male to female jumper wires (5)
  • AD8232 module
  • 3 electrodes (pad with cable to attach to AD8232 module)

Building the Circuit

Solder pins/wires into the 6 holes (GND to SDN) of the AD8232 IC Make the following connections:

Arduino Connection AD8232
GND GND
3.3V 3.3V
A0 OUTPUT
~11 LO-
~10 LO+

Note:

  • ~ denotes a PWM/analog pin
  • The SDN pin is not used in this tutorial. Connecting this pin to ground or "LOW" on a digital pin will power down the chip. This is useful for low power applications.

Setup:

setup

Circuit Diagram:

circuitDiagram

Placement of Sensor Pads/Electrodes

Placement of sensor pads:

Cable Color Signal
Red Right Arm (RA)
Yellow Left Arm (LA)
Green Right Leg (RL)
  • Make sure you clean your skin (with sanitiser perhaps) before attaching the sensor pads.
  • Also, the closer to the heart the pads are, the better the measurement. Two methods of connecting the pads are: sensorPlacement

Program - Arduino IDE

ecg_ver1.ino

Uploading the Program to Your Arduino

setting1 setting2

  • Connect your Arduino to your laptop/computer
  • Choose your Arduino board (Tools —> Board)
  • Choose device port where you’ve attached the Arduino (Tools —> Port)
  • Compile and upload the code. Then open up the serial plotter (Tools —> Serial Plotter)

Sample Output

output Notice the graph is consistent in the image (the waveform is repeating). This means we’re all good.

Thank you.

Social:

Do share your comments. I'd love to hear about your experience while trying out the project! I'll try to reply to all queries within 24 hours.

  1. YouTube:
    a. Scientify Inc
    b. Scientify Hindi
  2. Linkedin
  3. Instagram
  4. Instructables

About

3-point electrocardiogram using an Arduino

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages