Ultracortex & Cyton, process data on Arduino?

bo7awrabo7awra UK
edited May 2019 in Cyton
Hi 

I am going to work on a project based on brain signals where I am sending brain signals from Ultracortex Mark IV to Arduino.
so can i use the Ultracortex Mark IV with Cyton Board and send the data to Arduino so i can write a code based on the data from Cyton ? and what is the best way to do that ? 

Thanks  

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Bo7, hi.

    Arduino, especially the smaller ones, are not well suited to the signal processing (DSP Digital Signal Processing) required for analysis of EEG.

    Could you possibly use a Raspberry Pi instead? With the Pi, you can plug the Cyton dongle directly into the Pi usb. The Cyton is then handled as a serial byte stream, a COM port (/dev/tty* in Linux). 

    There are usb shields available for Arduino, but on the whole it will be underpowered.

    Is there a reason you don't want to use a larger computer such as a laptop, to receive the Cyton data?

    Regards,

    William

  • bo7awrabo7awra UK
    edited May 2019
    Hi William,
    thanks for your answer, it really could help. 
    when you said using a laptop to receive data from Cyton did you  mean that I should use two laptops ? or just one
    the main things is I want to use the data from cyton and use it with a code in Arduino Uno  so I can control such as servo motor or Led light depending on the frequency that I receive from brain .
    so the code could read the data and use them to do functions in the code .thanks


    Haidar

  • wjcroftwjcroft Mount Shasta, CA
    Haidar, 

    Best way to do the type of motor control you mention with an Arduino is with a laptop, using TWO serial ports: one for the Cyton dongle, the other for the Arduino usb serial. The laptop does the signal processing, then send 'commands' of your choosing (as serial strings) to the Arduino Uno.

    You could substitute a Pi for the laptop, and use the Pi GPIO pins to do your servo or LED output. Laptop will be easier, because many apps and libraries exist for EEG, signal processing, BCI.

    Check the search button in the lower right column. There are previous threads on Arduino motor control, LED control, etc. Using the approach mentioned.

    William
  • Thanks William , i will check them and keep updates .
    Thanks
    Haidar
  • retiututretiutut Louisiana, USA

    @bo7awra I'm currently making an Instructable to control an Arduino using OpenBCI tech!

    This is based on the OpenBCI tutorial: https://docs.openbci.com/Tutorials/17-Arduino_Focus_Example
  • @retiutut ;

    Wow thanks for the mention, I will look for what you did and then decide.

    I still did not buy any parts from openBci until I decide the best for me. 
    my project will be controlling servo motors by openBci Ultracortex and Cyton or Ganglion. 
    any opinion?

    Thanks
    Haidar  
  • wjcroftwjcroft Mount Shasta, CA
    Haidar, hi.

    The Cyton data stream and SDK is likely easier to interface with from various programming languages. That's because it is a simple serial byte stream. There are also many more features than Ganglion.

    The Ganglion data stream is more involved, using Bluetooth Low Energy packets and data compression. The Ganglion dongle (BLED112), is a serial port device, however I believe the only interface library to speak to the Ganglion dongle, is currently written in Javascript / node.js. If you are using a laptop this is not an issue because the OpenBCI GUI and Hub can do the translation for you. And output in a more friendly format called LSL LabStreamingLayer. There are interface libraries for LSL in various programming languages.

    The GUI, Hub access of course is also available with Cyton. But with Cyton you have the option of interfacing directly with the serial port via Python or other languages that can parse serial byte streams.

    Regards,

    William
  • Thank William for the explanation. 
    I will go for Cyton with the Ultracortex, but the one that I can print it my self is sold out unfortunately . 
    I found on Github the STL file for the Ultracortex but I don't know why they publish it and sell at the same time. 
    also, they upload the Cyton  Pcb file so that I can print it and solder it as the schematic . but i don't know if it's legal .
    I will order them to avoid any of thes . 

    thanks
    Haidar
  • wjcroftwjcroft Mount Shasta, CA
    Haidar, hello.

    The "print it yourself" UC kits are on back order. You can email contact at openbci.com to inquire about estimated availability dates. Mentioning @openbci. The kit contains only the additional parts needed for your own print: primarily the electrode holders. These are injection molded for higher resolution than is possible with 3D printing. That resolution is necessary for smooth operation of the inner plunger.

    I would recommend against building your own Cyton / dongle from the PCB / parts. 

    William

  • Hi William 
    for that I will buy it unassembled at least it comes with the electrodes and so it will be more accurate than if I print them.

    thanks 
    Haidar
  • wjcroftwjcroft Mount Shasta, CA
    Correct, basically you CANNOT print the electrode holders for Ultracortex IV on any existing 3D printer, they are too high a resolution. If you did try to print, the spring and plunger action would stick and not slide.
  • @wjcroft said:
    Arduino, especially the smaller ones, are not well suited to the signal processing (DSP Digital Signal Processing) required for analysis of EEG.

    I was able to signal process eeg data from a Backyard Brains Heart and Brain Spikershield directly on the Arduino using the arduinoFFT library. Code and project description here. I would think you could do the same with openBCI, no? Maybe I'm wrong because I'm not sure how openBCI differs from the Heart and Brain Spikershield. I don't have an openBCI, but I'm thinking of switching my project over to it openBCI.

  • wjcroftwjcroft Mount Shasta, CA

    Hello Dash, your project is doing relatively simple DSP. There are other forms of EEG DSP that require more complex calculations.

    The primary emphasis on previous posts in this thread, was to point out that Cyton and Ganglion boards interface through a usb serial port device, called a 'dongle'. Such a dongle easily plugs into a laptop or a small microcontroller like Raspberry Pi. But Arduino's lack a native "usb host mode" port that the dongle could plug into. You can find host mode shields that will plug into Arduino, if your board has the required form factor.

    The recommended interface library for computers that support it, is BrainFlow,

    https://brainflow.readthedocs.io/en/stable/

    Regards, William

Sign In or Register to comment.