Hi everyone,
First of all, I'm still getting familiar with the whole topic—apologies in advance if I miss anything that should be clear.
Here's my issue. I bought a clone (Link to the clone on Aliexpress) of the Protocentral ADS1292R breakout board (Link to the original) and try to connect it to a Seeed Xiao ESP32-C6.
First thing I did was to bridge the LOGIC_SEL on the breakout board with a 0 Ohm resistor (bridging to 3.3V as I connect to the 3.3V out). Second, I created a solder bridge on the CLKSEL pads, selecting the internal oscillator as a clock. Next, I connected all the relevant pins using jumper wires on a bread board. I verified with a multimeter that setting the Pins to HIGH results in the expected increase in voltage compared to setting them LOW, so i assume that i set everything up correctly.
Next I downloaded Arduino IDE, installed the latest ESP32 boards with support for the Xiao ESP32-C6 and selected my board. I also downloaded the library (in Arduino IDE) provided by Protocentral (GitHub - Protocentral/protocentral-ads1292r-arduino: Arduino Library for the ADS1292R ECG/Respiration shield and breakout boards from ProtoCentral). I go to examples and select Example-1-ECG-Respiration-Plot-Openview.ino.
The original Pin definitions are as follows:
//Pin declartion the other you need are controlled by the SPI library
const int ADS1292_DRDY_PIN = 6;
const int ADS1292_CS_PIN = 7;
const int ADS1292_START_PIN = 5;
const int ADS1292_PWDN_PIN = 4;
and i replace those with (the GPIO pins, based on my wiring):
const int ADS1292_DRDY_PIN = 16;
const int ADS1292_CS_PIN = 17;
const int ADS1292_START_PIN = 2;
const int ADS1292_PWDN_PIN = 21;
In addition, as I am using a non-arduino board, I figured that I need to change the SPI pins, so i also define those (as well as the two GPIO pins for the respiration measurement output):
const int ADS1292_MOSI_PIN = 18;
const int ADS1292_MISO_PIN = 20;
const int ADS1292_SCK_PIN = 19;
const int ADS1292_GPIO1_PIN = 22;
const int ADS1292_GPIO2_PIN = 23;
In line 104, i change
SPI.begin()
to
SPI.begin(ADS1292_SCK_PIN, ADS1292_MISO_PIN, ADS1292_MOSI_PIN);
My edited setup function therefore then looks like this:
void setup()
{
delay(2000);
SPI.begin(ADS1292_SCK_PIN, ADS1292_MISO_PIN, ADS1292_MOSI_PIN);
SPI.setBitOrder(MSBFIRST);
//CPOL = 0, CPHA = 1
SPI.setDataMode(SPI_MODE1);
// Selecting 1Mhz clock for SPI
SPI.setClockDivider(SPI_CLOCK_DIV16);
pinMode(ADS1292_DRDY_PIN, INPUT);
pinMode(ADS1292_CS_PIN, OUTPUT);
pinMode(ADS1292_START_PIN, OUTPUT);
pinMode(ADS1292_PWDN_PIN, OUTPUT);
Serial.begin(57600);
ADS1292R.ads1292Init(ADS1292_CS_PIN,ADS1292_PWDN_PIN,ADS1292_START_PIN);
Serial.println("Initiliziation is done");
}
Now I compile and upload (which works), but the output I am seeing is only zeros. As I am originally coming from Python and the syntax of micropython is much more familiar to me, I have also tried it in micropython. I only tried to read the device ID (which should return 0x73), but I am also only getting 0 (0x00). However, I am not sure if I implemented the startup sequence for the ADS1292R correctly.
Anyway, I am happy to try things and troubleshoot, but due to my limited experience, I am out of ideas and I would appreciate any help or a nudge in the right direction. Thanks a lot in advance!
Edit: For the sake of completeness, I tried it with the electrodes plugged in as well as leaving them unplugged.