Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino Micro and AD8232 Heart Rate Monitor with Lead-Off Detection

View and Edit Project In Cirkit DesignerImage of Arduino Micro and AD8232 Heart Rate Monitor with Lead-Off Detection

Circuit Documentation

Summary

This circuit is designed to monitor heart rate using an AD8232 Heart Rate Monitor module connected to an Arduino Micro (Rev3). The Arduino reads the heart rate signal from the AD8232 module and prints the analog value to the Serial Monitor. Additionally, it checks for lead-off detection.

Component List

  1. Arduino Micro (Rev3)

    • Description: A microcontroller board based on the ATmega32U4.
    • Pins: MISO, 5V, SCK, MOSI, RESET, GND, RXLED/SS, D1/TX, D0/RX, D2/SDA, D3/SCL, D4 PWM/A6, D5 PWM, D6 PWM/A7, D7, D8 PWM/A8, D9 PWM/A9, D10 PWM/A10, D11 PWM, D12 PWM/A11, VIN, A5, A4, A3, A2, A1, A0, AREF, 3V3, D13 PWM
  2. AD8232 Heart Rate Monitor

    • Description: A single-lead heart rate monitor front end.
    • Pins: GND, 3.3v, OUTPUT, LO-, LO+, SDN, RA, LA, RL

Wiring Details

Arduino Micro (Rev3)

AD8232 Heart Rate Monitor

Code Documentation

/*
 * Arduino ECG Heart Rate Monitor using AD8232
 * This code reads the heart rate signal from the AD8232 module and prints
 * the analog value to the Serial Monitor.
 */

// Pin definitions
const int ecgPin = A0; // ECG output connected to A0
const int loPlusPin = 10; // LO+ connected to D10
const int loMinusPin = 11; // LO- connected to D11

void setup() {
  // Initialize serial communication
  Serial.begin(9600);
  // Set LO+ and LO- pins as inputs
  pinMode(loPlusPin, INPUT);
  pinMode(loMinusPin, INPUT);
}

void loop() {
  // Read the analog value from the ECG pin
  int ecgValue = analogRead(ecgPin);
  // Print the ECG value to the Serial Monitor
  Serial.println(ecgValue);
  // Check for lead-off detection
  if (digitalRead(loPlusPin) == 1 || digitalRead(loMinusPin) == 1) {
    Serial.println("Lead off detected!");
  }
  // Small delay for stability
  delay(10);
}