Skip to main content

Pulse Rate Sensor Using Arduino

Components

  1. Arduino
  2. Heart Beat sensor module
  3. 16x2 LCD
  4. Push button
  5. Bread board
  6. Power
  7. Connecting wires

Working of Heartbeat Monitor Project

Working of this project is quite easy but a little calculation for calculating heart rate is required. There are several methods for calculating heart rate, but here we have read only five pulses. Then we have calculated total heart beat in a minute by applying the below formula:
     Five_pusle_time=time2-time1;
      Single_pulse_time= Five_pusle_time /5;
      rate=60000/ Single_pulse_time;
where time1 is first pulse counter value
time2 is list pulse counter value
rate is final heart rate.

When first pulse comes, we start counter by using timer counter function in arduino that is millis();. And take first pulse counter value form millis();. Then we wait for five pulses. After getting five pulses we again take counter value in time2 and then we substarct time1 from time2 to take original time taken by five pulses. And then divide this time by 5 times for getting single pulse time. Now we have time for single pulse and we can easily find the pulse in one minute, deviding 600000 ms by single pulse time.
Rate= 600000/single pulse time.
In this project we have used Heart beat sensor module to detect Heart Beat. This sensor module contains an IR pair which actually detect heart beat from blood. Heart pumps the blood in body which is called heart beat, when it happens the blood concentration in body changes. And we use this change to make a voltage or pulse electrically.

Circuit Diagram and Explanation

Circuit of heartbeat monitor is shown below, which contains arduino uno, heart beat sensor module, reset button and LCD. Arduino controls whole the process of system like reading pulses form Heart beat sensor module, calculating heart rate and sending this data to LCD. We can set the sensitivity of this sensor module by inbuilt potentiometer placed on this module. 
Arduino Based Heartbeat Counter Circuit Diagram
Heart beat sensor module’s output pin is directly connected to pin 8 of arduino. Vcc and GND are connected to Vcc and GND. A 16x2 LCD is connected with arduino in 4-bit mode. Control pin RS, RW and En are directly connected to arduino pin 12, GND and 11. And data pin D4-D7 is connected to pins 5, 4, 3 and 2 of arduino. And one push button is added for resetting reading and another is used to start the system for reading pulses. When we need to count heart rate, we press start button then arduino start counting pulses and also start counter for five seconds. This start push button is connected to pin 7 and reset push button is connected to pin 6 of arduino with respect to ground.

Program Description

In code we have used digital read function to read output of Heart Beat sensor module and millis() fuction for calculating time and then calculate Heart Rate.
heartbeat counter code
Before this we have initiazed all the components that we used in this project.
setup
and here we have pullup the push button line by using software pullup.
pullup
Code: 
#include<LiquidCrystal.h>
LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int in = 8;
int Reset=6;
int start=7;
int count=0,i=0,k=0,rate=0;
unsigned long time2,time1;
unsigned long time;
byte heart[8] =
{
  0b00000,
  0b01010,
  0b11111,
  0b11111,
  0b11111,
  0b01110,
  0b00100,
  0b00000
};
void setup()
{
  lcd.createChar(1, heart);
  lcd.begin(16,2);

  lcd.print("Heart Beat ");
  lcd.write(1);
  lcd.setCursor(0,1);
  lcd.print("Monitering");
  pinMode(in, INPUT);
  pinMode(Reset, INPUT);
  pinMode(start, INPUT);
  digitalWrite(Reset, HIGH);
  digitalWrite(start, HIGH);
  delay(1000);
}
void loop()
{
  if(!(digitalRead(start)))
  {
    k=0;
    lcd.clear();
    lcd.print("Please wait.......");
    while(k<5)
    {
     if(digitalRead(in))
     {
      if(k==0)
      time1=millis();
      k++;
      while(digitalRead(in));
     }
    }
      time2=millis();
      rate=time2-time1;
      rate=rate/5;
      rate=60000/rate;
      lcd.clear();
      lcd.print("Heart Beat Rate:");
      lcd.setCursor(0,1);
      lcd.print(rate);
      lcd.print(" ");
      lcd.write(1);    
      k=0;
      rate=0;
    }
  if(!digitalRead(Reset))
  {
    rate=0;
     lcd.clear();
      lcd.print("Heart Beat Rate:");
      lcd.setCursor(0,1);
      lcd.write(1);
      lcd.print(rate);
      k=0;
  }
}




