Ky-039 is a Low cost Heart beat Sensing Module. This Heart beat detection module uses bright infrared (ir) led and a photo-transistor to detect the pulse of the finger, a red led flashes with each pulse. Pulse monitor works as follows: the led is Turned ON on one side of the finger, and photo-transistor is on the other side of the finger. The photo-transistor used to obtain the flux emitted, when the blood flows through the finger then the resistance of the photo-transistor will be vary slightly.
The most important is to keep the shield stray light into the photo-transistor. 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.
Connecting Heart Beat Module to Arduino
Sensor pin S connect to Arduino pin Analog 0 / A0
Sensor pin + (middle pin) connect to Arduino pin 5+
Sensor pin – connect to Arduino pin GND