ESP32 KY-039 Heartbeat Sensor Module

KY-039 Heartbeat Sensor Module image

KY-039

Protocol: Analog

Overview

The KY-039 is a heartbeat sensor module that uses an infrared LED and a phototransistor to detect pulse signals. It provides an analog output corresponding to the heartbeat, making it suitable for health monitoring and related applications.

About KY-039 Heartbeat Sensor Module

The KY-039 Heartbeat Sensor Module is designed to detect heartbeats by measuring the variations in blood flow through a finger. It utilizes an infrared (IR) LED and a phototransistor to sense these changes. When a finger is placed between the IR LED and the phototransistor, the module outputs an analog voltage corresponding to the detected heartbeat. This sensor is commonly used in health monitoring projects, fitness applications, and biofeedback systems.

Where to Buy

KY-039 Heartbeat Sensor Module

Starting from

$2 per unit

Amazon com
Amazon.com Ships worldwide
View Price
Amazon de
Amazon.de Ships to EU
View Price
Aliexpress
AliExpress Best value
View Price

Prices are subject to change. We earn from qualifying purchases as an Amazon Associate.

Technical Specifications

Operating Voltage 3.3V to 5V
Operating Temperature Range -40°C to 85°C
Dimensions 19mm x 15mm

Pinout Configuration

The VCC pin is used to supply power to the sensor, and it typically requires 3.3V or 5V (refer to the datasheet for specific voltage requirements). The GND pin is the ground connection and must be connected to the ground of your ESP32.

  • VCC: Connects to the power supply, typically 3.3V or 5V.
  • GND: Connects to the ground of the circuit.
  • S (Signal): Outputs an analog voltage corresponding to the heartbeat signal.

Wiring with ESP32

  • VCC: Connect to ESP32 3.3V.
  • GND: Connect to ESP32 GND.
  • S (Signal): Connect to an ESP32 ADC pin (e.g., GPIO34).

Troubleshooting Guide

Common Issues

❌ No Signal Detected

⚠️ Unstable or Noisy Readings

Debugging Tips

🔍 Serial Monitor

⚡ Voltage Checks

Code Examples

Arduino Example

C++
🔧

ESP-IDF Example

C++
🏠

ESPHome Example

YAML
🛠️

PlatformIO Example

C++
🐍

MicroPython Example

Python

Conclusion

The ESP32 KY-039 Heartbeat Sensor Module is a powerful KY-0xx module sensor that offers excellent performance and reliability. With support for multiple development platforms including Arduino, ESP-IDF, ESPHome, PlatformIO, and MicroPython, it's a versatile choice for your IoT projects.

For optimal performance, ensure proper wiring and follow the recommended configuration for your chosen development platform.

Always verify power supply requirements and pin connections before powering up your project to avoid potential damage.