Robot Pi Shop

KY-039 Heartbeat Sensor Module

$1.25

Shipping calculated at checkout.

Quantity

KY-039 Heartbeat Sensor Module – Infrared Finger Pulse Sensor for Arduino & ESP32

The KY-039 Heartbeat Sensor Module is a compact optical pulse detection sensor designed to monitor heartbeat-related changes in blood flow through a fingertip.

Using an infrared LED and phototransistor, the module detects small variations in transmitted infrared light caused by changes in blood volume during each heartbeat. This principle is known as photoplethysmography (PPG).

The KY-039 provides an analog signal that can be processed by a microcontroller to estimate heart rate in beats per minute (BPM).

It is ideal for Arduino, ESP32, Raspberry Pi projects with an external ADC, biomedical electronics education, wearable technology prototypes, and DIY heart rate monitoring experiments.

Key Features

  • Model: KY-039
  • Sensor Type: Optical Heartbeat / Finger Pulse Sensor
  • Detection Technology: Photoplethysmography (PPG)
  • Sensing Components: Infrared LED and Phototransistor
  • Measurement Method: Optical Detection of Blood Volume Changes
  • Output Type: Analog
  • Operating Voltage: Typically 3.3V–5V DC, Module Dependent
  • Heart Rate Estimation: BPM Through Software Processing
  • Non-Invasive Finger Pulse Detection
  • 3-Pin Interface: Signal (S), VCC (+), GND (-)
  • Compact PCB Design
  • Suitable for Arduino and ESP32 Projects

Technical Specifications

Parameter Specification
Model KY-039
Product Type Heartbeat Sensor Module
Sensor Technology Optical Photoplethysmography
Detection Method Infrared Light Transmission
Optical Components IR LED and Phototransistor
Operating Voltage Typically 3.3V–5V DC, Variant Dependent
Output Type Analog
Output Signal Voltage Variation Related to Blood Flow
Interface Analog ADC
Number of Pins 3
Typical Pin Configuration S / + / -
Heart Rate Output Calculated in Software
Measurement Unit Beats Per Minute (BPM), After Processing
Digital Output No
Onboard BPM Calculation No
Communication Protocol None
Typical Board Dimensions Approximately 18.5 × 15mm
Medical Certification Not Specified

Pin Configuration

Pin Function
S Analog Pulse Signal Output
+ Positive Power Supply
- Ground

Note: Pin positions may vary between manufacturers. Always verify the markings on the supplied PCB before connecting the sensor.

How It Works

The KY-039 uses an infrared LED and phototransistor to detect changes in light transmission through a fingertip.

  1. The infrared LED emits light through the finger.
  2. Blood and surrounding tissue absorb and scatter part of the infrared light.
  3. The amount of light reaching the phototransistor changes slightly as blood volume varies with each heartbeat.
  4. The phototransistor converts these light changes into an electrical signal.
  5. A microcontroller samples the analog signal and processes the variations to identify pulse peaks.
  6. The time interval between detected pulse peaks can be used to estimate heart rate.

Heart Rate Calculation

The estimated heart rate is calculated using:

BPM = 60,000 / Time Between Heartbeats (ms)

For example:

Time Between Pulses Estimated Heart Rate
1,000ms 60 BPM
857ms Approximately 70 BPM
750ms 80 BPM
667ms Approximately 90 BPM
600ms 100 BPM

These values assume that the detected peaks correspond to actual heartbeats.

Arduino Connection Example

KY-039 Arduino Uno
S A0
+ 5V, if supported by the module
- GND

Place a fingertip across the optical sensing components and keep the finger steady during measurement.

Arduino Example Code – Read Analog Pulse Signal

const int pulsePin = A0;

void setup() {
  Serial.begin(115200);
}

void loop() {
  int pulseValue = analogRead(pulsePin);

  Serial.println(pulseValue);

  delay(10);
}

How to Test

  1. Connect the KY-039 to the Arduino.
  2. Upload the example code.
  3. Open the Arduino Serial Plotter at 115200 baud.
  4. Place a finger over the optical sensing area.
  5. Keep the finger steady and minimize surrounding light.
  6. Observe the changes in the analog signal.

With suitable placement and signal processing, small periodic variations associated with the pulse may become visible.

Important: This example displays raw ADC readings only. It does not calculate BPM. Reliable heart rate estimation requires filtering, peak detection, and rejection of motion-related noise.

Applications

  • Arduino Heartbeat Monitoring Experiments
  • ESP32 Biomedical Electronics Projects
  • Finger Pulse Detection
  • Educational PPG Experiments
  • DIY Heart Rate Monitoring Prototypes
  • Wearable Electronics Research
  • Human–Machine Interface Experiments
  • Sensor Signal Processing Education
  • STEM and University Projects
  • Data Logging and Visualization
  • Electronics Prototyping

Important Notes

  • The KY-039 is an experimental optical pulse sensor, not a medical-grade heart rate monitor.
  • It does not directly output BPM. Heart rate must be calculated using software.
  • The module provides an analog signal and requires an ADC.
  • Signal quality depends on finger placement, movement, ambient lighting, circulation, and electrical noise.
  • The sensor output may require amplification, filtering, and signal processing.
  • The module does not measure blood pressure.
  • The module does not provide calibrated blood oxygen saturation (SpO₂) measurements.
  • It cannot diagnose cardiac conditions or detect medical emergencies reliably.
  • For ESP32, ensure the sensor output remains within the 3.3V ADC input limits.
  • Raspberry Pi boards require an external ADC, such as the MCP3008 or ADS1115, to read the analog signal.
  • The KY-039 is intended for educational and experimental use only.
  • Do not use this module for medical diagnosis, patient monitoring, or safety-critical applications.

Package Includes

1 × KY-039 Heartbeat Sensor Module