Sensors - Tranducers Circuits

Heartbeat Sensor using Arduino (Heart Rate Monitor)

A heartbeat sensor is an electronic device designed to gauge the heart rate, which represents the rate at which the heart beats. Maintaining good health often involves monitoring critical physiological indicators, including body temperature, heart rate, and blood pressure.

When it comes to tracking Arterial Pressure or Blood Pressure, thermometers and sphygmomanometers are typically employed to measure body temperature.

Heart rate assessment can be accomplished through two primary methods: manually assessing the pulse at points like the wrists or neck, or utilizing a Heartbeat Sensor.

Within the context of this project, we’ve developed a Heart Rate Monitoring System using an Arduino and a Heartbeat Sensor. This system encompasses an exploration of the Heartbeat Sensor’s principles, its operational mechanisms, and the practical application of an Arduino-based Heart Rate Monitoring System that employs the Heartbeat Sensor.

Outline

  • Output Video
  • Introduction to Heartbeat Sensor
    • Principle of Heartbeat Sensor
    • Working of Heartbeat Sensor
  • Circuit of Arduino based Heart Rate Monitor using Heartbeat Sensor
  • Components Required
  • Circuit Design of Interfacing Heartbeat Sensor with Arduino
  • Working of the Circuit
  • CODE
  • Applications of Heart Rate Monitor using Arduino

Output Video

Introduction to Heartbeat Sensor

Heart rate monitoring plays a pivotal role in the well-being assessment of athletes and patients, as it provides insights into the heart’s health based solely on its rate of beating. There are multiple methods to measure heart rate, with the electrocardiogram being the most precise option available.

Alternatively, Heartbeat Sensors offer a more convenient means to monitor heart rate. These sensors come in various forms and sizes and enable real-time tracking of heartbeats.

Heartbeat sensors can be found in wristwatches (Smart Watches), smartphones, chest straps, and a range of other devices. They quantify the heartbeat in beats per minute (bpm), representing the number of heart contractions or expansions that occur within a minute.

Heartbeat Sensor

Principle of Heartbeat Sensor

The Heartbeat Sensor operates on the principle of Photoplethysmography, which involves measuring changes in the volume of blood within an organ by analyzing variations in light intensity passing through that organ.

In most heartbeat sensors, an infrared LED serves as the light source, while the detector takes the form of a Photo Detector, which can be a Photo Diode, Light Dependent Resistor (LDR), or Photo Transistor.

These two essential components, the light source and detector, can be configured in two distinct manners: Transmissive Sensor and Reflective Sensor.

In the Transmissive Sensor setup, the light source and the detector are positioned facing each other, with the person’s finger placed between the transmitter and receiver.

Conversely, the Reflective Sensor configuration features the light source and the detector located adjacent to each other, and the person’s finger is placed in front of the sensor.

Working of Heartbeat Sensor

A fundamental Heartbeat Sensor comprises two main components: a sensor element and a control circuit. The sensor element, responsible for detecting heartbeats, consists of an IR LED and a Photo Diode housed within a clip.

The control circuit, on the other hand, incorporates an Op-Amp IC along with several other components. This control circuit is responsible for processing the signal from the sensor and forwarding it to a Microcontroller. To gain a deeper insight into the functioning of the Heartbeat Sensor, it’s beneficial to examine its circuit diagram.

The circuit depicted above showcases a finger-type heartbeat sensor that operates by detecting pulses. Each heartbeat causes fluctuations in the volume of blood within the finger, leading to variations in the intensity of light passing through the finger and subsequently detected by the Photo Diode.

The output from the Photo Diode is directed into the first Op-Amp’s input through a capacitor, which effectively filters out the DC components of the signal. The initial Op-Amp functions as a non-inverting amplifier with an amplification factor of 1001.

The output from the first Op-Amp serves as one of the inputs to the second Op-Amp, which serves as a comparator. The output of this second Op-Amp triggers a transistor, through which the signal is transmitted to a Microcontroller, such as an Arduino.

In this circuit, the LM358 Op-Amp is employed, featuring two Op-Amps within the same chip. Additionally, the transistor utilized is a BC547. An LED, connected to the transistor, exhibits a blinking pattern whenever a pulse is detected.

Circuit of Arduino based Heart Rate Monitor using Heartbeat Sensor

The following image shows the circuit diagram of the Arduino based Heart Rate Monitor using Heartbeat Sensor. The sensor has a clip to insert the finger and has three pins coming out of it for connecting VCC, GND and the Data. 

Components Required

  • Arduino UNO x 1 [Buy Here]
  • 16 x 2 LCD Display x 1 [Buy Here]
  • 10KΩ Potentiometer 
  • 330Ω Resistor (Optional – for LCD backlight) 
  • Push Button 
  • Heartbeat Sensor Module with Probe (finger based) 
  • Mini Breadboard 
  • Connecting Wires 

Circuit Design of Interfacing Heartbeat Sensor with Arduino

The Arduino-based Heart Rate Monitor System employing a Heart Beat Sensor employs a straightforward circuit design. To begin, we establish a connection between a 16×2 LCD Display and the Arduino UNO to present the heart rate measurements in bpm.

