Skip to main content

NeuroFly Toolkit

This tutorial will show you how to control a joystick using EMG data with the OpenBCI GUI. You can then use this customizable, muscle-activated joystick for any purpose of your choosing! OpenBCI used this to control a drone in the 2023 OpenBCI TED Talk.


Register for updates here. More information coming soon!

Materials Required

  1. OpenBCI Cyton Board
  2. Skintact sticky electrodes or IDUN Dryode
  3. EMG/ECG Snap Electrode Cables
  4. Computer with downloaded OpenBCI GUI

Step 1: Hardware Assembly

Follow the EMG Getting Started tutorial to connect the electrodes to your body and the Cyton board. We will read data from the Cyton using the OpenBCI GUI. For this tutorial, you will need to connect up to four channels. The number of channels depends on how many degrees of freedom are needed. Four channels will enable control of both positive and negative X/Y directions of the joystick. Only one ground is needed.

Here is a mapping of channel numbers to X/Y joystick directions:

1- X (left)
2+ X (right)
3+ Y (up)
4- Y (down)

The most complex part of this tutorial will be finding the right placement for each pair of electrodes. It is important to find the muscle locations that are the easiest for the user to precisely control. You may need to play around with different locations before finding your optimal electrode setup.

Step 2: GUI Setup

Start by streaming data using the GUI. Follow this getting started tutorial to get the board streaming. You will need to open the EMG Joystick and EMG Settings widgets.

EMG Settings

This widget contains the tuneable parameters used for the threshold algorithm that determines how active each channel is. The output value is a normalized value, from 0 to 1, mapped between the lower threshold and upper threshold.

EMG Settings Screenshot

SmoothControls how many seconds of data to average over. This reduces the effect of outliers in the dataset.
uV LimitUpper limit for the EMG signal.
Creep+Adjustment speed for upper threshold. How fast it should decrease if not triggered.
Creep-Adjustment speed for lower threshold. How fast it should increase if not triggered.
Min ฮ”uVMinimum difference allowed between upper and lower thresholds.
Low LimitMinimum lower threshold allowed.

A further description of these parameters can be found on the GUI Widgets options page.

EMG Joystick Widget

This widget has an indicator that moves in the direction of the activated EMG channels. This visualization should be used in combination with the EMG settings to find your ideal EMG joystick setup.

EMG Joystick Screenshot

Step 3: Stream Data Using Networking Widget

Follow the Networking Tutorial to learn how to stream data using UDP from the GUI. For this project, you will need to stream the EMG channel data from the Networking Widget. Your Networking settings should look as follows:

UDP Networking Widget Screenshot

Once your UDP stream is running, you will be able to use this EMG joystick for any use case! We are excited to see how our global Community uses this widget to create awesome projects and research!