

The Gravity: Analog Heart Rate Monitor Sensor (ECG), manufactured by DFRobot (Part ID: SEN0213), is a versatile sensor designed to measure the electrical activity of the heart. It provides real-time heart rate data through an analog output, making it ideal for applications in health monitoring, fitness tracking, and biofeedback systems. This sensor is easy to integrate into microcontroller-based projects, such as those using Arduino, due to its simple interface and compatibility with the Gravity series.








Below are the key technical details and pin configuration for the Gravity: Analog Heart Rate Monitor Sensor (ECG):
| Parameter | Value |
|---|---|
| Operating Voltage | 3.3V to 5.5V |
| Output Signal | Analog |
| Output Voltage Range | 0V to 3.3V |
| Operating Current | < 10mA |
| Measurement Range | 0 to 100 beats per minute (BPM) |
| Interface Type | Gravity 3-pin interface |
| Dimensions | 35mm x 22mm |
| Weight | 7g |
| Pin Name | Description |
|---|---|
| VCC | Power supply input (3.3V to 5.5V) |
| GND | Ground connection |
| SIG | Analog signal output representing heart activity |
Connect the Sensor:
Attach the Electrodes:
Read the Analog Signal:
Process the Signal:
Below is an example code snippet to read and process the sensor's output using an Arduino UNO:
// Include necessary libraries
const int sensorPin = A0; // Analog pin connected to SIG pin of the sensor
int sensorValue = 0; // Variable to store the analog reading
void setup() {
Serial.begin(9600); // Initialize serial communication at 9600 baud
pinMode(sensorPin, INPUT); // Set the sensor pin as input
}
void loop() {
// Read the analog value from the sensor
sensorValue = analogRead(sensorPin);
// Convert the analog value to voltage (assuming 5V reference)
float voltage = sensorValue * (5.0 / 1023.0);
// Print the raw sensor value and voltage to the Serial Monitor
Serial.print("Raw Value: ");
Serial.print(sensorValue);
Serial.print(" | Voltage: ");
Serial.println(voltage);
delay(100); // Delay for 100ms before the next reading
}
| Issue | Solution |
|---|---|
| No output signal | - Check all connections (VCC, GND, SIG). |
| - Ensure the sensor is powered (3.3V to 5.5V). | |
| - Verify that the electrodes are properly attached to the skin. | |
| High noise in the signal | - Ensure the subject is still and relaxed. |
| - Use shielded cables to reduce electromagnetic interference. | |
| - Check for a stable power supply. | |
| Incorrect or fluctuating BPM values | - Verify electrode placement and skin contact. |
| - Use signal filtering techniques in your code to smooth the data. |
Can this sensor be used with a 3.3V microcontroller?
How do I calculate BPM from the analog signal?
Can this sensor be used for medical-grade applications?
What is the recommended placement for the electrodes?
By following this documentation, you can effectively integrate the Gravity: Analog Heart Rate Monitor Sensor (ECG) into your projects and troubleshoot common issues.