The AD8232 Gravity Sensor by DFRobot is a specialized bio-potential signal acquisition device tailored for electrocardiogram (ECG) and electromyography (EMG) applications. It is designed to measure the electrical activity of the heart and muscles by amplifying and filtering the bio-potential signals. This sensor is commonly used in wearable health monitoring devices, fitness trackers, and medical diagnostic equipment.
Pin Number | Pin Name | Description |
---|---|---|
1 | GND | Ground |
2 | 3.3V | Power supply (3.3V) |
3 | OUTPUT | Analog ECG output signal |
4 | LO+ | Lead-off detection positive |
5 | LO- | Lead-off detection negative |
6 | SDN | Shutdown pin (active low) |
// AD8232 Heart Rate Monitor
const int OUTPUT_PIN = A0; // Analog output from the AD8232
const int LO_PLUS_PIN = 10; // LO+ pin of the AD8232
const int LO_MINUS_PIN = 11; // LO- pin of the AD8232
void setup() {
Serial.begin(9600);
pinMode(LO_PLUS_PIN, INPUT); // Setup for lead off detection
pinMode(LO_MINUS_PIN, INPUT); // Setup for lead off detection
}
void loop() {
if((digitalRead(LO_PLUS_PIN) == 1)||(digitalRead(LO_MINUS_PIN) == 1)){
Serial.println("Lead off detected");
}
else{
int ecgValue = analogRead(OUTPUT_PIN);
Serial.println(ecgValue);
}
delay(200); // Delay for stability
}
Q: Can the AD8232 be used for medical purposes? A: While the AD8232 can be used for educational and hobbyist projects, it is not certified for medical use without proper testing and certification.
Q: How can I improve the quality of the ECG signal? A: Use high-quality electrodes, ensure stable power supply, and keep the sensor and cables away from noise sources such as power lines and mobile phones.
Q: What should I do if the sensor is not working? A: Check all connections, ensure the power supply is within the specified range, and verify that the electrodes are properly attached to the subject.