MindFlex demystified

Heyo guys,

this is my last ultimate hack for the mindflex. I wanted to reproduced the results of the mindflex as indicated by the manufacturer.The simplest test that can be done with an EEG device is to check if the alpha waves go up significantly when closing your eyes.

However doing some test with different subjects (i.e. my guinea pig students/friends) and with or without electrogel I couldn’t find any prove that the neurosky chip is working properly.
I will be happy if somebody can reproduce a high alpha activity with closed eyes.
I could only see some random peaks in the alpha activity during closed eyes which were not stable.
So here the instructions for 2 configurations that can be used to log the data and save it to a CSV file.

So you take out of the shell 3 wires: black is the GND, blue is the Vcc=3.3V and white is the TTL signal at 9600 bauds.
I made 2 possible configurations one which uses a BUB board (based on the FT232 chip) to read the EEG raw data

stream directly to the computer and one which uses a xbee transmitter and an xbee receiver.

As I said before I totally desoldered the original radio modem that was on the main board inside, as in Figure.

What can I do with that? I have no idea! :-p

Serial configuration

The first configuration is the most dangerous one since you are connected to your
computer via the usb without any opto-isolation so DO IT AT YOUR OWN RISK.

Make sure you put the jumper of the BUB board over the 3.3 V level,
the black wires goes to GND, the white wire goes to the RX pin and the blue wire is not required because we don’t need the 3.3 Vdd, so I just put it on an unused pin of the bub board.

XBee configuration

The second configuration is more interesting because uses a pair of xbee modules to send the eeg data over the air, thus avoiding electrocuting yourself for some hardware faults.

The xbee connected to the MindFlex should be configured in this mode:

  • ZNET 2.5 ROUTER/END DEVICE AT
  • PAN ID 1AAA as the one in the Xbee host receiver
  • DH-DL as the SH SL of the Xbee host receiver
  • PL power level: 2 MEDIUM
  • SERIAL INTERFACING is the most important:
  • Set the BAUD Rate to 9600 with NP no parity
The xbee connected to the computer (host receiver):
  • ZNET 2.5 COORDINATOR AT
  • PAN ID 1AAA as Xbee sender
  • SERIAL INTERFACING is the most important:
  • Set the BAUD Rate to 9600 with NP no parity
This is the final integration, I used an Xbee breakout board and drilled a raw of holes to fit the pins.
Now the next thing is to parse the data coming from the serial port,
to do so we use a software coded by EricMika and Spiffomatic.
The code is written for the Processing environment and I have compiled
and put the source codes in the zip file provided.
This is my stable alpha activity during opened eyes which doesn’t differ much from the closed eyes condition!

Wave exporter

The export saves in CSV format.
For the open eye condition: UP arrow start recording, DOWN arrow stop recording
For the closed eye condition: LEFT arrow start recording, RIGHT arrow stop recording
File are saved in the same folder, you can then import them in Matlab and plot.

Conclusion

The opened and closed eye condition does not discriminate in the alpha band.
Elettrogel does not improve the condition.
Even flipping the MindFlex so that the electrode is touching your backhead (close to the visual cortex) does not improve the discrimination.
The problem of all consumer EEGs is the connection between scalp and amplifier. When measuring EEG in the lab there is quite a lot of effort going into making proper contact with each and every electrode each and every time by measuring impedance and carefully preparing each electrode.

The problem with EEG in general is the inherently bad SNR. If you have no properly connected (Ag/AgCl) electrodes, you’re not gonna get reliable signals, period. The voltage is so small, the DC polarization alone you get with mindflex electrodes might be several hundred times the signal and probably contains huge amounts of AC noise, too.

However I expected something more from the Neurosky guys because their marketing in terms of benchmarking is quite aggressive …. There’s is something going on in the toy but is not really really stable!

If you don’t trust me you can do the following, download these 2 CSV files containing the condition with opened eyes and closed eyes and try to determine which number is the open and which one is the closed.

The best thing I could get off the mindflex was this run where, yes there are spikes of alpha activities but they are not stable considering I had my eyes closed all the time!

I have produced the graph by using a simple matlab script:

% After importing plots the eeg bands

function plotbands(data1,data2)

tstamp=data1(:,1)./1000;

signalquality=data1(:,2);

attention=data1(:,3);

meditation=data1(:,4);

delta=data1(:,5);

theta=data1(:,6);

lowalpha=data1(:,7);

highalpha=data1(:,8);

lowbeta=data1(:,9);

highbeta=data1(:,10);

lowgamma=data1(:,11);

highgamma=data1(:,12);

hold on

plot(lowalpha,’LineWidth’,2,’Color’,'red’);

plot(data2(:,7),’LineWidth’,2,’Color’,'black’);

xlabel(’Sample’);

ylabel(’EEG value’);

legend(’Closed’,'Open’);

title(’Low Alpha wave comparison’);

end

Download the software Procesing Brain Grapher

Some cool pictures during my tests:

Leave a Reply

You must be logged in to post a comment.