16 channel sample rate, streaming vs SDcard

edited January 2017 in OpenBCI_GUI
Hi Folks

Having fun working with the OpenBCI Cyton board with the daisy board. I'm still struggling trying to figure out the sampling rate and am hoping someone out there can help. The documentation says that the sampling rate is set to 125Hz when streaming 16 channels of data. However, in the code everything seems to assume the data are coming in at 250Hz. I'm getting ready to start collecting EEG data and can't really figure out a reliable way to test and see what the actual sampling rate of the incoming data is. I don't have a function generator that can generate small enough signals, and I can't figure out exactly what the "test" signal is so that I can use that to try to figure this out. Can any of the gurus out there answer these 3 questions for me:

(1) When streaming 16 channels of data, what is the sampling rate of the recorded stream of data?
(2) When collecting 16 channels of data, what is the sampling rate of the data recorded on the SD card (I'm pretty sure this is 250Hz)?
(3) If I start collecting data with the GUI and close the GUI without stopping the stream, will data continue being collected on the SD card?

I've been trying hard to figure out the answers to my questions by looking through the GUI code, and have figured out the answers to a bunch of other questions, but I'm still struggling with these. Any input would be GREATLY appreciated. I'd really like to start collecting some EEG data next week.

Thanks!
Dan

Comments

  • wjcroftwjcroft Mount Shasta, CA
    edited January 2017
    Dan, hi.

    Mentioning @dancingdarwin, AJ Keller @pushtheworld, and @yj.

    The SD card does record directly at 250 Hz. When streaming however, the over-the-air samples are (essentially) averaged / alternated 8 channels at a time, downsampled to 125 Hz. It's possible to avoid this by using the wired USB option, then you get the full intact stream in realtime, at up to 500 Hz. But this is somewhat tricky to setup; a couple other threads cover this.

    I'm going to let yj or AJ answer the SDcard continuity question.

    William

  • (1) When streaming 16 channels of data, what is the sampling rate of the recorded stream of data? 125Hz
    (2) When collecting 16 channels of data, what is the sampling rate of the data recorded on the SD card (I'm pretty sure this is 250Hz)? 250Hz
    (3) If I start collecting data with the GUI and close the GUI without stopping the stream, will data continue being collected on the SD card? No idea. I would assume so. @biomurph could answer, you could just test it too.
  • wjcroftwjcroft Mount Shasta, CA
    @djfletch42, see this post link below and the next few after that for explanation of how the radio packets (each containing 8 channels) are alternated and averaged. This has the potential to throw off exact phase relationships; a workaround is to use the wired USB which is NOT averaged like this. And can run at true 250 or 500 hz.

    http://openbci.com/forum/index.php?p=/discussion/comment/4225/#Comment_4225

  • Thanks for the responses. Very helpful. Now I get how the samples come in. Sorry I didn't find that other post. I did search, I promise! 

    It is interesting how the 16 channel bandwidth issue is dealt with. My plan is to use the streaming data to "check on" the board and make sure everything is working intermittently but to actually analyze the data from the SD card. I'm a bit bummed that it looks like you have to reset the board every time you connect to it via serial (which means that data would stop being collected and my channel settings would all revert back to the default). I also need to figure out a way to know exactly when the SD card recording starts because I'll also be collecting video and need to sync it to the data recorded on the SD. I was thinking of making a widget with a "Start Recording" button that would send the "L" command to the board to start recording to the SD card, capture the file name coming back and record it, and start the video recording. That should allow me to develop a time stamp for each sample in the SD card file that I can use to sync the SD card file and the video. My only concern at that point is any drift between the OpenBCI clock and the computer's clock that could lead to dyssynchrony. Ideally I'd like to collect the data on the computer, but I'm planning to record for extended periods and it would be much better to be able to just use the OpenBCI board and not have to rely on a computer maintaining a connection to collect the data. I'll look into the wired serial interface.

    Thanks for all of the input. Really helpful.

    Dan
  • wjcroftwjcroft Mount Shasta, CA
    I believe @yj has done some long term SD card recording with his mice experiments, and might have suggestions on how to monitor while that is going on. You can also reach him by clicking on his name here, then use the Private Message button.

    AJ has plans for integrating the wired USB capability into V3 of the firmware. There is a V2 version available here,

    http://openbci.com/forum/index.php?p=/discussion/915/using-wired-usb-connection-with-firmware-2-x-x#latest

    The V1 version is on that previous link I gave regarding how the 125 hz averaging is done.

    William

  • You can for sure connect and disconnect without stopping streaming! Just don't send reset commands!
  • @djfletch42 please checkout these docs which tell you about not having to stop streaming just because a serial port connection is made http://docs.openbci.com/Hardware/03-Cyton_Data_Format#cyton-data-format-startup-cyton-board

    tagging @wjcroft for future reference
Sign In or Register to comment.