Data acquisition module for Emotiv EPOC

Forum for software developers to discuss BCI2000 software development
Locked
sc
Posts: 6
Joined: 24 Feb 2010, 03:53

Data acquisition module for Emotiv EPOC

Post by sc » 24 Feb 2010, 04:52

Has anyone investigated the recently-released "EPOC" EEG headset from Emotiv regards feature capability and compatibility with BCI2000?

While the product literature is aimed at consumer-grade uses such as gaming and their development licensing is arranged around a proprietary "App Store" model (complete with hardware DRM), there exists a "research edition" which offers access to the raw EEG signals.

The hardware consists of 16 dry electrodes (14 active and 2 for reference/ground) and uses normal contact lens saline solution for conductivity. The folks on the OpenEEG mailing list have dissected a unit and posted specific details in a recent discussion found in this thread.

Personally, I come from a software background and am still picking up the neuroscience, electronics, and signal processing education. However producing a data acquisition module for the Emotiv EPOC for use with BCI2000, using documentation and existing code for other ADCs as reference material does not feel out of reach and upgrading from an Emotiv developer license to the research version is not beyond my means.

So far I have produced an Open Source (GPLv2) suite of tools for using the Emotiv EPOC to control and steer a basic robot built from LEGO Mindstorms, with a target audience of teachers and students. That project, "Puzzlebox Brainstorms" is online here for anyone curious.

However I am quite frustrated by the "black box" nature of Emotiv's toolset, and considering the wealth of knowledge available as published research, on the excellent BCI2000 wiki, and even Wikipedia, I would much rather see an open development platform such as BCI2000 become established as the de-facto target for the burgeoning BCI industry, especially now as more complex gear is entering the price-range of the amateur/hobbyist market.

Again, I would be most appreciative if anyone more knowledgeable on the hardware side or coming from a neuroscience perspective would care to comment on the Emotiv EPOC hardware's potential for use with BCI2000 in general, or specifically for "armchair" research projects targetting areas such as P300 detection.

Or for that matter if anyone would be interested in collaborating on developing a data acquisition module for the Emotiv EPOC to work with BCI2000 please don't hesitate to contact me directly.


Cheers

Steve Castellotti

mellinger
Posts: 1163
Joined: 12 Feb 2003, 11:06

Post by mellinger » 26 Feb 2010, 12:50

Steve,

quite probably, the EPOC EEG headset can be connected to BCI2000 by writing an appropriate source module.

As a down side, the electrode locations provided by the headset do not fit well with the BCI paradigms utilized by BCI2000's out-of-the-box configurations. As visible at http://www.emotiv.com/apps/applications/119/766, the headset provides electrodes on the forehead and at the side of the head, but not centrally/occipitally (as required for a P300 experiment), and not above motor areas either (as required for a mu rhythm experiment).

Still, the EPOC headset provides amazingly cheap EEG equipment, and might cover more brain areas in the future. We will be more than glad to assist you in writing a BCI2000 source module that connects to it!

Regards,
Juergen

griffin.milsap
Posts: 58
Joined: 08 Jun 2009, 12:42

Possibilities

Post by griffin.milsap » 26 Feb 2010, 14:08

Actually, Dr. Schalk has been talking with me about implementing the device as a BCI2000 Source module. The only hurdle to overcome is to actually get a device and an SDK for it. I'll need to verify that the SDK is set up in a way such that BCI2000 can easily interface with the device, and it'll take a week or two for integration and testing.

He's told me that we might have a lead on getting the device. I'm excited!

Of course, its a bit more of a toy than the medical amplifiers we support, but it could open up BCI2000 to a wider user base!

I'll keep you updated as I get new information.

-Griff

sc
Posts: 6
Joined: 24 Feb 2010, 03:53

Re: Possibilities

Post by sc » 26 Feb 2010, 19:42

