Python library for Emotiv EEG

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.

22 thoughts on “Python library for Emotiv EEG

  1. 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!

  2. 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?

    1. 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.

  3. 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!

  4. 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.

  5. @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…

  6. 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.

  7. 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).

  8. 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.

  9. 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.

  10. 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.

  11. 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!

  12. 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?

  13. 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s