Finger Detecting Heartbeat Module KY-039

Dimensions 3.2 × 2.4 × 1.2 cm
Drive Voltage

3 – 5VCharacteristics: IR EmitterIR Receiver

Mounting holes

M2 10mm

Operating Temperature

-40°C to 85°C

Pin pitch

2.54

Device Pinout & Schematics

This module has three pins: GND, Vcc+, and Signal.  The pinout is as follows:

KY-039 heartbeat sensor pinout

The KY-039 heartbeat sensor schematic is as follows:

KY-039 hearbeat sensor schematic

 Our Projects that Use this Sensor

We do not currently have any Geek Pub projects that use the heartbeat sensor. We will be creating one soon though so check back!

 Code Examples

You’ll find below code examples of using the KY-039 heartbeat sensor with both Arduino and Raspberry Pi (Python).

KY-039 Heartbeat Sensor Code Example for Arduino

The following code example is for the Arduino. This code will read the Analog Output Sensor value and write it to the serial console, pause 500ms and repeat.

Arduino Wiring:

  • KY-039 Sensor GND to Arduino GND
  • KY-039 Sensor Signal to Arduino PIN A0
  • KY-039 Sensor Vcc+ to Arduino +5V

The KY-039 heartbeat sensor is designed to detect a pulse while a human finger is place between the infrared diode and the photo transistor.  The pulse will be represented on the signal output pin.

This sensor works by using a photo transistor to detect the presence of light, in this case how much light is passing through a finger.  When blood moves, the amount of light changes and that change can be detected as a pulse.