Which OpenBCI board? / controlling external hardware

edited January 2018 in Hardware
Hello!

I want to buy an openBCI board to be able to control external hardware (ie: certain waves cause changes in lightblubs, robots, computers etc.). Just simple "if statements" with the input, causing things to happen as output. 
I was looking through the tutorials:
http://docs.openbci.com/Tutorials/05-External_Trigger_8bit_Example, and noticed that the examples were 8bit or 32bit. 

I was originally going to buy the cyton board, which is 32 bit, and I mainly was wondering what board you recommend buying/what the functionality difference is, and how you connect with external hardware for each of the boards? I understand its Arduino compatible - does that mean can skip the Arduino as a whole? 

Thanks! - I really appreciate the help, totally new to this.

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Ananya, hi.

    Either Cyton or Ganglion could be used. Cyton had an earlier "8-bit" version board using ATmega (no longer manufactured). The current "32-bit" Cyton board is PIC / chipKIT.

    Have you looked over Chip's tutorials?


    In many cases, the detection of the 'event' / EEG triggering signal is done on the laptop, just receiving the raw data stream from the OpenBCI board. Signal processing done on the laptop. Then to control some type of output device, that is usually most easily done with a separate Arduino board wired to another serial (usb) port. Sending commands from the signal processing program on the laptop.



    William

  • Hey @ananya welcome to the community!

    Checkout this awesome document which breaks down each board and how everything works together!

    http://docs.openbci.com/FAQ/02-HowProductsGoTogether

    > does that mean can skip the Arduino as a whole?

    Yup! There are a bunch of pins broken out on the OpenBCI device that you can use!
  • Thanks so much! So I have now bought everything and managed to operate the GUI with the inputs from the electrodes, but am encountering some other problems. 

    Now for controlling an external output/device, I need someway to read and act on the data to control the Arduino. 
    Currently, I can only see the GUI - how do I change it into computer readable data for Arduino to execute commands live?
    (I've already downloaded the Chipkit and other Arduino packages)

    I see the BP filter button and focus widget - but not sure how to execute outputs with these.
    Looking at Chip's Github I think he used MatLab - what are the other options/ways to go about this? Do I use a third-party software(for MacOS Sierra), or can I somehow put programs directly onto the GUI?

    Thanks again for all the help - really appreciate it. 
  • wjcroftwjcroft Mount Shasta, CA
    No, I think Chip did some of his real time experiments by placing mods into early versions of the GUI. (Processing code.) His Github is online and may have some of the code. He used Matlab for some of the static analyses, but I don't believe for the real time control, such as the hexbugs or shark.

    Did you look at the link I gave earlier,


    I one case he monitored the amplitude in the FFT 'bins', then that (with some additional thresholding), triggered the output to the other serial port controlling the external hardware.

    Once your code detects the event threshold, you will have to program the non-OpenBCI Arduino to accept various 'commands', sent on the 2nd serial port. For example: "L1" might turn a light on. "L0" might turn it off. "Rf" might move the robot forward; "Rs" to stop, etc.
  • Thanks again- I did take a look at that link and Chip's Github and now realize that I need to download Processing and the according libraries in order to deploy code to carry out the FFT bins and then somehow send them to the Arduino? 
    As seen in notes:

    Am I going about this right? Or is the program meant to be deployed on some other piece of software?

    This seems like a hefty amount of work in terms of just lighting an LED with Alphawaves :p
  • Chip is using the technique described here: 
    https://spectrum.ieee.org/semiconductors/devices/the-first-mindcontrolled-vr-game-will-hit-arcades-in-2018

    The principle relies on the possibilty of close links in time ("evoked" in EEG terms) between what the eyes see and the brainwaves do. The occipital areas of the brain, the ones marked blue and green on the diagram below here:

    ...these areas put out a signal on EEG related to eyesight that may synchronize (produce a wave at the same frequency as) with a flashing picture that the EEG wearer is seeing.

    So you take those electrode signals from the O1 and O2 places on the head in the diagram and run it through a FFT function with parameters set to extract the amplitudes at the same Hz as the places that flash on the selection screen.

    More details in Chips' writeup, as wjcroft said.

    If you wanted to just light an LED, you might try overall amplitude at the FFT's 8-12 Hz band, since that goes up with closing eyes, so you could just control the light by opening and shutting eyes then. Not as fun though.

  • wjcroftwjcroft Mount Shasta, CA
    @Billh, hi.

    Chip did do some of his blog posts on SSVEP. That is what you've found. With others he was detecting various band activities, especially alpha. Many more ssvep threads here on the forum.


    William

  • @billh @wjcroft - thanks!
    I guess now the only thing I’m confused on is how to get the OpenBCI_GUI to communicate with the arduino.

    Do I somehow get the data on the arduino and put the FFT function onto the arduino program?
    Or does the GUI and built in FFT functions somehow communicate with the arduino program?

    Or am I completely off and there’s a different method?
  • wjcroftwjcroft Mount Shasta, CA
    No, you do all your signal processing on the laptop in the GUI. You will add some code to the GUI to do this. Since the GUI already is computing FFT bins, the type of alpha detection is fairly straightforward. You just keep rechecking the 10 hz bin value at regular intervals until it crosses a predetermined threshold. Can be static or dynamic threshold.

    Once threshold is achieved, you then send (your own devising), 'commands' to the Arduino, through the 2nd serial port. I mentioned previous post what some of these text command strings might look like. The Arduino reads the serial port and follows what it is being told to do. For example turning on/off a light, or moving the robot.

    Does that make sense?

  • edited February 2018
    That makes sense - I'm just not sure the method of how to add code to the GUI. 

    I've done quite a bit searching and keep finding different things - do I need to download another piece of software to add programs to the GUI(Processing)? Where is the place where I upload the code?

    Is there a link to a tutorial/someone's Github for how to add code to the GUI to do this(or anything related)?

    Thanks.
  • wjcroftwjcroft Mount Shasta, CA
    I think Chip has some example code, if you can find his Shark or Hexbug demo. "Where is the place where I upload the code?" No, I don't think you are understanding. You need to load the source of the GUI into the Processing IDE, and ADD YOUR OWN CODE to do the operations you want. For example, monitoring the FFT bin several times per second to see if it passes threshold. And if so, sending the text strings to the other serial port.


  • oh - I understand 
    For some reason I was thinking there was a different way to go about it without Processing. 

    Thanks for all your help - I'll let you know if I get stuck anywhere else.
Sign In or Register to comment.