Tags: KY-039, Finger, Detector, Heartbeat, Detection, Sensor, Module, Arduino

Heartbeat Sensor Module KY-039 Finger Pulse Measuring Sensor

  • 8.00 AED
    • Ex Tax:8.00 AED
    • Product Code: hbsnsr
    • Availability: In Stock
    Finger Detector Heartbeat Detection Sensor Module For Arduino Use IR LED and an optical transistor to detect pulsation in fingersWorking voltage: 5V Use IR LED and an optical transistor to detect pulsation in fingersUsed for teaching experimentthose are 2 Tutorials of how to measure y..

    Finger Detector Heartbeat Detection Sensor Module For Arduino Use IR LED and an optical transistor to detect pulsation in fingers

    Working voltage: 5V Use IR LED and an optical transistor to detect pulsation in fingers

    Used for teaching experiment

    those are 2 Tutorials of how to measure your heartbeat with a simple and easy

     KY-039 HeartBeat sensor :




    The code :


    #include <Wire.h>  // Comes with Arduino IDE
    #include <LiquidCrystal_I2C.h>
    
    
    LiquidCrystal_I2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);  // Set the LCD I2C address
    double alpha=0.75;
     int period=20;
     double change=0.0;
    void setup(void)
    {
      pinMode(A0,INPUT);
     
       lcd.begin(16,2);
        lcd.backlight(); 
      lcd.clear();
      lcd.setCursor(0,0);
    }
    
    void loop(void)
    {
      static double oldValue=0;
     static double oldChange=0;
      int x=analogRead(A0);
      double value=alpha*oldValue+(1-alpha)*x;
     change=value-oldValue;
       lcd.setCursor(0,0);
        lcd.print("bpm: "); 
          lcd.setCursor(0,1);
          lcd.print("          ");
            lcd.setCursor(0,1); 
        lcd.print(x/10);
     oldValue=value;
     oldChange=change;
     delay(period*10);
       }

    This project uses bright infrared (IR) LED and a phototransistor to detect the pulse of the finger, a red LED flashes with each pulse. Pulse monitor works as follows: The LED is the light side of the finger, and phototransistor on the other side of the finger, phototransistor used to obtain the flux emitted, when the blood pressure pulse by the finger when the resistance of the photo transistor will be slightly changed. The project's schematic circuit as shown, We chose a very high resistance resistor R1, because most of the light through the finger is absorbed, it is desirable that the phototransistor is sensitive enough. Resistance can be selected by experiment to get the best results. The most important is to keep the shield stray light into the phototransistor. For home lighting that is particularly important because the lights at home mostly based 50HZ or 60HZ fluctuate, so faint heartbeat will add considerable noise.

    When running the program the measured values are printed. To get a real heartbeat from this could be challenging.

    Connecting to the Arduino

    • Sensor pin S connect to Arduino pin Analoog 0 / A0
    • Sensor pin + (middle pin) connect to Arduino pin 5+
    • Sensor pin - connect to Arduino pin GND


    Example Code

    // Pulse Monitor Test Script
    int sensorPin = 0;
    double alpha = 0.75;
    int period = 100;
    double change = 0.0;
    double minval = 0.0;
    void setup ()
    {
      Serial.begin (9600);
    }
    void loop ()
    {
        static double oldValue = 0;
        static double oldChange = 0;
     
        int rawValue = analogRead (sensorPin);
        double value = alpha * oldValue + (1 - alpha) * rawValue;
     
        Serial.print (rawValue);
        Serial.print (",");
        Serial.println (value);
        oldValue = value;
     
        delay (period);
    }

    There are no reviews for this product.

    Write a review

    Please login or register to review