AD8232 ECG heart monitor with ESP32

Supply 3.3 V Bus ANALOG Measures ecg, heart rate
GND3V3OUTPUTLO-LO+SDNRALARL

Pins and ESP32 wiring

PinRoleESP32 pinNotes
GNDGroundGND
3V3Power3V3Use 3V3 only (chip maximum 3.5 V)
OUTPUTAnalog outputD34ECG signal. To an ADC1 pin (GPIO 32 to 39)
LO-Output (the part drives it)D25Leads-off detect -, HIGH when an electrode is loose
LO+Output (the part drives it)D26Leads-off detect +, HIGH when an electrode is loose
SDNInput (the ESP32 drives it)D27Shutdown, active LOW. Can be left unconnected
RANot wired to the ESP32—Right arm electrode pad (also on the 3.5 mm jack)
LANot wired to the ESP32—Left arm electrode pad (also on the 3.5 mm jack)
RLNot 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

Try it in 3D in BoardPilot

BoardPilot Part data (JSON)

Related parts

Part data: CC BY 4.0, free to reuse with credit to BoardPilot.