Page 2 of 2
Re: Problem Connecting to Neurosky Mindwave
Posted: 25 Jan 2012, 13:00
by dinasherif
Thanks Giff and Giuseppe for your helpful posts!
Sorry for my late reply, but I posted this post long time ago and i stopped checking for replies until I found replies lately.
Anyway, Giff I downloaded the updated Neurosky module as you said, and fortunately it is working

I tried it out a number of times and it is connecting to the Mindwave and acquiring data ... I compared the old and new source files of the Neurosky modules and I don't find any significant difference except for the line: sleep(5000) near the end of the Neurosky::preflight() ..
Would you please tell me what was the problem exactly? I kept trying to debug it a lot and I thought at last there is a problem in the process() function, but I see you did not change anything in it, so what was the bug?
Another thing, I wanted to run the Neurosky source module with the P300 application module, so I called the following exe's in a batch file:
start NeuroSky.exe 127.0.0.1
start P3SignalProcessing.exe 127.0.0.1
start P3Speller.exe 127.0.0.1
Everything goes well, but the P300 matrix interface does NOT flash the letters when I press the start button, what could possibly be the problem? Can it be related to not configuring the parameters right?
Waiting for you reply and thanks,
-- Dina.
Re: Problem Connecting to Neurosky Mindwave
Posted: 26 Jan 2012, 13:08
by giuseppe
Now it works!!! Thanks a lot! Really thanks!
Bye Giuseppe
Re: Problem Connecting to Neurosky Mindwave
Posted: 26 Jan 2012, 14:10
by griffin.milsap
Glad to hear it guys!
Turns out that bci2000 was trying to connect to the device too quickly in succession which broke support for the mind wave. Waiting between reconnection between pre flight and initialize seems to fix this.
Also, Dina: be sure you have your flash timings set to an integer multiple of the block time. If you are trying to flash faster than you are clocking the system, the speller will round stimulus flash time to 0.
Hope that helps,
-Griff
Re: Problem Connecting to Neurosky Mindwave
Posted: 02 Feb 2012, 13:36
by giuseppe
----MY ERROR--------------------------
Unfortunately MindWave does not detect P300 stimulus, when I'm trying to analyze datas using Matlab Offline Analysis I get the following error:
Code: Select all
Evaluation of target condition 1 in conjunction with the trial change condition resulted in fewer than 3 usable trials. Please relax your conditions.
-----------------------------------------
Thanks for all your support
-Giuseppe
Re: Problem Connecting to Neurosky Mindwave
Posted: 02 Feb 2012, 14:09
by mellinger
When you get this error message, OfflineAnalysis has not looked at the actual EEG signals yet, so it is not related to NeuroSky hardware in any way. This message just means that there is something wrong either with the way you recorded your data, or with the conditions you entered into the OfflineAnalysis GUI.
Please follow the BCI2000 P300 tutorial in order to try P300 classification. It is located at
http://www.bci2000.org/wiki/index.php/U ... I_Tutorial.
Regards,
Juergen
Re: Problem Connecting to Neurosky Mindwave
Posted: 07 Feb 2012, 08:46
by griffin.milsap
Another problem I've seen is that the Neurosky ThinkGear SDK provides rather poor timing with regards to jitter. The module simply pulls data (sample by sample) from the SDK because it allows for this. The SDK gives no clear indication as to what the internal sample block size is (if there is one) and seems to have very poor timing.
This could be why you were unable to find any sort of P300 response.
-Griff
Re: Problem Connecting to Neurosky Mindwave
Posted: 12 Feb 2012, 09:47
by giuseppe
Re: Problem Connecting to Neurosky Mindwave
Posted: 14 Feb 2012, 11:14
by griffin.milsap
Interesting how it shows up so clearly, yet the r^2 is so low. Where did you place the sensor?
I'm honestly surprised that you were able to get that much out of it with the system timing as poor as it is. I'd be willing to bet that your signal quality issues come from the poor timing presented by the ThinkGear API. I'd also be willing to bet that if someone were to get into contact with the NeuroSky guys, we could find out what their API's internal sample block size is and fix the timing issue.
I'll do some quick research and shoot around a few emails.
-Griff
Re: Problem Connecting to Neurosky Mindwave
Posted: 15 Feb 2012, 03:52
by giuseppe
I've put on the headset on the standard mode, sensor placed on the frontal left side, and set block size to 8, I think that the differences between the two tests come from a little different position of the headset. I also tried to put the sensor on the occipital zone, but the results are worst.
About sample block size I only know that Raw data are sent 512 times per second, don't know if this can help...
Thank's for your help!
Re: Problem Connecting to Neurosky Mindwave
Posted: 15 Feb 2012, 10:20
by mellinger
Hi Giuseppe,
please read this page on the P300 response:
http://www.bci2000.org/wiki/index.php/U ... 0_Response
In short, for measuring a P300 you need electrodes at a central and maybe slightly occipital position, as suggested by the figure on the wiki page.
Also, when you say that you placed "the sensor", it appears that you didn't take the reference electrode into account. To measure EEG responses, you need (1) a ground electrode, which is typically attached to the ear lobe or the place called "mastoid" behind the ear, (2) a reference electrode, which may be attached to the other ear lobe, and (3) an electrode located at a certain position, e.g. Cz. How ground and reference electrode are implemented in the Neurosky headset I don't know, but it is important that you understand that the signal is measured as the difference between an electrode and the reference electrode, so the placement of the reference electrode determines the signal to the same extent as the placement of the "actual" electrode. When using multiple electrodes, the influence of the reference electrode can be removed by a Common Average Reference (CAR) filter, but this is not possible with only a single electrode.
Best,
Juergen
Re: Problem Connecting to Neurosky Mindwave
Posted: 25 Mar 2012, 17:24
by giuseppe
Hi, sorry if I'm still wasting your time, I'm trying to understand which value has to be put on sample block size, MindWave RAW Data is 16 bit, and it is sent 512 times in a second. Sample block size 16 is so correct?
Thanks,
giuseppe
Re: Problem Connecting to Neurosky Mindwave
Posted: 26 Mar 2012, 14:08
by griffin.milsap
Giuseppe,
The sample block size relates to how often you clock the BCI2000 system. Each sample block corresponds to a run from source module -> through signal processing -> to application module. There is a certain amount of overhead with going through this pipeline, and pushing one sample through it at a time, 512 times per second, is pretty difficult to achieve, even on a modern computer.
BCI2000 groups together a number of samples into a SampleBlock, which is then sent through the system. The SampleBlockSize is a user-definable parameter. In your case, since your acquisition is occurring at 512 samples per second, I would recommend a sample block size of 16. This means that you can process your 512 samples per second by pushing blocks of 16 samples through the system. This would mean that you are pushing 32 blocks per second through the system. Processing larger blocks of samples per system clock reduces the amount of system overhead.
When picking a sample block size, just keep in mind that if a sample (block) cannot travel through the system in the time it takes to acquire the next sample (block), the system gets backed up and will crash.
-Griff
Re: Problem Connecting to Neurosky Mindwave
Posted: 18 Feb 2013, 22:22
by derekja
Guiseppe, could you tell me a bit more about how you performed your offline analysis?
I'm able now to run the P3speller application with my neurosky mindwave, but am still very much learning how to analyze the data.
Griffin - thanks for the explanation of block size. That does seem to reduce system load.
Mellinger - I believe that both the ground and the reference are on the earclip. There are two wires to the earclip feeding electrodes on opposite sides of the earlobe, anyway. Also, I've been reversing the headset (with some gel to go through my very short hair) so that the electrode is placed at about P4 in the 10-20 system.
Has anyone successfully and reliably accomplished any ERP detection protocol with the mindwave mobile? I'm assuming the P300 is the easiest to go after...
Thanks,
--Derek