Heartbeat Sensor

Heartbeat Sensor with Pulse Monitor

Introduction

In this experiment, we will use a heartbeat sensor to monitor pulse rate. This device measures heart rate in beats per minute (BPM) and is often used in fitness and medical devices.

Heartbeat Sensor Setup

Components Needed

Circuit Setup

  1. Connect the VCC pin of the heartbeat sensor to the 5V pin of the Arduino.
  2. Connect the GND pin of the sensor to the GND pin of the Arduino.
  3. Connect the Signal (S) pin of the sensor to pin A0 on the Arduino.

Ensure all connections are secure and double-check the wiring.

Heartbeat Sensor Circuit Setup

Code for Heartbeat Sensor

Upload the following code to your Arduino to measure and display the heartbeat data in the Serial Monitor:


const int sensorPin = A0; // Pin connected to the heartbeat sensor
void setup() {
    Serial.begin(9600); // Start serial communication
}
void loop() {
    int sensorValue = analogRead(sensorPin); // Read sensor value
    Serial.println(sensorValue); // Display the value in the Serial Monitor
    delay(100); // Delay for stability
}
            

Explanation

The sensor detects changes in light reflection caused by blood flow. The analog values from the sensor are displayed in the Serial Monitor. These values can be further processed to calculate BPM.

Troubleshooting