Skip to content

An Introduction to Brain Computer Interfacing in a workshop format

License

Notifications You must be signed in to change notification settings

Union-Neurotech/Intro2BCI_Workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Intro2BCI_Workshop

An Introduction to Brain Computer Interfacing in a workshop format

Introduction

The following is a basic instructional towards integrating a simple Brain Computer Interface with external hardware.

For this workshop you will need:

Hardware:

Software

Setting Up

Setting up arduino

  1. Install the required software listed above for your device version
  2. Open the code located in arduino_code/BCI_StateMachine.ino with the Arduino IDE
  3. Plug in your Arduino and upload the code. Follow this tutorial for troubleshooting.

Linking hardware to arduino

  1. Wire the relay up to the arduino as according to this tutorial. Make sure the data pin on the relay is connected to pin 12 on the arduino.

  2. Separate the cables of the lamp base. (Exercise caution and make sure lamp base is unplugged) Using a wire stripper, cut one of the cords and strip some of the coating so that just enough metal is exposed to attatch to the relay.

  3. Wire ends of the lamp cord to the relay. One should go through NO for Normally Open and the other should be wired to COM.

  4. [Optional] Wire the LED to the arduino. Make sure the jumper from pin 3 goes to a roughly 220 Ohm resistor that connects to the positive connector for the LED. The negative end should be wired to GND on the arduino.

  5. You should be able to evaluate that this setup works even without plugging in the lamp base to an outlet. This can be accomplished by uncommenting the segment under '// For communciating over serial command using "1" and "0" as a manner of debugging functionality' in the arduino code and commenting the lines above it underneath '// For communicating with OpenBCI'

Linking to OpenBCI

  1. With the arduino setup, open the OpenBCI GUI and attatch electrodes and connectors according to the 'getting started' section of OpenBCI for your respective board.

  2. With the OpenBCI GUI open the focus widget. Toggle it for focus by using the Metric dropdown. You can play around with classifiers / thresholds / windows (the amount of seconds data considered for an estimation of brain state) to see what works best.

  3. In another box of the GUI, select the dropdown and find the Networking Widget. Select Serial and from the drop downs, select focus as the data type, and for the serial port select the same port that your arduino is connected to.

  4. Try consciously focusing and seeing how this affects the focus widget. It may takes some tweaking of thresholds and other parameters to get a configuration that works for each user.

Usage

With everything linked up, ensure that:

  • The lamp on the arduino setup is linked to a wall outlet with the only disconnection being the relay.
  • The OpenBCI is connected to you whatever electrodes you have hooked up and is actively streaming.
  • The arduino is connected to a USB port.
  • A Focus Widget and Networking Widget are open and Serial is selected in the networking widget with a stream started. If the setup is connected the arduino correctly and actively streaming data, you should see a constantly blinking light on the arduino indicating it is recieving data.
  • From here you should be able to properly control the state of the light bulb by concentrating!

About

An Introduction to Brain Computer Interfacing in a workshop format

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages