Pulse Sensor Working and Its Applications with Arduino Code

Pulse Sensor Working and Its Applications

Heart beat sensor is designed to give digital output of heat beat when a finger is placed on it. When the heart beat detector is working, the beat LED flashes in unison with each heart beat. This digital output can be connected to microcontroller directly to measure the Beats Per Minute (BPM) rate. It works on the principle of light modulation by blood flow through finger at each pulse.

PINPIN NAMEDESCRIPTION
1. GROUNDPower Supply Ground
2.VccPower Supply +5 Voltage
3.OUTPUTAnalog Outupt

HOW PULSE SENSOR WORKS?

The sensor consists of a super bright red LED and light detector. The LED needs to be super bright as the maximum light must pass spread in finger and detected by detector. Now, when the heart pumps a pulse of blood through the blood vessels, the finger becomes slightly more opaque and so less light reached the detector. With each heart pulse the detector signal varies. This variation is converted to electrical pulse. This signal is amplified and triggered through an amplifier which outputs +5V logic level signal. The output signal is also indicated by a LED which blinks on each heart beat.

SPECIFICATIONS:

PARAMETERVALUE
VCC+5v dc with good regulation
I Max100mA
Output Data Level5V TTL Level
Heart Beat DedectionOutput Led
Light Source660nm Super Red Led

FEATURES:

1. Biometric Pulse Rate or Heart Rate detecting sensor.
2. Plug and Play type sensor.
3. Operating Voltage: +5V or +3.3V.
4. Current Consumption: 4mA.
5. Inbuilt Amplification and Noise cancellation circuit.
6. Diameter: 0.625”
7. Thickness: 0.125” Thick.

ALL SENSOR DETAILS:
1. HC-05 – Bluetooth
2. Mpu 6050 accelerometer-gyroscope- -module
3. Flame-sensor
4. Rotary-encoder
5. Force-sensor-fsr400
6. Current-sensor-acs712
7. Flex-sensor
8. IR-sensor-tcrt5000
9. Pulse-sensor-pin
10. Color-sensor-tcs230
11. SD-card-module
12. Oled-with-arduino
13. Addressable-rgb-led-strip-ws1812
14. Relay-module
15. TFT-1-8-display-st7735r
16. 8×8-dot-matrix-display-max7219
17. Smoke-sensor-mq-2
18. Ultrasonic-sensor-HC-sr04
19. PIR-motion-sensor-hc-sr501
20. Tilt-sensor-sw-520d
21. Microphone-sound-sensor
22. Reed-switch-reed-sensor
23. Rfid-reader-Em18
24. Rfid-tag
25. RTC-real-time-clock-ds1307
26. Temperature-sensor-ds18b20
27. Moisture-sensor
28. Rain-sensor
29. Pressure-sensor
30. Accelerometer
31. MOC-3021-circuit
32. DHT11-DHT22-temperature-and-humidity-sensor
APPLICATIONS:
a. Digital Heart Rate monitor.
b. Patient Monitoring System.
c. Bio-Feedback control of robotics and applications.
d. Sleep Tracking.
e. Anxiety monitoring.
f. Remote patient monitoring/alarm system.
g. Health bands.
h. Advanced gaming consoles.
PULSE SENSOR WITH ARDUINO CIRCUIT DIAGRAM:
PULSE SENSOR WITH ARADUINO UNO SKETCH CODE:
Copy and paste the below give code or download below given link:
//Circuito.io is an automatic generator of schematics and code.
//Copyright (C) 2016 Roboplan Technologies Ltd.
// Include Libraries
#include “Arduino.h”
#include “pulse-sensor-arduino.h”
#include “LiquidCrystal.h”
// Pin Definitions
#define HEARTPULSE_PIN_SIG A3
#define LCD_PIN_RS 7
#define LCD_PIN_E 6
#define LCD_PIN_DB4 2
#define LCD_PIN_DB5 3
#define LCD_PIN_DB6 4
#define LCD_PIN_DB7 5
// Global variables and defines
// object initialization
PulseSensor heartpulse;
LiquidCrystal lcd(LCD_PIN_RS,LCD_PIN_E,LCD_PIN_DB4,LCD_PIN_DB5,LCD_PIN_DB6,LCD_PIN_DB7);
// define vars for testing menu
const int timeout = 10000; //define timeout of 10 sec
char menuOption = 0;
long time0;
// Setup the essentials for your circuit to work. It runs first every time your circuit is powered with electricity.
void setup()
{
// Setup Serial which is useful for debugging
// Use the Serial Monitor to view printed messages
Serial.begin(9600);
while (!Serial) ; // wait for serial port to connect. Needed for native USB
Serial.println(“start”);
heartpulse.begin(HEARTPULSE_PIN_SIG);
// set up the LCD’s number of columns and rows
lcd.begin(16, 2);
menuOption = menu();
}
// Main logic of your circuit. It defines the interaction between the components you selected. After setup, it runs over and over again, in an eternal loop.
void loop()
{
if(menuOption == ‘1’)
{
// Heart Rate Pulse Sensor – Test Code
//Measure Heart Rate
int heartpulseBPM = heartpulse.BPM;
Serial.println(heartpulseBPM);
if (heartpulse.QS == true) {
Serial.println(“PULSE”);
heartpulse.QS = false;
}
}
else if(menuOption == ‘2’) {
// LCD 16×2 – Test Code
// Print a message to the LCD.
lcd.setCursor(0, 0);
lcd.print(“Circuito Rocks !”);
// Turn off the display:
lcd.noDisplay();
delay(500);
// Turn on the display:
lcd.display();
delay(500);
}
if (millis() – time0 > timeout)
{
menuOption = menu();
}
}
// Menu function for selecting the components to be tested
// Follow serial monitor for instrcutions
char menu()
{
Serial.println(F(“\nWhich component would you like to test?”));
Serial.println(F(“(1) Heart Rate Pulse Sensor”));
Serial.println(F(“(2) LCD 16×2”));
Serial.println(F(“(menu) send anything else or press on board reset button\n”));
while (!Serial.available());
// Read data from serial monitor if received
while (Serial.available())
{
char c = Serial.read();
if (isAlphaNumeric(c))
{
if(c == ‘1’)
Serial.println(F(“Now Testing Heart Rate Pulse Sensor”));
else if(c == ‘2’)
Serial.println(F(“Now Testing LCD 16×2”));
else
{
Serial.println(F(“illegal input!”));
return 0;
}
time0 = millis();
return c;
}
}
}
Download pulse sensor Arduino code here.pulse sensor with lcd

Subramanian
Subramanian

Subramanian MK, currently serving as a workshop instructor at Sakthi Polytechnic College, Erode Tamil Nadu. With a career spanning 25 + years, Subramanian MK has dedicated himself to advancing knowledge in Electronics and Communication Engineering (ECE). His passion for exploring new technologies has led to the development of numerous projects, showcasing expertise in IoT and PCB design.

Articles: 514

One comment

  1. Hello,I tried to calculate the bpm using Heart-rate sensor values the output was occured in serial monitoring and graphical output also occured I tried to convert the bpm values stored in array bpm samples but I don’t know how to take average bpm value if anybody know right solution ???

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.

×

Hi, How can I help you?

×