Want to control things with your mind? The Emotiv EPOCH EEG is one of the best pieces of hardware you can get that is ready to be hacked into your project. Too bad the entry-level SDK will set you back $500. Or you can take advantage of [Cody Brocious’] work by using his Emotiv Python Library. He sniffed around the data coming in over the USB connection and discovered that it’s encrypted. With a bit of trickery he extracted the key and built the 128-aes decryption routine into his package. So far this just pulls raw data from the unit so it’s up to you to figure out how to properly filter the signals and differentiate which sensor corresponds to each data stream. But it’s a start, and hopefully it’ll lead to more mind controlled doo-dads.
23 thoughts on “Python Library For Emotiv EEG”
Leave a Reply
Please be kind and respectful to help make the comments section excellent. (Comment Policy)
Nice! Although I still have to be convinced that the EPOC is any good.
There is great open-source EEG hardware out there (openeeg.sf.net or something) to work with!
Uhh, cool but that’s against the DMCA given that he needed to break some encryption, right? So, it’s likely to get pulled soon?
Uhm, isn’t there an exception for interoperability? Little late, but the dumb thing is to encourage potential customers to just create homemade clones since while you can block sales of clones, you can’t prevent people from making themselves. You can’t seize a shipment of schematics.
Love these headsets! Saw them on Prototype this, they used them to control access to the accelerators of their remote derby cars. They had to stay calm and focus on a though of ‘go’ to accel. Pretty cool stuff!
Found a link to the show!
Enjoy,
http://dsc.discovery.com/videos/prototype-this-mind-controlled-car.html
Lol, I was really excited about the epoc for a long time, but when I finally got it I found it was so crippled by software that it’s basically useless. Emotiv’s forums were inundated by people who wanted access to the raw EEG feeds without paying $20K for the research license. IIRC the price was dropped significantly, but they still wanted too much $$$ for a trivial software plugin. I understand the need for emotiv to make money, especially given how long they delayed it, but it seems they’ve taken it too far. The full realization of this came when I noticed that they wanted to distribute applications for the Epoc through an iTunes-esque app store… which is of course, as a middleman, the easiest way to make money without really doing anything.
@andrew – DMCA is only USA relevant. I hope the creator of the library isn’t in the US, or hosting it on US computers. This deserves to get out to the people who will use it. This totally sucks, because I’m American, and urging people to take cool tech off-shore, to protect it…
@andrew
i believe the DMCA was changed due to the current influx of ipod jailbreaking. If you aren’t getting any money from it, you can do it. They also changed that you can use movie clips in documentaries as long as you aren’t making money from it.
http://www.loc.gov/today/pr/2010/10-169.html
Being that the DMCA protects against decrypting copyrighted data, would that imply that your raw EEG data is copyrighted?
This is very cool =D. I’m currently involved in a Open-source EEg-project for Neuro-Cognitive research which involves getting epoc-like Brain-Machine-interfacing. The software will interpret raw eeg-data so it will also work for the epoc. If anyone wants to collaborate, e-mail me at onwijzebackup@gmail.com, I’m sure we can do some cool stuff.
We just did a full interview with the developer:
http://hplusmagazine.com/editors-blog/emotiv-epoc-eeg-headset-hacked
Great hack, would like to see more like this.
These guys need to watch Pitchmen.
Lower price = bigger market.
That’s cool.
If anyone is interested in EEG more generally, and not just using the Emotiv headset, there’s already an open source EEG project. This is probably what CogScientist was thinking of.
OpenEEG
http://openeeg.sourceforge.net/doc/
That’s very cool. I’ve a big interest in what can be done with consumer grade EEG hardware.
For anybody else that’s interested in an alternative to the emotiv epoc, there’s the kt88-1016. I bought one recently, there’s some snags with it though: 1. The software with it is crap, 2. It only samples at 100hz meaning unless you put in the effort to get low impedance signals you’ll see an aliased 50hz component from the powerlines… Besides that it is fine, and I’ve been recording with it using silver/silver-chloride electrodes and 10-20 paste.
It seems to provide relatively clean signal (i.e. I can see clean closed eye alpha potentials).
There’s a larger discussion about it here: http://engineuring.wordpress.com/2009/06/15/writing-your-own-soft-for-a-really-cheap-eeg-hardware-for-brain-computer-interfacing/
The data format coming from the device is as described in that article, she provides c++ code… I wrote my decoder + graphing stuff in python though (if anybody wants).
Oh, very interesting hack! But from the raw traces he shows on his site, it is clear that the hardware is shit. Some channels seem to have only noise or far too low bit depth and other channels are just clipping and saturating because of bad electrode contact. This is nowhere near a real EEG. EMG maybe, but vertainly not good quality EEG.
For the record, steeve, the rendering shown in the announcement is simply graphing each byte of the hid report and is in no way indicative of the signal quality. It’s simply for debugging.
I don’t think DMCA forbids this, as this is for interoperability *and* isn’t used for breaking copyright.
i was looking into using a relatively simple method of varying the frequency on an LM567 VCO, but referencing all the electrodes from a single large ground electrode so in theory the noise should be minimised.
Also as frequency variations are being used a simple WAV recorder could capture all the signals for later processing, with no annoying wires.
another worthwhile hack is to exploit the amplifying potential of some recent MOSFETs, there was a circuit in Electronics World using a single off the shelf mosfet and 10M resistors to achieve gains near 5000 at a bandwidth of a few hundred Hz, ideal for the previously mentioned V-F converter.
I have an epoc and the sdk. It is a complete waste of money. The unit picks up twiches from muscles around the head and eyes. Making a car move forward and back is about all the epoc can do. An accelermoter and giro on your head would provide better results!
Hack all you like, it is a total waste of money!
Hello, does anyone know the real difference between a EMOTIV EPOC headset and an EMOTIV EEG headset except from a SDK point of view? Does it make the hack to get raw signals any different?
How can I extract data from the Emotiv EPOC and what programming language can I use to interpret the data? What are the things I can use it to control? Pls, help me out.
can anyone help me in using emotive insight