The KY-039 Finger Detection Heartbeat Measuring Sensor Module utilizes a bright infrared (IR) LED and a phototransistor to detect the pulse of a finger, with a red LED flashing in sync with each heartbeat.
Here’s how it works:
1. Pulse Detection: The IR LED illuminates one side of the finger while the phototransistor on the opposite side detects the amount of IR light passing through the finger.
2. Blood Pulse Measurement: When blood pulses through the finger, it causes slight changes in the phototransistor’s resistance, which can be measured to detect the heartbeat.
3. High Resistance Resistor: A high resistance resistor (R1) is used because most of the light is absorbed by the finger, so the phototransistor needs to be very sensitive to detect the small changes in light intensity.
4. Stray Light Shielding: It is crucial to shield the phototransistor from stray light, especially from home lighting, which typically fluctuates at 50Hz or 60Hz and can add noise to the heartbeat signal.
5. Home Lighting Consideration: Proper shielding is essential because home lighting can introduce considerable noise, making it harder to detect the faint heartbeat signals accurately.
By using this module, you can measure the heartbeat accurately, provided the phototransistor is well shielded from ambient light interference.
Note : HW-487 on module working remains same.
Example Code:
// Pulse Monitor Test Script
int sensorPin = 0;
double alpha = 0.75;
int period = 100;
double change = 0.0;
double minval = 0.0;
void setup ()
{
Serial.begin (9600);
}
void loop ()
{
static double oldValue = 0;
static double oldChange = 0;int rawValue = analogRead (sensorPin);
double value = alpha * oldValue + (1 – alpha) * rawValue;Serial.print (rawValue);
Serial.print (“,”);
Serial.println (value);
oldValue = value;delay (period);
}
Package Includes:
1 x KY-039 Finger Detection Heartbeat Measuring Sensor Module
There are no reviews yet.