I'm trying to hook up the AD8232 to my R Pi Pico via Fritzing breadboard. I thought I had created a potential working example, but unfortunately, not. I will explain below.
This is my current wiring setup:
Be patient as I am new to the R PI/Breadboard project world with zero training, but getting a PICO ECG device is high on my list of interests!
To explain the wiring:
- The yellow wire is connect to the OUTPUT pin of the AD, to a GPIO pin on the pico
- The black GND wire to the negative rail
- The red 3.3v wire to the positive rail
- The blue and green LO-/+ wires to GPIO pins
- Guide said not to use an SDN wire
I plug the pico into its micro USB port into my computer and run this script:
from machine import ADC, Pin
import time
adc = ADC(0) # GP26 = ADC0 (your I15)
lo_plus = Pin(15, Pin.IN) # GP15 = your A20
lo_minus = Pin(14, Pin.IN) # GP14 = your A19
print("AD8232 ECG Ready - Attach electrodes")
while True:
if lo_minus.value() == 0 and lo_plus.value() == 0:
ecg = adc.read_u16()
print(f"ECG: {ecg}") # Should see 30k-60k range with heartbeat
else:
print("! Check electrodes")
time.sleep_ms(2) # 500Hz sampling
All I get is a near-constant signal from the wires:
ECG Logger Started - Attach electrodes
Saved: 733055, ECG=1104, Status=OK
Saved: 738056, ECG=1098, Status=OK
Saved: 743058, ECG=1098, Status=OK
Saved: 748060, ECG=1098, Status=OK
Saved: 753061, ECG=1097, Status=OK
Saved: 758063, ECG=1097, Status=OK
Saved: 763065, ECG=1098, Status=OK
Saved: 768067, ECG=1097, Status=OK
Saved: 773069, ECG=1097, Status=OK
Saved: 778070, ECG=1098, Status=OK
Saved: 783072, ECG=1098, Status=OK
This is WITH leads attached to my chest and wires attached to them securely. I attempted to touch the metal ports of the wires together, nothing was making these numbers move. And of course as a newbie and with minimal documentation on this, I'm stumped.
Has anyone hooked this up to a pico before? And if so, how did you do it (details).
I'm trying to hook up the AD8232 to my R Pi Pico via Fritzing breadboard. I thought I had created a potential working example, but unfortunately, not. I will explain below.
This is my current wiring setup:
Be patient as I am new to the R PI/Breadboard project world with zero training, but getting a PICO ECG device is high on my list of interests!
To explain the wiring:
I plug the pico into its micro USB port into my computer and run this script:
All I get is a near-constant signal from the wires:
This is WITH leads attached to my chest and wires attached to them securely. I attempted to touch the metal ports of the wires together, nothing was making these numbers move. And of course as a newbie and with minimal documentation on this, I'm stumped.
Has anyone hooked this up to a pico before? And if so, how did you do it (details).