Heartbeat/Pulse/BPM Rate Monitor using Arduino & Pulse Sensor

Heartbeat/Pulse/BPM Rate Monitor using Arduino & Pulse Sensor (Last Updated On: December 5, 2018)

Introduction:

In this project we have designed Heartbeat/Pulse/BPM Rate Monitor using Arduino & Pulse Sensor. The pulse sensor is interfaced with Arduino for monitoring Heartbeat/Pulse/BPM Rate. We have used pulse sensor with Arduino board and the result is displayed in 204 LCD panel. You can even use 162 LCD display.


Heartbeat/Pulse/BPM Rate Monitor using Arduino & Pulse Sensor

This sensor is quite easy to use and operate. Place your finger on top of the sensor and it will sense the heartbeat by measuring the change in light from the expansion of capillary blood vessels.

The advanced version of this project can be designed from here, i.e based totally on IOT with ESP8266 Wi-Fi Module. Check Pulse Rate Monitoring over Internet using ThingSpeak & ESP8266 with Arduino.


Pulse Sensor:

Introduction:

(Buy this Pulse Sensor Online from Amazon)

Heartbeat/Pulse/BPM Rate Monitor using Arduino & Pulse Sensor

The Pulse Sensor is a plug-and-play heart-rate sensor for Arduino. It can be used by students, artists, athletes, makers, and game & mobile developers who want to easily incorporate live heart-rate data into their projects.Essence it is an integrated optical amplifying circuit and noise eliminating circuit sensor. Clip the Pulse Sensor to your earlobe or finger tip and plug it into your Arduino ,you can ready to read heart rate. Also it have an Arduino demo code that make it easy to use.

Pin Out – Pulse Sensor:

The pulse sensor has three pins: VCC, GND & Analog Pin.

Heartbeat/Pulse/BPM Rate Monitor using Arduino & Pulse Sensor

There is also a LED in the center of this sensor module which helps in detecting the heartbeat. Below the LED, there is a noise elimination circuitry which is supposed to keep away the noise from affecting the readings.


Heartbeat/Pulse/BPM Rate Monitor using Arduino & Pulse Sensor:

The circuit diagram for interfacing pulse sensor with Arduino and LCD is given below. Simply make the connections as below and upload the code.

Heartbeat/Pulse/BPM Rate Monitor using Arduino & Pulse Sensor


Working of the Project:

When a heartbeat occurs blood is pumped through the human body and gets squeezed into the capillary tissues. Consequently, the volume of these capillary tissues increases. But in between the two consequtive heartbeats this volume inside capillary tissues decreases. This change in volume between the heartbeats affects the amount of light that will transmit through these tissues. This can be measured with the help of microcontroller.


The pulse sensor module has a light which helps in measuring the pulse rate. When we place the finger on the pulse sensor, the light reflected will change based on the volume of blood inside the capillary blood vessels. This variation in light transmission and reflection can be obtained as a pulse from the ouptput of pulse sensor. This pulse can be then conditioned to measure heartbeat and then programmed accordingly to read as heartbeat count using Arduino.

Heartbeat/Pulse/BPM Rate Monitor using Arduino & Pulse Sensor


Source Code:

The source code for Heartbeat/Pulse/BPM Rate Monitor using Arduino & Pulse Sensor is given below. Assemble the circuit as given above in circuit diagram and upload this code below. First you need to add Pulse Sensor library file. Download the library from here. Then simply upload this code below.

#define USE_ARDUINO_INTERRUPTS true // Set-up low-level interrupts for most acurate BPM math.
#include <PulseSensorPlayground.h> // Includes the PulseSensorPlayground Library.
#include<LiquidCrystal.h>
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);

// Variables
const int PulseWire = 0; // PulseSensor PURPLE WIRE connected to ANALOG PIN 0
const int LED13 = 13; // The on-board Arduino LED, close to PIN 13.
int Threshold = 550; // Determine which Signal to "count as a beat" and which to ignore.
// Use the "Gettting Started Project" to fine-tune Threshold Value beyond default setting.
// Otherwise leave the default "550" value.

PulseSensorPlayground pulseSensor; // Creates an instance of the PulseSensorPlayground object called "pulseSensor"
void setup() {

Serial.begin(9600); // For Serial Monitor
lcd.begin(20,4);

// Configure the PulseSensor object, by assigning our variables to it.
pulseSensor.analogInput(PulseWire);
pulseSensor.blinkOnPulse(LED13); //auto-magically blink Arduino's LED with heartbeat.
pulseSensor.setThreshold(Threshold);

// Double-check the "pulseSensor" object was created and "began" seeing a signal.
if (pulseSensor.begin()) {
Serial.println("We created a pulseSensor Object !"); //This prints one time at Arduino power-up, or on Arduino reset.
lcd.setCursor(0,0);
lcd.print(" Heart Rate Monitor");

}
}

void loop() {

int myBPM = pulseSensor.getBeatsPerMinute(); // Calls function on our pulseSensor object that returns BPM as an "int".
// "myBPM" hold this BPM value now.
if (pulseSensor.sawStartOfBeat()) { // Constantly test to see if "a beat happened".
Serial.println("♥ A HeartBeat Happened ! "); // If test is "true", print a message "a heartbeat happened".
Serial.print("BPM: "); // Print phrase "BPM: "
Serial.println(myBPM); // Print the value inside of myBPM.
lcd.setCursor(0,2);
lcd.print("HeartBeat Happened !"); // If test is "true", print a message "a heartbeat happened".
lcd.setCursor(5,3);
lcd.print("BPM: "); // Print phrase "BPM: "
lcd.print(myBPM);
}
delay(20); // considered best practice in a simple sketch.
}

Video Preview & Explanation:




6 Comments

  1. please sir, what could be the reason why my BPM reads progressively ie something like 50, 68, 88,99,114,120,200?

    1. Tightly put ur finger on sensor by wrapping it with sticky wrapper. Moving the finger will change the bpm value.

  2. Why is the library PulseSensorPlayground not being recognized, not turning orange, even there are ccp, h and keyword text file? What’s the problem? Thank you.

  3. Why is the PulseSensorPlayground library not being recognized (not turning orange text) even there are ccp, h and keywords text files? What’s the problem? Thank you.

Leave a Reply

Your email address will not be published. Required fields are marked *