Ganglion & OpenVibe

edited August 2018 in Software
Hello there,

There is an available OpenVibe driver for the Cyton:
...heavily inspired from the OpenEEG:

...but for the Ganglion, only a procedure to connect it to Ubuntu, via BLE bluetooth, then via LSL to OpenVibe and then via OSC to MAX/MSP or PureData:
...using the OpenVibe driver LabStreamLayer (LSL)

Has any of you thought to code or already coded an OpenVibe driver for the Ganglion (with its configuration box) ?
Best,
Jeff

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Jeff, hi.

    There is a 'Networking' widget in the OpenBCI_GUI. It can output LSL. OpenViBE can consume the LSL stream. That is the recommended way to go.

    There is also the OpenBCI_Python Github repo, that can read from Ganglion and create an LSL stream, but it requires the Python to be running on Linux, it is Linux specific.

    Regards,

    William

  • edited August 2018
    Ok for the OBCI -> OV  via the LSL stream (if it does not create delays), but reversely, OV can send (processed/unprocessed data &) stimulations out from Designer (using  the LSL Export box): while it is streaming the data from the board, can the OBCI GUI consume an LSL stream of stimulations coming from OV and send them to the Ganglion board ? Would be nice, since coding a driver with the config. box is a real job !
    Jeff
  • wjcroftwjcroft Mount Shasta, CA
    Jeff, no sorry, the GUI only sends LSL, cannot consume. And in fact no software I am aware of 'sends' data or stimulations to the Ganglion or Cyton. We usually recommend you use a separate Arduino for this, connected to a serial port. You could then have a small Python app that receives an LSL stream, and writes 'commands' to the Arduino serial port.

  • Is it because the Ganglion firmware does not leave the possibility to receive such stimulis and It would require to introduce a new (timed) type of command in this Ganglion firmware ? (to generate a high pulse at a given time for a given duration on a given available output digital pin).

  • wjcroftwjcroft Mount Shasta, CA
    One important consideration is that generating pulsed signals with the Ganglion or Cyton output pins, may well introduce noise into the EEG channels, which are responding to microvolts levels. Digital output pulses in the 3 volt range are millions of times stronger than the EEG signals you are trying to detect. Hence can couple inductively or capacitively into your EEG leads.
  • This is a powerful reason indeed. I could try to see if/how EEG channels are perturbated by signals on the digital or analog output pins.
    Would you know if this has already been tested ? (just changing a digital pin state during the EEG acquisition). 
    If this were to be the case (polluted EEG channels), I would be left with two options: either receive/generate the stimulis on another Arduino compatible board or discard the EEG measures during the stimulations (if the perturbations are not predictible/compensable).

  • wjcroftwjcroft Mount Shasta, CA
    Let me make a slight correction. The issue is not so much the 3.3 V digital signals on the Ganglion mainboard, there are many of those. The potential coupling comes when you take the output of a digital pin and run it off the board with a wire to another piece of equipment. The wire itself acts as a radiator via inductive or capacitive coupling to the electrode wires. The easiest approach both software, hardware and firmware, is to use another Arduino like system on a separate serial port. With all of the extremely inexpensive Arduino compatible microcontroller boards on the market (many less than $10), this is by far your easiest route.


    Regards,

  • edited August 2018
    I definitely need to convey the signal outputed from the digital pin of the Ganglion with a wire, a bit like 
    ...maybe there are ways (beyond than increasing distance between wires) to minimize these couplings (with a pulse signal, it would only be at the state transitions btw). My goal was to limit the number of boards I sleep with :) but there are indeed small footprint arduino compatible boards to effectively generate the audio stimulations (and like Teensy, which could handle the real time computations: STFT, features extraction, sleep staging algorithms, stimulations optimization... if I want to sleep without BLE). 
  • wjcroftwjcroft Mount Shasta, CA
    Jeff, hi.

    I forgot that you mentioned on some other threads that you were doing a sleep tracking headband. So your final goal would be to reduce the number of components and possibly Bluetooth emissions as well. It does seem like Ganglion will be underpowered for the signal processing and other algorithms you describe, since it is fairly busy just feeding the Bluetooth output. So (in your final configuration) using something like an STM32 uC for DSP, connected to Ganglion may be a possible approach.

    A complexity to consider is that the Ganglion BLE data stream is fairly tricky to parse and decompress. The OpenBCI_GUI does all that for you. Similarly the LSL generation (if you want to use OpenViBE), is another hurdle.

    Perhaps you are thinking of doing your project in two stages, (1) a proof of concept using OpenVIBE and related software to do the signal processing and algorithms. Then (2) a more compact implementation that would run entirely on the headband with no laptop connection required.

    Perhaps this is already your goal.

    Regards,

Sign In or Register to comment.