AD8232 ECG heart monitor with ESP32
Supply 3.3 V
Bus ANALOG
Measures ecg, heart rate
Pins and ESP32 wiring
| Pin | Role | ESP32 pin | Notes |
|---|---|---|---|
| GND | Ground | GND | |
| 3V3 | Power | 3V3 | Use 3V3 only (chip maximum 3.5 V) |
| OUTPUT | Analog output | D34 | ECG signal. To an ADC1 pin (GPIO 32 to 39) |
| LO- | Output (the part drives it) | D25 | Leads-off detect -, HIGH when an electrode is loose |
| LO+ | Output (the part drives it) | D26 | Leads-off detect +, HIGH when an electrode is loose |
| SDN | Input (the ESP32 drives it) | D27 | Shutdown, active LOW. Can be left unconnected |
| RA | Not wired to the ESP32 | — | Right arm electrode pad (also on the 3.5 mm jack) |
| LA | Not wired to the ESP32 | — | Left arm electrode pad (also on the 3.5 mm jack) |
| RL | Not wired to the ESP32 | — | Right leg electrode pad (also on the 3.5 mm jack) |
Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.
Starter code (Arduino)
void setup() { Serial.begin(115200); }
void loop() {
int mv = analogReadMilliVolts(34); // OUTPUT on GPIO 34
Serial.println(mv);
delay(200);
}
Sources
- Analog Devices AD8232 datasheet, Supply 2.0 to 3.5 V; leads-off detection outputs LOD+ and LOD-
- SparkFun AD8232 hookup guide, Pins GND, 3.3v, OUTPUT, LO-, LO+, SDN; pads RA, LA, RL. Not a medical device
Try it in 3D in BoardPilot
Related parts
4-20 mA to voltage converter module (HW-685)49E linear hall sensor (SS49E)ACS712 current sensor moduleACS723 current sensor moduleACS758 high-current sensor module (50-200 A)Capacitive soil moisture sensor v1.2
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.