Arduino ECG Project

As a retired physician and an electronic hobbyist, the prospect of assembling a simple ECG using three small circuit boards available from SparkFun was very interesting.  It was also an opportunity to work with an Arduino minicomputer. 

Previously, I had used the Raspberry Pi in a number of projects. I had also managed not to use a breadboard in many decades of electronic projects so that was also a plus. From a YouTube video, I learned that the original breadboards were indeed breadboards: a wood board with screws inserted to which prototype components were attached.

I began the project by ordering the three small circuit boards:

  • SEN-12650 SparkFun Single Lead Heart Rate Monitor – AD8232
  • DEV-11114 Arduino Pro Mini 328 – 3.3V/8MHz
  • DEV-09873 SparkFun FTDI Basic Breakout – 3.3V

and the following additional parts:

  • CAB-12970 Sensor Cable – Electrode Pads (3 connector)
  • SEN-12969 Biomedical Sensor Pad (10 pack)
  • SparkFun USB Mini-B Cable – 6 Foot
  • PRT-12002 Breadboard – Self-Adhesive (White)
  • PRT-00116 Break Away Headers – Straight
  • PRT-00124 Jumper Wire Kit – 140pcs

Figure 1 shows a breadboard design for the ECG. I began the project by reproducing this configuration. (See Figure 2.) Later in the project, I rotated the AD8232 board 180 degrees so it stayed within the confines of the breadboard and adjusted the jumper wires accordingly. This allowed the ECG to fit in the transparent Rack Cluster Case I planned to use. (See Figure 3 Rack Cluster Case and Figure 4, revised wiring.) Although the ECG can be viewed on a computer using the downloadable Arduino software, I preferred to view the ECG with my DSO 138 Oscilloscope. The two interface seamlessly.

Figure 1. Assembled ECG
Figure 2. Original Breadboard Wiring
Figure 3. Rack Cluster Case
Figure 4. Breadboard Wiring Revised for Rotated ECG Board

The Arduino Pro Mini is a bare bones board that requires the SparkFun FTDI Basic Breakout board to connect to a computer to program the minicomputer chip and supply power via the USB connector interface.

Pretty much all you need to know about building this ECG is documented on the SparkFun site at:

https://learn.sparkfun.com/tutorials/ad8232-heart-rate-monitor-hookup-guide .

I recommend the following tutorial on the Arduino Pro Mini 328 – 3.3V/8MHz as well:

https://learn.sparkfun.com/tutorials/using-the-arduino-pro-mini-33v .

The following is the program (for Arduino, called a “sketch” required to run the ECG):

https://github.com/sparkfun/AD8232_Heart_Rate_Monitor/blob/master/Software/Heart_Rate_Display_Arduino/Heart_Rate_Display_Arduino.ino .

The project steps are:

1. Assemble the ECG as shown in Figure 1 or the equivalent.

2. Connect the SparkFun FTDI Basic Breakout board to a computer (with internet access) via USB.

3. Download the Arduino executable. This is available at:

https://www.arduino.cc/en/Main/Software.

4. Use the Arduino program to install the “sketch” on the Arduino Pro Mini board.

5. Follow the directions to attach leads to the project and a live person.

6. View the ECG on your computer using the Arduino program (or connect the output of the SparkFun Single Lead Heart Rate Monitor – AD8232 to an oscilloscope such as the DSO 138).

I elected to power the ECG with a 9 volt battery and ordered a 9 volt battery holder with a switch (LAMPVPATH 9 Volt Battery Holder with Switch) and installed a 3.5mm female socket to the output and ground terminals of the ECG in order to connect to the equivalent male plug input to the DSO 138 oscilloscope.

Project Photos:

Figure 5. ECG viewed on a PC
Figure 6. ECG viewed on the DSO138 oscilloscope
Figure 7. The Project: ECG on left and DSO138 oscilloscope on right