Heartbeat and ECG Measurement

Heartbeat and ECG Measurement

Objective

This experiment measures heart rate and ECG signals using sensors like the Pulse Sensor and ECG Sensor.

Required Components

Working Principle

The pulse sensor detects changes in blood flow, while the ECG sensor measures electrical signals generated by the heart.

Circuit Diagram

ECG and Pulse Sensor Circuit Diagram

Arduino Code


/*
 * Heartbeat and ECG Measurement
 * This code reads data from the pulse sensor and ECG sensor.
 */

const int pulsePin = A0;  // Pulse sensor connected to analog pin A0
int pulseValue = 0;

void setup() {
    Serial.begin(9600);  // Initialize serial communication
}

void loop() {
    pulseValue = analogRead(pulsePin);  // Read the pulse value
    Serial.print("Heartbeat Value: ");
    Serial.println(pulseValue);

    delay(1000);  // Wait for 1 second before the next reading
}
            

Results

The serial monitor will display the heartbeat data and ECG signal values.

Applications

Conclusion

The heartbeat and ECG sensors provide valuable data for monitoring heart health, with applications in medical devices and wearable health technology.