Stufin
Home Quick Cart Profile

KY-039 Finger Heartbeat Detection Sensor

Buy Now on Stufin

Operating Voltage

3V - 5V

Current Consumption

10mA

Output Signal

Analog signal (0V - VCC)

Sampling Rate

Up to 100 Hz

Heart Rate Measurement Range

30 bpm - 180 bpm

Oxygen Saturation Measurement Range

70% - 100%

### Physical Characteristics

Module Size

24mm x 14mm x 5mm

Sensor Type

Optical sensor

Finger Placement

The sensor has a built-in finger clip for easy placement

Weight

Approximately 10 grams

### Performance

Accuracy

2 bpm for heart rate measurement, 2% for oxygen saturation measurement

Response Time

1 second

Noise Immunity

Low noise interference due to internal filtering

### Interface and Connectivity

Output

Analog signal output through a three-pin interface (VCC, GND, OUT)

Compatibility

Compatible with microcontrollers, such as Arduino and Raspberry Pi

### Operating Environment

Temperature Range

10C - 40C

Humidity

20% - 80% RH

Lighting

Operating in normal indoor lighting conditions

Applications

The KY-039 Finger Heartbeat Detection Sensor is suitable for various applications, including

Health monitoring systems

Wearable devices, such as smartwatches and fitness trackers

Medical equipment, such as pulse oximeters

Sports and fitness tracking

Research and development projects

Note

Please ensure proper calibration and testing of the KY-039 sensor in your specific application to achieve optimal results. Additionally, consult relevant medical professionals and adhere to applicable regulations when using this sensor for medical purposes.

Pin Configuration

  • KY-039 Finger Heartbeat Detection Sensor Pinout Explanation
  • The KY-039 Finger Heartbeat Detection Sensor is a popular IoT component used to detect the heartbeat of a finger. It has 3 pins, which are explained below:
  • ### Pinout Structure:
  • VCC (Power Supply Pin)
  • + Function: Power supply pin for the sensor module
  • + Connection: Connect to a power source (e.g., Arduino board's 5V pin or a battery)
  • + Voltage: Typically 5V, but can operate within the range of 3.3V to 6V
  • GND (Ground Pin)
  • + Function: Ground pin for the sensor module
  • + Connection: Connect to a ground pin (e.g., Arduino board's GND pin or a ground terminal)
  • OUT (Output Pin)
  • + Function: Output pin that sends a digital signal indicating the heartbeat detection
  • + Connection: Connect to a digital input pin on a microcontroller (e.g., Arduino board's digital pin)
  • ### Connection Structure:
  • To connect the KY-039 Finger Heartbeat Detection Sensor to an Arduino board, follow these steps:
  • 1. Connect the VCC pin to the Arduino board's 5V pin.
  • 2. Connect the GND pin to the Arduino board's GND pin.
  • 3. Connect the OUT pin to a digital input pin on the Arduino board (e.g., digital pin 2).
  • Example Connection Diagram:
  • ```
  • KY-039 Sensor Module | Arduino Board
  • ---------------------|---------------------
  • VCC (Power Supply) | 5V
  • GND (Ground) | GND
  • OUT (Output) | Digital Pin 2
  • ```
  • Note: Make sure to use a breadboard or a PCB to connect the sensor module to the Arduino board. Additionally, use jumper wires or other suitable connectors to ensure secure connections.
  • By following this pinout explanation and connection structure, you can integrate the KY-039 Finger Heartbeat Detection Sensor into your IoT project and start detecting heartbeats!

Code Examples

KY-039 Finger Heartbeat Detection Sensor Documentation
Overview
The KY-039 Finger Heartbeat Detection Sensor is a compact and easy-to-use sensor module designed to detect human heartbeats through subtle changes in light absorbance caused by blood flow. It is typically used in health-related IoT projects, such as fitness trackers, health monitors, and wearables.
Pinouts and Connections
The KY-039 sensor module has four pins:
VCC: Power supply pin (typically 5V)
 GND: Ground pin
 OUT: Analog output pin
 LED: LED indicator pin (optional)
Connecting the Sensor
To use the KY-039 sensor, connect the VCC pin to a power source (5V), the GND pin to a ground connection, and the OUT pin to an analog input pin on a microcontroller or development board.
Code Examples
### Example 1: Basic Heartbeat Detection using Arduino
In this example, we'll use an Arduino Uno board to read the analog output from the KY-039 sensor and display the heartbeat count on the serial monitor.
```c++
const int sensorPin = A0; // KY-039 OUT pin connected to Arduino A0
int heartbeatCount = 0;
int signal = 0;
void setup() {
  Serial.begin(9600);
}
void loop() {
  signal = analogRead(sensorPin);
  if (signal > 512) { // adjust threshold value as needed
    heartbeatCount++;
    Serial.print("Heartbeat detected! (");
    Serial.print(heartbeatCount);
    Serial.println(")");
  }
  delay(10);
}
```
### Example 2: Real-time Heart Rate Monitoring using Raspberry Pi and Python
In this example, we'll use a Raspberry Pi single-board computer to read the analog output from the KY-039 sensor and display the real-time heart rate on a GUI using Python and the Tkinter library.
```python
import tkinter as tk
import numpy as np
import time
# Set up GPIO and ADC
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN)  # KY-039 OUT pin connected to Raspberry Pi GPIO 17
# Create a Tkinter GUI window
root = tk.Tk()
root.title("Heart Rate Monitor")
# Function to read sensor data and update the GUI
def update_gui():
    signal = np.mean([GPIO.input(17) for _ in range(100)])  # read sensor data
    heart_rate = signal  60  # calculate heart rate (bpm)
    label.config(text=f"Heart Rate: {heart_rate:.2f} bpm")
    root.after(1000, update_gui)  # update GUI every 1 second
# Create a label to display the heart rate
label = tk.Label(root, font=("Helvetica", 24))
label.pack()
# Start the GUI event loop
update_gui()
root.mainloop()
```
These examples demonstrate the basic usage of the KY-039 Finger Heartbeat Detection Sensor in different contexts. You can modify and expand upon these examples to suit your specific IoT project requirements.