BCI part 6 – The Visualisation Software

Sep 9, 2014 | | Say something

In previous posts I have described how to modify the Mind Flex headset to give a wireless link to an Arduino running the brain-master library. Here I describe in more detail the data output from the TGAM1 module and how the Arduino is connected to the visualisation software to display the brain wave data.

A good explanation of the various values that are output from NeurSky’s TGAM1 module can be found in http://www.uninettunouniversity.net/allegati/1/CommonFiles/Eventi/it/30/705/Brain%20Computer%20Interface%20System.pdf , from page 20.

The TGAM1 module operates in one of two modes. Mode 1 operates at 9,600bps and gives out the following data:

Poor quality value 0 – 200

EEG bands value 3-byte integer x24 (see below)

Attention value 0 – 100

Meditation value 0 – 100

Mode 2, operates at 57,600 bps and in addition to the mode 1 outputs also provides a 10-bit raw eeg signal. Thus to get the raw eeg signal the baud rate must be changed to 57,600bps.

The TGAM1 breaks up an analyses the eeg signal in to eight frequency bands and outputs them as a sequence of unsigned integers (3 bytes) in order shown below, values are unit-less.

Delta    0.5 – 2.75 Hz

Theta    3.5 –6.75 Hz

Low alpha            7.5 – 9.25 Hz

High alpha            10 – 11.75 Hz

Low beta            13 – 16.75 Hz

High beta            18 – 29.75 Hz

Low gamma            31 – 39.75 Hz

Mid gamma            41 – 49.75 Hz

The Arduino UNO running the brain-master software takes the raw data via the wireless link and translates these in to a more useful format that in this case is used by the visualiser software to display the various bits of information. The rest of this post describes the software for visualising to brain wave data.

The Arduino needs to be plugged in to a host computer which for visualisation requires processing 2 software http://processing.org/ .

Also required is brain grapher https://github.com/kitschpatrol/BrainGrapher

You will probably need Java installed also, I’m not sure if this needs to be any particular version, Java VM exists on my laptop and at the end of these steps, it ran fine.

Download and unzip processing 2 and brain grapher.

Go to the processing 2 folder and launch ‘processing.exe’ after a while the screen will appear, on the file menu, select open and navigate to the folder containing brain grapher, you will see several files, select brain grapher, and open.

A new window will open, click the run button at the top left and shortly a chart display will appear. A useful feature is ‘Present’, clicking this runs the program (a sketch as it is called) in full screen mode like a presentation.

I had to change one in the program (sketch), the line that reads:

serial = new Serial(this, Serial.list()[0], 9600);

I needed to change the list entry number from [0] to [2], as this was the list number that COM5 appeared on my laptop.

I have not checked proper eeg, but holding the electrodes between fingers produced a graph, see below.

finger eeg1

In my next post I will explain something about the brainwave signals that are given by the TGAM1.

 

Posted in: Brain Control Interface

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>