Simple, Portable Continuous ECG/EKG Monitor Using ATMega328 (Arduino Uno Chip) + AD8232

by nick1415 in Circuits > Arduino

1775 Views, 6 Favorites, 0 Comments

Simple, Portable Continuous ECG/EKG Monitor Using ATMega328 (Arduino Uno Chip) + AD8232

ECG1.jpg

This instructables page will show you how to make a simple portable 3-lead ECG/EKG monitor. The monitor uses a AD8232 breakout board to measure the ECG signal and save it onto a microSD card for later analysis.

Main supplies needed:

5V rechargeable battery

AD8232 breakout board

Real time clock - RTC DS3231 module

Micro SD card module + micro SD card

Micro-USB breakout

3.3V regulator

ECG leads + disposable pads

Resistors/capacitors/ATMega328 chip for converting from Arduino Uno layout to ATMega328 standalone – see https://dronebotworkshop.com/arduino-uno-atmega328/

Test Components and Code With Arduino Uno

ECG monitor_bb.png
Waveform.JPG

The system can first be tested using an Arduino Uno. Wire up as shown in the diagram . The ECG cables and pads are connected to the AD8232 and should be positioned either side of the chest with the ground connection lower down - see the sparkfun page https://learn.sparkfun.com/tutorials/ad8232-heart-rate-monitor-hookup-guide for more details. An Arduino sketch that can be used is downloadable here. The data must be recorded quickly onto the SD card to get an accurate ECG signal. I have found that the SD card saving routine takes on the order of 10s of milliseconds (some SD cards are faster or slower). Saving a new time point to the SD card on every loop is too slow since we really want to be able to record every couple of milliseconds. Therefore the code has a buffer which will gather 40 points before sending to SD card for recording. The data is saved as a semicolon separated txt file. The three columns show the AD8232 output, time from the RTC module, and time from the millis() function which gives greater precision for determining the time between datapoints.

Make Portable Version

ECG2.jpg

To make the system portable I used the following guide https://dronebotworkshop.com/arduino-uno-atmega328/ to make a standalone ATMeg328 based system with resistors, capacitors and quartz crystal. I used a 5V lithium rechargeable battery with a micro-usb breakout board to provide power together with a 3.3V regulator to power the AD8232. The various components were soldered onto stripboard.