Redboard Qwiic with ECG/EMG shield from Olimex clipping at 1024bits

Hi all,

I am using the SparkFun Redboard Qwiic with the Olimex ECG/EMG shield to collect ECG and EMG data. The problem is that for EMG and ECG data it saturates at 1024 bits. I guess that is because of the shield sending out 0-5V data whereas the RedBoard reads 0-3.3V. I have read that the RedBoard can read 3.3-5V inputs, but I am not sure what the default is and how I can change it to 5V. Or if that is even possible.

Please let me know, what I could do.

This is the code that I am using, if it is of value for this post:

#include <compat/deprecated.h>
#include <FlexiTimer2.h>
#define SAMPFREQ 256                      // ADC sampling rate 256
#define TIMER2VAL (1024/(SAMPFREQ))       // Set 256Hz sampling frequency                    
volatile unsigned char CurrentCh=0;         //Current channel being sampled.
volatile unsigned int ADC_Value = 0;    //ADC current value

void setup() {

noInterrupts();  // Disable all interrupts before initialization

FlexiTimer2::set(TIMER2VAL, Timer2_Overflow_ISR);
FlexiTimer2::start();

// Serial Port
Serial.begin(57600);

interrupts();  // Enable all interrupts after initialization has been completed
}

void Timer2_Overflow_ISR()
{
        ADC_Value = analogRead(CurrentCh);
        //Serial.print("D!");    //this is packet header for my application
        Serial.print(millis());
        Serial.print(", ");
        Serial.println(ADC_Value);
}

void loop() {
__asm__ __volatile__ ("sleep");
}

Cheers,

Patrick

Hi Patrick.

Unless you’ve modified your RedBoard Qwiic, it would be running at 5 volts. (Only the Qwiic connector runs at 3.3 volts)

There might be some sort of adjustment on your shield to decrease sensitivity and you might try turning that down if the shield is outputting too much signal into the RedBoard.