griffin.milsap wrote:Actually, Dr. Schalk has been talking with me about implementing the device as a BCI2000 Source module. The only hurdle to overcome is to actually get a device and an SDK for it. I'll need to verify that the SDK is set up in a way such that BCI2000 can easily interface with the device, and it'll take a week or two for integration and testing.

He's told me that we might have a lead on getting the device. I'm excited!
That's excellent news!

I've applied for a license to access the BCI2000 code and would be very interested to help or contribute in any way I can.

Unfortunately Emotiv don't make their API documentation available until the SDK license is actually purchased. I only have a "Developer" license at this point so I don't have access to the raw EEG API and can't comment much in that regard.

The documentation I do have is reasonable and includes a few sets of sample code which are helpful. I've found Emotiv to be very responsive on their own forums and would recommend seeking any direct aid necessary through there. They came back with a lengthy and well-reasoned response within a day when I was putting questions regards compatability with Open Source licensing.

Some of that might affect you as well actually, you can read their full response here: forum link

You will at least need the "Research" SDK for the actual development, but depending on Emotiv's stance may require an order-of-magnitude more expensive license to freely distribute compiled binaries. Part of the problem is hardware DRM restrictions against the physical signal which require building against their SDK to access.

That said it would certainly be worth a discussion with Emotiv, in only informally.

griffin.milsap wrote:Of course, its a bit more of a toy than the medical amplifiers we support, but it could open up BCI2000 to a wider user base!
The quality of signal and resulting usefulness of the hardware toward a "pure" research setting will likely be limited, but I think the true benefit will be placing access to basic EEG hardware in the reach of developers, engineers, and designers whose expertise may not lie in neuroscience specifically, but their skills in areas such as algorithm efficiency, signal processing, and user interface stand a chance of flowing back to the scientific, medical, and related communities in a meaningful way.

BCI is clearly cutting edge technology, and that attracts interest from a wide variety of perspectives.

Some of that interest will clearly be based on misconceptions. CNN's "Situation Room" aired a report earlier this month in which they discussed NeuroSky's single-sensor EEG hardware, and bizarrely felt it was necessary to interview someone from the Heritage Foundation about the terrorist implications of setting things on fire with the mind (full transcript here). Interestingly the same program incorporated BCI2000 in the second half of the report (transcript here).

But in any case consumer-grade hardware is the next step for BCI to tap into existing mechanisms for innovation, investment, and development in directions which may not have been considered previously.

Or to put it another way: Brains are sexy

