Heart beat sensor with Arduino heart pulse measurement

1Heart Beat Sensor is used blood pressure and body are very important parameters to known for human body. We go to doctors that use different kinds of apparatuses to know the heartbeat of a human. In this tutorial, we are going to make our own heart beat sensor that will tell us the heart rate. We will make a based heart beat sensor that will tell us the number of pulses in a minute when we will place a finger on it.

Heartbeat Sensor is an electronic device that is used to measure the heart rate i.e. speed of the heartbeat. Monitoring body temperature, heart rate and blood pressure are the basic things that we do in order to keep us healthy. In order to measure the body temperature, we use thermometers and a sphygmomanometer to monitor the Arterial Pressure or Blood Pressure. Heart Rate can be monitored in two ways: one way is to manually check the pulse either at wrists or neck and the other way is to use a Heartbeat Sensor. In this project, we have designed a Heart Rate Monitor System using Arduino and Heartbeat Sensor. You can find the Principle of Heartbeat Sensor, working of the Heartbeat Sensor and Arduino based Heart Rate Monitoring System using a practical heartbeat Sensor.

Introduction to Heartbeat Sensor

Monitoring heart rate is very important for athletes, patients as it determines the condition of the heart (just heart rate). There are many ways to measure heart rate and the most precise one is using an Electrocardiography

But the more easy way to monitor the heart rate is to use a Heartbeat Sensor. It comes in different shapes and sizes and allows an instant way to measure the heartbeat.

Heartbeat Sensors are available in Wrist Watches (Smart Watches), Smart Phones, chest straps, etc. The heartbeat is measured in beats per minute or bpm, which indicates the number of times the heart is contracting or expanding in a minute.

Principle of Heartbeat Sensor

The principle behind the working of the Heartbeat Sensor is Photoplethysmograph. According to this principle, the changes in the volume of blood in an organ is measured by the changes in the intensity of the light passing through that organ.

Usually, the source of light in a heartbeat sensor would be an IR LED and the detector would be any Photo Detector like a Photo Diode, an LDR (Light Dependent Resistor) or a Photo Transistor.

With these two i.e. a light source and a detector, we can arrange them in two ways: A Trans missive Sensor and a Reflective Sensor.

In a Trans missive Sensor, the light source and the detector are place facing each other and the finger of the person must be placed in between the transmitter and receiver.

Reflective Sensor, on the other hand, has the light source and the detector adjacent to each other and the finger of the person must be placed in front of the sensor.

Working of Heartbeat Sensor

23The heart beat sensor circuit diagram comprises a light detector and a bright red LED. The LED needs to be of super bright intensity because maximum light passes and spreads if a finger placed on the LED is detected by the detector.

Now, when the heart pumps blood through the blood vessels, the finger becomes slightly more opaque; due to this, less amount of light reaches from the LED to the detector. With every heart pulse generated, the detector signal gets varied. The varied detector signal is converted into an electrical pulse. This electrical signal gets amplified and triggered through an amplifier which gives an output of +5V logic level signal. The output signal is also directed by a LED display which blinks on each heartbeat rate.

Let us understand about its primary application by considering a project as a practical example with the help of a heartbeat sensor.

Wireless Health Monitoring System for Patients

The main purpose of this automatic health system is to monitor the body temperature, heart rate and pulse rate of a patient and display the same to the doctor by using RF technology.

In hospitals, patients’ body temperatures and heartbeat rates need to be monitored regularly, which is usually done by doctors or other paramedical staff. They observe the body temperature and heartbeat rates (whether 72 times per minute). The doctors and other hospital management staff keep a record of the body temperature and heartbeats of every patient.

This health monitoring system project includes various components such as an 8051 microcontroller, a 5V regulated power supply unit, a temperature sensor, a heartbeat sensor, an RF transmitter, a receiver module and a LCD display. The microcontroller is used as the brain of the entire project for monitoring the heartbeat, pulse rate, and body temperature of patients. The working of this monitoring system project is illustrated with the help of a block diagram, which includes various blocks such as a power-supply block that supplies power to the whole circuit, a temperature sensor that calculates patients’ body temperature, and a heartbeat sensor for monitoring heartbeats of the patients.

4In the transmitter section, the temperature sensor is used to read the body temperature of the patients continuously and the heart beat sensor for monitoring the heartbeats’ rate of the patients, and then the data is sent to the 8051 microcontroller. The data gets transmitted first, and then encoded into serial data through the air by a Radio Frequency module. The body temperature of the patients and heartbeat pulses per minute are displayed on the LCD display. With the help of an RF antenna placed at the transmitter end, the data is transmitted to the receiver section.