The LCD Module’s four data lines, denoted as D4, D5, D6, and D7, are connected to the Arduino UNO’s Pins 1, 1, 1, and 1, respectively. Additionally, a 10K potentiometer is linked to LCD Pin 3, responsible for contrast adjustment. The LCD’s RS and E (Pins 3 and 5) are connected to the Arduino UNO’s Pins 1 and 1, respectively.

Subsequently, we establish a connection between the output of the Heartbeat Sensor Module and the Arduino’s Analog Input Pin (Pin 1).

Working of the Circuit

Proceed by uploading the code to the Arduino UNO and powering on the system. The Arduino will prompt you to position your finger within the sensor clip and then press the switch.

Place any finger, excluding the thumb, into the sensor clip and depress the switch (button). Utilizing the data from the sensor, the Arduino calculates the heart rate and subsequently presents the heartbeat measurement in bpm.

During the data collection process by the sensor, it’s important to remain seated and relaxed, avoiding any unnecessary movements that could potentially introduce inaccuracies in the readings.

Upon the LCD displaying the results, should you wish to conduct another test, simply press the reset button on the Arduino and proceed with the procedure once more.

CODE

  #include <LiquidCrystal.h>
  LiquidCrystal lcd(6, 5, 3, 2, 1, 0);
  int data=A0;
  int start=7;
  int count=0;
  unsigned long temp=0;
   
  byte customChar1[8] = {0b00000,0b00000,0b00011,0b00111,0b01111,0b01111,0b01111,0b01111};
  byte customChar2[8] = {0b00000,0b11000,0b11100,0b11110,0b11111,0b11111,0b11111,0b11111};
  byte customChar3[8] = {0b00000,0b00011,0b00111,0b01111,0b11111,0b11111,0b11111,0b11111};
  byte customChar4[8] = {0b00000,0b10000,0b11000,0b11100,0b11110,0b11110,0b11110,0b11110};
  byte customChar5[8] = {0b00111,0b00011,0b00001,0b00000,0b00000,0b00000,0b00000,0b00000};
  byte customChar6[8] = {0b11111,0b11111,0b11111,0b11111,0b01111,0b00111,0b00011,0b00001};
  byte customChar7[8] = {0b11111,0b11111,0b11111,0b11111,0b11110,0b11100,0b11000,0b10000};
  byte customChar8[8] = {0b11100,0b11000,0b10000,0b00000,0b00000,0b00000,0b00000,0b00000};
  void setup()
  {
  lcd.begin(16, 2);
  lcd.createChar(1, customChar1);
  lcd.createChar(2, customChar2);
  lcd.createChar(3, customChar3);
  lcd.createChar(4, customChar4);
  lcd.createChar(5, customChar5);
  lcd.createChar(6, customChar6);
  lcd.createChar(7, customChar7);
  lcd.createChar(8, customChar8);
   
  pinMode(data,INPUT);
  pinMode(start,INPUT_PULLUP);
  }
   
  void loop()
  {
  lcd.setCursor(0, 0);
  lcd.print(“Place The Finger”);
  lcd.setCursor(0, 1);
  lcd.print(“And Press Start”);
   
  while(digitalRead(start)>0);
   
  lcd.clear();
  temp=millis();
   
  while(millis()<(temp+10000))
  {
  if(analogRead(data)<100)
  {
  count=count+1;
   
  lcd.setCursor(6, 0);
  lcd.write(byte(1));
  lcd.setCursor(7, 0);
  lcd.write(byte(2));
  lcd.setCursor(8, 0);
  lcd.write(byte(3));
  lcd.setCursor(9, 0);
  lcd.write(byte(4));
   
  lcd.setCursor(6, 1);
  lcd.write(byte(5));
  lcd.setCursor(7, 1);
  lcd.write(byte(6));
  lcd.setCursor(8, 1);
  lcd.write(byte(7));
  lcd.setCursor(9, 1);
  lcd.write(byte(8));
   
  while(analogRead(data)<100);
   
  lcd.clear();
  }
  }
   
  lcd.clear();
  lcd.setCursor(0, 0);
  count=count*6;
  lcd.setCursor(2, 0);
  lcd.write(byte(1));
  lcd.setCursor(3, 0);
  lcd.write(byte(2));
  lcd.setCursor(4, 0);
  lcd.write(byte(3));
  lcd.setCursor(5, 0);
  lcd.write(byte(4));
   
  lcd.setCursor(2, 1);
  lcd.write(byte(5));
  lcd.setCursor(3, 1);
  lcd.write(byte(6));
  lcd.setCursor(4, 1);
  lcd.write(byte(7));
  lcd.setCursor(5, 1);
  lcd.write(byte(8));
  lcd.setCursor(7, 1);
  lcd.print(count);
  lcd.print(” BPM”);
  temp=0;
  while(1);
  }

Applications of Heart Rate Monitor using Arduino

  • A simple project involving Arduino UNO, 16×2 LCD and Heartbeat Sensor Module is designed here which can calculate the heart rate of a person.
  • This project can be used as an inexpensive alternative to Smart Watches and other expensive Heart Rate Monitors.
Tags

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button
Close
Close