(c:

griffin.milsap wrote:I'll keep you updated as I get new information.
Please do, and as before, let me know if there's anything I can do to help.


Cheers

Steve Castellotti

sc
Posts: 6
Joined: 24 Feb 2010, 03:53

Post by sc » 28 Feb 2010, 20:31

mellinger wrote:As a down side, the electrode locations provided by the headset do not fit well with the BCI paradigms utilized by BCI2000's out-of-the-box configurations. As visible at http://www.emotiv.com/apps/applications/119/766, the headset provides electrodes on the forehead and at the side of the head, but not centrally/occipitally (as required for a P300 experiment), and not above motor areas either (as required for a mu rhythm experiment).


I was wondering about that.

From the Emotiv site, the EPOC covers the following 10-20 points:

AF3, F7, F3, FC5, T7, P7, O1, O2, P8, T8, FC6, F4, F8, AF4.


Whereas both the BCI2000 tutorials for P300 and mu rhythm use these electrode locations as examples:

F3 F4 T7 C3 Cz C4 T8 Pz


..so I would assume that C3, Cz, and C4 would be the key signals missing.


That's a shame and a bit confusing as during the design phase their hardware engineers would have almost certainly been aware of the "Control of a two-dimensional movement signal by a noninvasive brain-computer interface in humans" paper from back in 2004 (also out of Wadsworth) and similar research, which is directly related to the kinds of activities they are trying to promote with their "Cognitiv" BCI control. That document even specifically mentions the C3 and C4 electrodes.

There's an awful lot of uninformed guesswork going on in the Emotiv forums, and from personal experience can testify to having trouble controlling more than two directions without resorting to "cheating" via facial muscle contractions (raising either or both eyebrows, clenching teeth, blinking, and so on).

mellinger wrote:Still, the EPOC headset provides amazingly cheap EEG equipment, and might cover more brain areas in the future. We will be more than glad to assist you in writing a BCI2000 source module that connects to it!
Terrific!

It sounds like work is already either intended or underway, and as soon as I have access to the BCI2000 source code I'm looking forward to jumping in and collaborating as best I can.


Cheers

Steve Castellotti

sc
Posts: 6
Joined: 24 Feb 2010, 03:53

EPOC hardware design decisions

Post by sc » 01 Mar 2010, 03:45

sc wrote:That's a shame and a bit confusing as during the design phase their hardware engineers would have almost certainly been aware of the "Control of a two-dimensional movement signal by a noninvasive brain-computer interface in humans" paper from back in 2004 (also out of Wadsworth) and similar research, which is directly related to the kinds of activities they are trying to promote with their "Cognitiv" BCI control. That document even specifically mentions the C3 and C4 electrodes.
So I asked the Emotiv folks, "Can anyone comment on design decisions around the placement of electrodes found on the production EPOC headset?" in their forum, here.

One of their employees responded within two hours (which is pretty great turn-around time!):

"the key part of the answer is that we found no advantage to including those locations as actual sensors. C3 and C4 are also pretty tough to get to with a lightweight, simple wrap-around headset such as we offer. The purpose of the EPOC is to do the best possible BCI job with the least difficulty in fitting for the average consumer, who does not want to mess around with straps and adjustments - and these were found to be necessary to access the top-sides of the head on all comers. The mechanical challenge is too big for the payoff - C3 and C4 tend to push the headset off the top of large heads and are a bugger to fit to small heads. Simple as that!"

...with some more background information in their original reply, here.

They haven't yet gotten around to the second question, "Can anyone provide suggestions on research projects and published material which focus on the sensors the EPOC does provide?" though I would hope for a follow up response shortly, and of course can do a lot of that research independently.

Still rather unfortunate news regards P300 and mu rhythm experimenting, but I am still quite enthused about the opportunity to at least learn and become more familiar with EEG hardware and software in a general sense, and feel this particular equipment makes for excellent "low hanging fruit" in that respect.


Cheers

Steve Castellotti

griffin.milsap
Posts: 58
Joined: 08 Jun 2009, 12:42

Module Done

Post by griffin.milsap » 29 Jun 2010, 14:53

Hey Steve,

I've just finished a first draft of an Emotiv source module for BCI2000. It is functioning adequately and has pretty good performance. I was able to successfully use it with our P3Speller to spell words with around 75% accuracy.

Documentation can be found here. http://www.bci2000.org/wiki/index.php/C ... ons:Emotiv

Have fun!

-Griff

sc
Posts: 6
Joined: 24 Feb 2010, 03:53

Re: Module Done

Post by sc » 30 Jun 2010, 03:11

griffin.milsap wrote:I've just finished a first draft of an Emotiv source module for BCI2000. It is functioning adequately and has pretty good performance. I was able to successfully use it with our P3Speller to spell words with around 75% accuracy.

Documentation can be found here. http://www.bci2000.org/wiki/index.php/C ... ons:Emotiv
Wow Griff, this sounds great!

75% accuracy about matches what is described in this paper out of Dartmouth College which also used an Emotiv headet for P300:

http://sensorlab.cs.dartmouth.edu/pubs/neurophone.pdf

I am approached the tail end of my own release cycle this week, but should have time to try out your module after the holiday weekend. I will certainly report back how things go.

Thanks again for the time and effort!


Cheers

Steve

sc
Posts: 6
Joined: 24 Feb 2010, 03:53

Re: Module Done

Post by sc » 12 Jul 2010, 05:50

griffin.milsap wrote:I've just finished a first draft of an Emotiv source module for BCI2000. It is functioning adequately and has pretty good performance. I was able to successfully use it with our P3Speller to spell words with around 75% accuracy.

Documentation can be found here. http://www.bci2000.org/wiki/index.php/C ... ons:Emotiv
Griff-

Finally cleared enough time to sit down and have a look.

A few (hopefully) quick questions:

The build instructions for BCI2000 state Borland C++ Builder 6 (or later) is required to build the sources from SVN, but as your wiki document points out, only Visual Studio libraries are available for the Emotiv API.

Is the correct procedure to build BCI2000 using BCB, then build the Emotiv input module against the result by pointing CMake (from www.cmake.org) at the CMakeLists.txt file and telling it to use the Visual Studio 9 2008 build system when generating files?

Is there any way to get up and running without purchasing BCB? I have Microsoft Visual C++ 2008 Express Edition installed, which should cover the Emotiv side and would like avoid purchasing a the BCB compiler if I can get away with it.


Since most of the files listed in the CMakeLists.txt file were present in a SVN checkout of BCI2000 I did have a quick go at building using what I have on hand and got a complaint:

No cmake_minimum_required command is present. A line of code such as
cmake_minimum_required(VERSION 2.6)
should be added at the top of the file

And so I added one, then getting
"Unknown CMake command 'BCI2000_ADD_SIGNAL_SOURCE_MODULE'"


My apologies if these questions are fairly basic. If you (or anyone else) could please confirm if I will need a copy Borland C++ Builder 6 (or any additional tools) before I will be able to proceed that would be a big help. Likewise if there are any additional wiki pages I should be reading that would be good to know also.


Thanks again for your time and efforts!

Steve

mellinger
Posts: 1163
Joined: 12 Feb 2003, 11:06

Post by mellinger » 15 Jul 2010, 09:51

You don't need BCB to build BCI2000 v3. For information on how to build BCI2000 using Visual Studio, see
http://www.bci2000.org/wiki/index.php/P ... ild_System

HTH,
Juergen

davidvanovereem
Posts: 1
Joined: 04 Oct 2012, 10:28

Re: Data acquisition module for Emotiv EPOC

Post by davidvanovereem » 10 Jan 2013, 08:25

Hi Juergen, Griff and Steve;

I am David from the Netherlands, as new to bci2000 as to this forum.
Together with two fellow students we are setting up a neurofeedback system for people with Alzheimers.
The idea of the system is to give a positive respons when someone's Theta-coherence in F3 P3 goes up.

We got our hands on an Emotiv Epoc (and SDK), and we believe our desired system is impossible to create in Emotiv's own software (please correct me if I'm wrong), so we'd like to use bci2000.

I can read you have succesfully managed to use BCI2000 in combination with the EPOC, but unfortunately, due to my lack of programming-skills or experience with BCI2000, we don't understand how to implement the ADC

(the bci2000 wiki won't help much either)..

For instance, what/where is the source module?
Shouldn't the be an executable?
Etc..

Could one of you please help us setting up the epoc with bci2000? We don't know what to start with at all..
We would very, very much appreciate it!

Kind regards,

David

mellinger
Posts: 1163
Joined: 12 Feb 2003, 11:06

Re: Data acquisition module for Emotiv EPOC

Post by mellinger » 10 Jan 2013, 14:42

Hi,

the Epoc source module is contained in the BCI2000Contrib distribution, not in the BCI2000 core distribution. Please go to
http://www.bci2000.org/wiki/index.php/B ... buted_Code
in order to download the contrib distribution.

Then, follow the setup steps described at
http://www.bci2000.org/wiki/index.php/C ... rce_Module

Let me know if you have further questions.

Regards,
Juergen

Locked

Who is online

Users browsing this forum: Google [Bot] and 3 guests