Contributions:NeuroSpark

From BCI2000 Wiki
Jump to navigation Jump to search

Location

http://www.bci2000.org/svn/trunk/src/contrib/SignalSource/NeuroSpark

Versioning

Author

Jintao Li, Frontier Lab for Applied Neurotechnology (https://ant.chenfrontierlab.com)

Version History

  • V1.00 - 05/17/2022

Source Code Revisions

Functional Description

This Source module allows BCI2000 to receive electrophysiological data collected by Neuracle’s NeuroSpark device, and streamed out by HEEG software. The Source module has been tested with HEEG software version 1.00.00.9263.

Usage of HEEG Software

HEEG data acquisition software is a product by Neuracle that streams out electrophysiological data. There are two modes of HEEG software. The first one is to connect it to the NeuroSpark device, and stream data collected by the device. The software can also act as an emulator to send out data without NeuroSpark. In both ways, data are transported via TCP.

Connect the software to the NeuroSpark device

Start the HEEG software and open the device

Using the software as an emulator

Using the data emulator instead of the device before opening the device

Setup the streaming data channels

Setting C1-C4 as streaming data channels

After opening the device, start the data acquisition, then the TCP/IP streaming starts automatically.

Setting Up BCI2000

Once you compiled BCI2000 correctly and generated the solution, create a batch file to run the NeuroSpark Source Module. Just copy one of the existing batch files in BCI2000/batch. Then replace the first line beginning with "Start executable" with "Start executable NeuroSpark --local".

Usage Steps

Make sure you start data streaming within the HEEG software start the data acquisition before you start BCI2000.

  1. Double click the batch file you just created.
  2. Click the "Config" button.
  3. Set suitable parameters. Detail about these parameters can be found below.
  4. Click "Set Config".
  5. Click "Start" to start the experiment.

Parameters

The Source module can configure all necessary parameters automatically. The only parameter you may need to set yourself is SampleBlockSize.

SourceCh

The value should be the same as the number in HEEG software or just leave it auto.

SampleBlockSize

The value is default to 20 if you set it ‘auto’, which is also the minimum. HEEG software sends out certain number of samples per block, which is decided by sample rate, in order to ensure that BCI2000 receives these samples correctly, SampleBlockSize has to be a multiple of that. For example, if the sample rate is 2000 Hz, HEEG streams out 2 samples per channel per block, so SampleBlockSize should be a multiple of 2.

SamplingRate

Enter the number of sampling rate that matches that in the HEEG software(250, 500, 1000, 2000, 4000, 8000, 16000) or leave it auto.

SourceChGain

Use 'auto', or a list of SourceCh numbers of 1.

SourceChOffset

Use 'auto', or a list of SourceCh numbers of 0.

Notes

  1. You may be able to lower the variance in timing by setting the priority of the HEEG software to highest in the TaskManager.
  2. At present, the highest sample rate of HEEG is 2000 Hz (at least in emulator mode), which means even you set sample rate higher than 2000 Hz, like 4000 Hz, it would send out data in 2000 Hz.