Change sampling rate (frequency)

Hi, 

is it possible to change sampling frequency from 250Hz to 1000Hz?

Comments

  • biomurphbiomurph Brooklyn, NY
    Yes.

    In our  library, there is a file OpenBCI_32_Daisy.cpp. That is where the sample frequency is set.
    the ADS1299 CONFIG1 register contains the bits that set sample rate in it's low nibble. 
    This register also controls the CLK output, which needs to be turned on when a Daisy module is present.
    The register is a byte, and it is written with a HEX value. The change you need to make is in the low nibble. For example, 
    In the initialize_ads() function, change the line
    WREG(CONFIG1,0xB6,BOARD_ADS); // tell on-board ADS to output its clk, set the data rate to 250SPS
    to
    WREG(CONFIG1,0xB4,BOARD_ADS); // tell on-board ADS to output its clk, set the data rate to 250SPS

    Notice, the hex value is changed from 0xB6 to 0xB4. For all instances of CONFIG1 setting, change the 6 to a 4, and you will set the sample rate to 1KSPS.

    We will make the sample rate change more accessible in future software release.

  • How about 10kHz or even more? In brainstem research I need at least 10kHz. In this case data must be written directly to the SD or?
  • biomurphbiomurph Brooklyn, NY
    @jussijaatinen
    At higher sample rates, the data needs to be sent to the SD card. You can down-sample to the computer.
  • And how can I change it?
  • biomurphbiomurph Brooklyn, NY
    @jussijaatinen
    please see my post earlier in this thread. 

    We are working on a firmware upgrade, and the sample rate will be more transparent to the user.

    Joel
  • @biomurph I did the modification in the library that you mentioned above but the sample rate isn't changing.
    Is this the only modification to be made?
    And how can we verify that our sampling rate has actually changed.
  • Chiming in as a +1 who is extremely interested in raising the sample rate on the 16-channel version.  Is there a timeframe for the firmware upgrade?
  • biomurphbiomurph Brooklyn, NY
    We are currently working on upgrade of the OpenBCI Board and Radio firmware.
    Changing things like the sample rate on the fly (without having to upload new code) is on the list.
    One issue is that we have an upper limit on the over-the-air data rate, so the higher sample rates are useful only if you're going to use the SD card for local storage, and then down-sample over the air.

    Another option, and one that is only an idea around here, is to use some form of compression to increase the data throughput. Anyone got ideas about that??
  • edited June 2016
    Hello guys. I'm working with OpenBCI and an API for Labview. I have an analog sensor in the D13 pin who has a sampling frequency of 250 Hz. When I test 8 CH board, it has 250 Hz for sampling too, but when I test with 16 CH Daisy, the frequency down by the half to 125 Hz. I think it could be because of the reading time at the final.
    I wonder if raising up the sample frequency to 500 Hz could help me to have 250 Hz with 16 Ch device? 
  • wjcroftwjcroft Mount Shasta, CA
    Some related discussions on this thread,

    http://openbci.com/forum/index.php?p=/discussion/712/prospects-for-higher-sample-rates

    @Winslow_Strong has his OpenBCI connected via a usb isolator, sampling at 500 hz. Some further tweeks might bring that to 1000 hz. Winslow mentions that he'll be writing up a tutorial on the steps he carried out in achieving this. But the thread above has the necessary information, spread over several pages.

    Besides the usb isolator (using FT*232H breakout), there are also other approaches mentioned utilizing wifi or bluetooth breakout boards.

    William


  • @Jorch_Mata The daisy by default can only go at 125Hz due to it needing to send double the EEG data, and the data rate being bottlenecked.  As William says, we've worked around that by implementing a wired USB connection and increasing the sampling rate.  At the moment, I can make it work with at most 460800 baud on the USB which allows for at most 500Hz sample rate with 16 channel, or 1khz with 8 channel.
  • "We are currently working on upgrade of the OpenBCI Board and Radio firmware.
    Changing things like the sample rate on the fly (without having to upload new code) is on the list."

    Any news on this @biomurph ? Is there a simple way to change the default frame rate to 500Hz or 1000Hz ? 

  • wjcroftwjcroft Mount Shasta, CA
    @PedroMen, hi.

    Higher sample rates are only possible (over the air) with the Wifi Shield. And the Shield needs to be manually started.

    Regards,

    William

Sign In or Register to comment.