ECG Signal Analysis

Introduction

This experiment demonstrates how to measure and analyze ECG signals using a sensor and an Arduino.

ECG Sensor

Components Needed

Circuit Setup

  1. Connect the ECG sensor to the Arduino's analog input pins.
  2. Place the electrodes on the body to measure the electrical signals from the heart.

The ECG sensor detects the electrical signals produced by the heart and sends them to the Arduino for analysis.

ECG Circuit Setup

Code for ECG Signal Analysis

Upload the following code to your Arduino to analyze the ECG signal:


const int ecgPin = A0;
int ecgValue;

void setup() {
  Serial.begin(9600);
}

void loop() {
  ecgValue = analogRead(ecgPin);
  Serial.print("ECG Signal: ");
  Serial.println(ecgValue);
  delay(100);
}
            

Explanation

The ECG sensor detects the electrical signals from the heart. The Arduino reads these signals, and the values are sent to the Serial Monitor for analysis.

Troubleshooting