5In the receiver section, a receiver is placed at the other end to receive the data and the received data is decoded by using a decoder, and the transmitted data (body temperature, heartbeat pulses) is compared with the data stored in the microcontroller, and then the resultant data gets displayed on the LCD screen. The receiver RF module placed at the doctor’s partition continuously reads the Patient health conditions such as body temperature, heart rate and pulse rate, and displays the result on the LCD, wirelessly.

Digital Heartbeat Monitor Circuit Diagram

6The AT89S52 microcontroller is the most popular microcontroller selected from a family of 8051 microcontroller. An 8-bit microcontroller is used for controlling all the operations of the circuit. It also controls the heartbeat pulses generated from the heartbeat sensor.

This project makes use of a heartbeat sensor used for controlling the heartbeat pulses of the heart patients. Moreover, LCDs are used for display. An AT89S52 Microcontroller is used for continuously monitoring the heartbeat rate and pulse rate of the patient which are done by taking into consideration the embedded C programming done in microcontroller by using KEIL software. The entire circuit gets power from the different blocks like voltage regulator and step- down transformer, used in the power supply circuit. The voltage regulator produces a constant output voltage of 5 Volts.

Components Used:

AT89S52 Microcontroller: The device used in this project is ‘AT89S52’, which is a typical 8051 microcontroller produced by Atmel corporation. This Microcontroller is the most important fragment of this project as it controls all the operations of the circuit such as reading heartbeat rate pulses data from the heartbeat sensor.

Power Supply: This power supply block consists of a step-down transformer, a bridge rectifier, a capacitor and a voltage regulator. Single-phase Active Current power supply from the mains is step down to a lower voltage range which is again rectified to Direct Current by using a bridge rectifier. This rectified Direct Current is filtered and regulated to the whole circuit operating range with a capacitor and voltage regulator IC, respectively.

LCD: Most of the projects make use of LCD displays for displaying information like heartbeat rate, body temperature, etc. There are various displays used in projects such as seven-segment displays and LED displays. Selection of display depends on considering these parameters: cost of displays, power consumption and ambient lighting conditions.

Resistors: Resistance is well-defined as the ratio of voltage applied across its terminals and current passing through it. The resistor value depends on a fixed voltage that limits the current passing through it. Resistor is a passive component used for controlling the current in an electronic circuit.

Capacitors: The main purpose of a capacitor is to store charge. The product of the capacitance value and the voltage applied across a capacitor is equal to the charge stored in the capacitor.

Crystal Oscillator: A Crystal oscillator circuit is a type of electronic circuit that makes use of the mechanical resonance of a vibrating circuit used for generating electrical signals by varying the frequency. An AT89S52 microcontroller controls the crystals for synchronizing its operation. The type of synchronization made in this circuit is known as machine cycle.

Circuit Operation

  • In this system, a crystal oscillator circuit is connected between the pins 18 and 19 of the AT89S52 microcontroller used for operating the instructions sets at a various clock frequency range. A machine cycle is used to measure the minimum time for executing the single instruction set.
  • Reset circuit is connected to the pin 9 of the AT89S52 microcontroller with the help of a capacitor and resistor. The resistor’s other end is connected to the Ground (20pin) and the capacitor’s other end is connected to the (EA/Vpp) 31 pin. The resistor and capacitor are connected in such a way that they perform a reset mode of operation manually. If the switch gets closed, then the reset pin is set high.
  • Heart beat sensor connected to the port1.0 pin of the microcontroller is used for monitoring the pulses of the heart, and these pulse signals are sent to the microcontroller and compared with the programmed data stored in the microcontroller by using Keil software. Whenever the input’s heart rate pulses are received, the counter in the microcontroller counts these pulses for certain time period.
  • LCD Displays are connected to the port 2 pins of the AT89S52 microcontroller. The time duration of one heartbeat’s pulse will be one sec, and by dividing 60,000 by 1000 we will have the appropriate result as 60, which will then be displayed on LCD.

This is all about the heartbeat sensor and its working with relevant applications and practical examples in detail. Furthermore, for any queries regarding this topic or on the electrical and electronic projects us by commenting in the comment section given below.

Circuit Description: The heartbeat sensor circuit diagram is based on an AT89S52 microcontroller and other components such as heartbeat sensor, power supply, crystal oscillator circuit, resistors, capacitors and LCD display.

Features of Heartbeat Sensor

  • Indicates heartbeat by a LED
  • Provides a direct output digital signal for connecting to a microcontroller
  • Possesses compact Size
  • Works with a working Voltage of +5V DC

Primary Applications of Heartbeat Sensor

  • Works as a Digital Heart Rate monitor
  • Works as a Patient Health Monitoring System
  • Used as a Bio-Feedback control of robotic applications

    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.

      Heart beat sensor with arduino code

7#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);

}

Share this post