increasing sampling frate for SD output?

edited April 2017 in Ganglion
given that the SD card support is down the road. I wonder if and how the current sampling rate (200Hz) on Ganglion can be increased? It seems like recent studies on ECG prefer as high as 1000Hz. I understand OpenBCI is dedicated for EEG, but I think it would be nice to be able to set the sampling rate anyway. it seems like MCP3912 can go up to 1000Hz.

Comments

  • wjcroftwjcroft Mount Shasta, CA
    The limitation with Ganglion is the Bluetooth Low Energy radio link. Once the SD card is fully supported increased sample rates may be possible. This has been implemented on Cyton.


    Cyton also supports some other techniques for increased sample rate, such as a wired usb link and a wifi shield (in beta testing presently.) If you need increased sample rate your best bet currently is with Cyton.

  • I found the https://github.com/OpenBCI/OpenBCI_Ganglion_Library has included  "GanglionWithSD" for a while, and I am trying to flash that firmware.

    I was wondering if there is any documentation about how to change the sampling rate on Ganglion. It seems like the sampling rate is set by the following code  in  penBCI_Ganglion_Library.cpp


        void OpenBCI_Ganglion::config_MCP3912(unsigned long gain, unsigned long sampleRate) {
          sampleRate |= 0x003CE050; // dither on max, boost 2x, OSR 4096,
          // digitalWrite(MCP_RST, LOW); delay(50);
          // digitalWrite(MCP_RST, HIGH); delay(300);
          digitalWrite(MCP_SS, LOW);
          MCP_sendCommand(GAIN, MCP_WRITE);
          MCP_writeRegister(gain);          // GAIN_1, _2, _4, _8, _16, _32
          MCP_writeRegister(0x00B9000F);    // STATUSCOM auto increment TYPES DR in HIZ
          MCP_writeRegister(sampleRate);    // CONFIG_0:  0x003CE050 | sample rate: 50, 100, 200, 400
          MCP_writeRegister(0x000F0000);    // CONFIG_1:  put the ADCs in reset, external oscillator
          digitalWrite(MCP_SS, HIGH);
        }


    Is there any explanation of how the nominal sampling rate (i.e., "200Hz") is correspond to the value(s) set here?
Sign In or Register to comment.