Skip to Content


info@hub360.com.ng 07044715478

PULSE RATE MONITOR

February 18, 2025 by
PULSE RATE MONITOR
My Company (Chicago), Hub360
| No comments yet

The Pulse Rate Monitor is a compact and efficient system designed to measure and display a person’s heart rate in real time. Using a pulse sensor to detect heartbeats and an Arduino Nano to process the data, this project calculates the heart rate in beats per minute (BPM) and displays it on a 16x2 LCD screen. Whether you're a fitness enthusiast, a healthcare hobbyist, or a student exploring biomedical electronics, this system offers a hands-on way to understand how technology can be used to monitor vital signs.

By combining a pulse sensor, an Arduino, and an LCD display, this project demonstrates the practical application of signal processing and real-time data visualization. It’s an excellent introduction to wearable health technology and can be expanded with features like data logging or wireless connectivity for remote monitoring.

Components Required

  • Arduino Nano:
    • The microcontroller that processes pulse sensor data and calculates BPM.
  • Pulse Sensor (KY-039 or Pulse Sensor Amped):
    • Detects heartbeats by measuring changes in blood flow.
  • 16x2 LCD Display with I2C Module:
    • Displays the heart rate (BPM) in real time.
  • 10kΩ Resistor:
    • Used for signal stabilization in the pulse sensor circuit.
  • Breadboard and Jumper Wires:
    • For assembling and connecting the circuit components.
  • Power Supply :
    • Powers the Arduino and other components.

Circuit Diagram

1. Pulse Sensor Connections

  • VCC: Connect to 5V on the Arduino.
  • GND: Connect to GND on the Arduino.
  • Signal: Connect to A0 on the Arduino.

2. LCD Display Connections (Using I2C Module)

  • VCC: Connect to 5V on the Arduino.
  • GND: Connect to GND on the Arduino.
  • SDA: Connect to A4 on the Arduino.
  • SCL: Connect to A5 on the Arduino.

3. Power Supply

  • Connect a 5V USB power supply or 9V battery pack to the Arduino Nano.

CODE

#include <Wire.h>

#include <LiquidCrystal_I2C.h>

#include <PulseSensorPlayground.h>


#define PULSE_PIN A0          // Pulse sensor connected to A0

#define THRESHOLD 550         // Adjust this threshold if needed


PulseSensorPlayground pulseSensor;

LiquidCrystal_I2C lcd(0x27, 16, 2); // I2C address 0x27


void setup() {

  lcd.begin(16, 2);          // Initialize LCD

  lcd.backlight();           // Turn on LCD backlight

  lcd.setCursor(0, 0);       // Set cursor to first row

  lcd.print("Heart Rate: "); // Display static text


  pulseSensor.analogInput(PULSE_PIN); // Set pulse sensor input pin

  pulseSensor.setThreshold(THRESHOLD); // Set detection threshold


  if (pulseSensor.begin()) {

    Serial.println("Pulse sensor initialized");

  }

}


void loop() {

  int BPM = pulseSensor.getBeatsPerMinute(); // Get BPM value


  if (pulseSensor.sawStartOfBeat()) {       // Check for a heartbeat

    Serial.print("BPM: ");

    Serial.println(BPM);


    lcd.setCursor(0, 1);       // Set cursor to second row

    lcd.print("BPM: ");        // Display BPM label

    lcd.print(BPM);            // Display BPM value

    lcd.print(" ");            // Clear extra digits

  }


  delay(20); // Small delay for stable readings

}


CODE EXPLANATION

1. Libraries and Definitions

  • Libraries:
    • Wire.h: Enables I2C communication for the LCD.
    • LiquidCrystal_I2C.h: Simplifies control of the I2C LCD.
    • PulseSensorPlayground.h: Provides functions to read and process pulse sensor data.
  • Definitions:
    • PULSE_PIN: The pulse sensor is connected to A0.
    • THRESHOLD: A value to filter noise and detect valid heartbeats (adjust as needed).

2. setup() Function

  • Initializes the LCD and displays a static message ("Heart Rate: ").
  • Configures the pulse sensor and sets the detection threshold.
  • Checks if the pulse sensor is initialized successfully.

3. loop() Function

  • Reads the BPM value from the pulse sensor.
  • If a heartbeat is detected (sawStartOfBeat()), it updates the BPM value on the LCD and Serial Monitor.
  • A small delay (delay(20)) ensures stable readings.

OBSERVING FUNCTIONALITY

  1. Attach the pulse sensor to your fingertip or earlobe.
  2. The sensor detects heartbeats and sends signals to the Arduino.
  3. The Arduino calculates the heart rate (BPM) and displays it on the LCD in real time.
  4. The BPM updates continuously as long as the sensor detects a heartbeat.

COMMON PROBLEMS AND SOLUTIONS

  1. Unstable or Fluctuating BPM Readings:
    • Ensure the pulse sensor is securely placed on the fingertip or earlobe.
    • Minimize movement, as excessive motion can cause inaccurate readings.
  2. LCD Not Displaying Data:
    • Verify the I2C address (0x27) matches your LCD module.
    • Check the SDA and SCL connections to A4 and A5 on the Arduino.
  3. No Pulse Detected:
    • Adjust the THRESHOLD value in the code to better match the sensor’s output.
    • Ensure the sensor’s signal pin is properly connected to A0.

Conclusion

The Pulse Rate Monitor is a simple yet powerful project that bridges the gap between electronics and healthcare. By leveraging a pulse sensor, an Arduino, and an LCD display, this system provides real-time heart rate monitoring, making it a valuable tool for fitness tracking, health education, or even DIY medical devices.

This project not only teaches the basics of sensor integration and data processing but also opens the door to more advanced applications, such as IoT-enabled health monitors or wearable devices. Whether you're building this for personal use, a school project, or as a stepping stone to more complex systems, the Pulse Rate Monitor is a testament to how technology can enhance our understanding of the human body.

So, grab your components, upload the code, and start monitoring your heart rate with this innovative and educational project! 


Comments

Share this post
Tags
Archive
Sign in to leave a comment