The KY-039 Heartbeat Sensor Module by JOY IT is a compact and versatile sensor designed to detect the pulse rate of an individual. It operates by sensing the change in blood volume in a fingertip or earlobe through a photoplethysmograph approach. The module is commonly used in health monitoring devices, fitness trackers, and interactive projects that require pulse detection.
Pin | Description |
---|---|
S |
Signal output (analog) |
+ |
Power supply (3.3V to 5V DC) |
- |
Ground |
+
pin to the 3.3V or 5V output on your microcontroller (e.g., Arduino UNO).-
pin to the ground (GND) on your microcontroller.S
pin to an analog input on your microcontroller.// KY-039 Heartbeat Sensor Example Code
const int heartbeatPin = A0; // Analog pin connected to the heartbeat sensor
int sensorValue = 0; // Variable to store the sensor value
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
}
void loop() {
sensorValue = analogRead(heartbeatPin); // Read the sensor value
Serial.println(sensorValue); // Print the sensor value to the serial monitor
delay(100); // Wait for 100 milliseconds before the next read
}
Q: Can the KY-039 sensor be used on any part of the body? A: The sensor is optimized for use on the fingertip or earlobe where the pulse is more easily detected.
Q: How accurate is the KY-039 sensor? A: The accuracy can vary based on several factors, including sensor placement and environmental conditions. It is suitable for educational and hobbyist projects but not for medical diagnosis.
Q: Can the sensor work with a 3.3V system? A: Yes, the KY-039 can operate with a 3.3V power supply, making it compatible with both 5V and 3.3V microcontrollers.
Q: Is calibration required for the sensor? A: No specific calibration is required, but you may need to adjust the threshold in your code based on the analog signal range you observe during testing.
This documentation provides a comprehensive guide to using the KY-039 Heartbeat Sensor Module with an Arduino UNO or similar microcontroller. For further assistance, consult the manufacturer's datasheet or contact technical support.