Comments

Popular posts from this blog

How to "INTEGRATE GOOGLE SIGN_IN into YOUR ANDROID APP" STEP 1) Make sure in your SDK manager Google repository and google play services Tools -> ANDROID - > SDK manager -> Launch StandAlone SDK manager -> Extras STEP 2) GET CONFIGURATION FILE https://developers.google.com/mobile/add?platform=android&cntapi=signin&cnturl=https:%2F%2Fdevelopers.google.com%2Fidentity%2Fsign-in%2Fandroid%2Fsign-in%3Fconfigured%3Dtrue&cntlbl=Continue%20Adding%20Sign-In Enter Project name , Package and select your country  Now, Select Google sign in. COPY SHAI certificate code by typing, in CMD   "keytool -list -v -keystore C:\Users\YOURUSERPROFILENAME\.android\debug.keystore -alias androiddebugkey -storepass android -keypass android" (WITHOUT QUOTES) Follow next easy steps.! STEP 3)Download .json FILE And paste it to APP directory..!! STEP 4)Put this dependecies : PASTE in APP LEVEL "buid.gradle" file:"  apply pl

iQOO Z9s Pro: The Ultimate Mid-Range Powerhouse

[Source: https://www.iqoo.com/in/products/picture/Z9spro] Full Spec list: General Brand: iQOO Model: Z9s Pro Release Date: [Specify Month and Year] Form Factor: Touchscreen Dimensions: [To be confirmed] Weight: [To be confirmed] Colors: Black, Blue, Silver Operating System: Android [Version, likely Android 13 or 14] with iQOO UI Display Type: AMOLED Size: 6.7 inches Resolution: Full HD+ (2400 x 1080 pixels) Refresh Rate: 120Hz Aspect Ratio: 20:9 Protection: [To be confirmed, e.g., Corning Gorilla Glass] Performance Processor: Qualcomm Snapdragon 7 Series (likely Snapdragon 7+ Gen 2) GPU: Adreno [Version, e.g., 642L] RAM: 8GB / 12GB LPDDR5 Internal Storage: 128GB / 256GB UFS 3.1 Expandable Storage: No [If applicable] Camera Rear Camera: Primary: 64MP, f/1.8, PDAF Ultra-Wide: 8MP, f/2.2, 120˚ field of view Macro: 2MP, f/2.4 Features: LED flash, HDR, panorama, Night Mode, Portrait Mode Video Recording: 4K@30fps, 1080p@30/60fps, gyro-EIS Front Camera: 16MP, f/2.0 Featu
Application that Provides Voice Recognition                          Using Arduino BITVOICER: BitVoicer is a speech recognition application that enables simple devices, with low processing power, to become voice-operated. To do that, BitVoicer uses the PC processing power to analyze audio streams, identify the sentences present in these streams and send commands to a microcontroller connected to it. The main BitVoicer features are: It can process audio captured by the microcontroller or by the computer's audio adapter; You write the text and BitVoicer recognizes the speech; Supports the following languages: Catalan (Catalonia) Chinese (China, Honk Kong and Taiwan) Danish (Denmark) Dutch (Netherlands) English (Australia, Canada, India, United Kingdom and United States) Finnish (Finland) French (Canada and France) German (Germany) Italian (Italy) Japanese (Japan) Korean (Korea) Norwegian, BokmÃ¥l (Norway) Polish (Poland) Portuguese (Brazil and Portugal) Rus