Arduino Projects

How to make Heart Rate Monitor

Heart Rate Monitor

Welcome to the Techatronic Guys, In this article, we are making a new project which is interesting and easy to make. ever you noticed your heartbeat? surely you noticed and feel it. but with the help of this project, you will see and calculate your heartbeat with this superb project. also, I am making a heart rate monitor video tutorial on youtube from there you can easily make and learn this project. there is an OLED display on which you will see the graphical representation as well as the numeric value of the heartbeat. heart rate and pulse rate are the same things. many of us consider them different. and in this article, we will learn I2C protocol, analog pin usage, and many other things. we are making a lot of engineering projects on different controllers and sensors. but mainly we use Arduino and if you want to learn the Arduino you can learn it from our website. we are providing a series of Arduino tutorial which can help you to learn the Arduino and its interfacing with the device and sensors.

heart rate monitor

HTML Image as link
Qries

How does it work?

In this paragraph, we will see the working of the heart rate monitor and sensor. the pulse rate sensor having a green color light on which we have to put our finger so that the light can incident on our skin. after that, the sensor read the value and sens this value to the Arduino. Arduino process on this value and after all the calculation it send the data to OLED display to show. OLED display is black and white display that can only show the white colour in the text as well as in the animation. so I am using them both. 128×64 pixel content in this tiny OLED. so it can show you the 128 characters at a time.

HTML Image as link
Qries

OLED display is more attractive than the old 16X2 display and having more pixels so that it can show more character than the LCD. and it can directly communicate with the I2C Protocol. so, it needs only two wires to communicate with the controller. but the drawback is the pixel size. the words displaying into the display are too short to see. Now talk about the Heart rate sensor. Heart rate sensor work on the optical principle. there are one light and one photodiode that sense the light intensity. the sensitivity is very high of this photodiode so that can easily sense the low-intensity light also. now, when we place our finger at the top of the sensor the light incident from the light source on the finger and back to the photodiode. when the blood suddenly increases the light sense by the photodiode also be change. so that the sensor can send this data to the process. this is how the heart rate monitor systems work. there are one more OLED display project gas leakage detector

Components Required for Heart Rate Monitor

S.No

Schematic Diagram for Heart Rate Monitor

heart rate monitor circuit diagram

 

 

Arduino pulse rate monitor circuit diagram

How to make Heart Rate Monitor circuit

Arduino UNO

Oled Display

D2 Pin  ( SDA Pin )

SDA Pin

D1 Pin  ( SCL Pin )

SCL Pin

( +5V ) VCC

VCC

GND ( Ground )

GND

Arduino UNO

Pulse sensor

A0 Pin

OUT Pin

( +5V ) VCC

VCC

GND ( Ground )

GND

Arduino

LED G

220 Ohm Resistor

D2 Pin

 

 

GND

 

Terminal 1

 

Cathode Pin

Terminal 2

Arduino Code for Heart Rate Monitor

#include <Adafruit_SSD1306.h>

#define OLED_Address 0x3C
Adafruit_SSD1306 oled(1);

int x=0;
int lastx=0;
int lasty=0;
int LastTime=0;
int ThisTime;
bool BPMTiming=false;
bool BeatComplete=false;
int BPM=0;
#define UpperThreshold 560
#define LowerThreshold 500

void setup() {
oled.begin(SSD1306_SWITCHCAPVCC, OLED_Address);
oled.clearDisplay();
oled.setTextSize(2);
}


void loop()
{
if(x>127)
{
oled.clearDisplay();
x=0;
lastx=x;
}

ThisTime=millis();
int value=analogRead(0);
oled.setTextColor(WHITE);
int y=60-(value/16);
oled.writeLine(lastx,lasty,x,y,WHITE);
lasty=y;
lastx=x;
// calc bpm

if(value>UpperThreshold)
{
if(BeatComplete)
{
BPM=ThisTime-LastTime;
BPM=int(60/(float(BPM)/1000));
BPMTiming=false;
BeatComplete=false;
tone(8,1000,250);
}
if(BPMTiming==false)
{
LastTime=millis();
BPMTiming=true;
}
}
if((value<LowerThreshold)&(BPMTiming))
BeatComplete=true;

// display bpm
oled.writeFillRect(0,50,128,16,BLACK);
oled.setCursor(0,50);
oled.print(BPM);
oled.print(” BPM”);
oled.display();
x++;
}

there are two library which you have to include in the Arduino IDE 

Arduino GFX Library

Arduino 1306 library 

Upload the program into the Arduino and make co0nnection with the help of circuit diagram. 

Learn 10+ basic activity & sensor interfacing with our Arduino ebook. Well explained program. And brief circuit diagram WhatsApp and email support. which will help you to learn basic electronics, Arduino Coding, Sensor interfacing with Arduino, Arduino, and much more. buy Arduino Ebook to learn https://techatronic.com/arduino-ebook/

Video Sample

Related Articles

3 Comments

Leave a Reply

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

Back to top button