10
Emotiv Epoc - e unofficial documentation -

Emotiv Epoc - STEPHANE ADAM-GARNIERstephaneadamgarnier.com/.../StephaneAG__EmotivEpocDoc.pdf · 2014-11-19 · Intro Officially available informations on the Emotiv Epoc headset The

  • Upload
    others

  • View
    9

  • Download
    1

Embed Size (px)

Citation preview

Emotiv Epoc- The unofficial documentation -

Intro

Officially available informations on the Emotiv Epoc headset

The current document aims to provide informations found while diggin’ the web or by experi-menting / reverse-engineering available software & hardware resources.

Thus, there may be outdated / missing informations, but all the ones found & exposed in the fol-lowing lines are verified or in testing / waiting an implementation when I write these lines ( 2014 , august 26 ).

Also, the current document may evolve & contain additional informations related to Brain Computer Interfaces, Scientific Contextual EEGs, Bio-feedback devices & Lucid-Dreaming in various formats such as conceptual drawings, diagrams, code or schematics.

Now, let’s hack !

- marketed as “high resolution, multichannel“- “TestBench“ => software to receive RAW EEG data- “EDK” => software toolkit API & detection libraries for: -mental commands - performance metrics - emotional states - facial expressions- channels n° => 14 [ + CMS & DRL references on P3 & P4 locations ]- channels => AF3, F7, F3, FC5, T7, [ (CMS/DRL) P3 ], P7, O1 , O2, P8, [ (CMS/DRL) P4 ], T8, FC6, F4, F8, AF4- sampling method => sequential sampling, single ADC- sampling rate => 128 SPS ( 2048Hz internal )- resolution => 14bits, 1LSB = 0.51uV ( 16bit ADC, 2bits instrumental noise floor discarded )- bandwidth => 0.2-45Hz, digital watch filters at 50Hz & 60Hz- filtering => built-in digital 5th order sinc filter- dynamic range => 8400uV(pp)- coupling mode => AC coupled- connectivity => proprietary wireless using 2.4GHz band- power => LiPoly( - battery life => 12 hours )- impedance measurement => real-time contact quality using patented system

1/9

Useful links & online resources

Few important notes

SDKs / libraries / toolkits / APIs- “Emokit “ -> Daeken’s [ / Qdot’s / OpenYou’s ] => https://github.com/openyou/emokit- “python-emotiv “ -> Ozancaglayan’s => https://github.com/ozancaglayan/python-emotiv- “OpenVibe“ -> Inria => http://openvibe.inria.fr/how-to-connect-emotiv-epoc-with-openvibe/

Also- “epocutils“ -> StephaneAG => http://stephaneag.github.io/epocutils/ https://github.com/stephaneAG/epocutils

- full access to the components used means desoldering the two subcontrol boards- wires colors are different than the ones used to represent each channel on screen (1)- two firmware exists: the “EPOC“ one & the “EEG“ one, the latter providing RAW EEG- capabilities depends on the headset owned & the library/API (official/unofficial) used- the official library/API is currently not ARM-friendly- alternative/unofficial libraries/APIs are already available cross platforms ( x86, ARM, .. )- firmware extraction may be possible with specific hardware & skills ( not yet mine )

[ “TestBench“ channels colors ]

[ “0x1e00“ > “EPOC“ headset ] [ “0x565“ > “EEG“ headset ]

2/9

channels names & colors

On the 10-20/MCN system

side | chan | wire color | onscreen colorleft AF3 => red => pink F7 => purple => light blue F3 => brown => red FC5 => green => black T7 => pink => deep orange P3 => black x2 => N/A P7 => blue => deep blue O1 => yellow => purpleright O2 => yellow => dark red P8 => blue => light green P4 => black x2 => N/A T8 => pink => dark pink FC6 => green => green F4 => brown => blue F8 => purple => light orange AF4 => red => deep green

- F => Frontal lobe - T => Temporal lobe - C => Central (not a lobe ;p ) - P => Parietal lobe - O => Occipital lobe - z => middle electrode - A => Earlobes - Pg => Nasopharyngial polar site - Fp => Frontal polar site

P3& P4, over the mastoïd bone ( to avoid con-tamination from blood vessels, ECG-like sig-nals ), are normally used to create the ground for measurements, and are close to each other but not touching -thin black wire (top electrode): Common Mode Sense active electrode-wide black wire (bottom electrode): Driven Right Led passive electrode

for High-res EEG > MCN system: 1, 3, 5, 7, 9 ( left side ) 10%, 20%, 30%, 40%, 50%

of the inion-nasion distance - AF => bewteen Fp & F - FC => bewteen F & C - FT => bewteen F & T - CP => bewteen C & P - TP => bewteen T & P - PO => bewteen P & O - T3, T4, T5 & T6 => T7, T8, P7 & P8

[ electrodes positions for the 10-20/MCN systems ] [ channel names / wire colors / testbench colors relationship ]

AF3

F7

F3

FC5

T7

P7

P3 P4

O1

F8

F4

FC6

T8

P8

O2

AF4

nasion

inion

{

3/9

About the headset electrodes- one of the on-board pins on the control board & the sub board n° 1 ( front ) is labelled “Oz”, even if it seems not to be used here(?)- the above drawing illustrates the mapping explained in the previous page on the headset itself, with correspondances between the channels names & the electrodes positions according to the hardware used, specifically on the circuit board depicted below ( we call it “Sub board n°2“ )

4/9

AD6706B

P2264AI P2264AI

ATP

yellow

black (x2 )

blue

red

pink

green

purple

brown[ not used ]

yellowbluepinkblack (x2 )purpleredgreenlight brown

[ filled ]

brown > F3

green > FC5

purple > F7blue > P7

yellow > O1

[thin black] > P3 / CMS

[wide black] > P3 / DRL

pink > T7

red > AF3

( mapping for the left side of the headset )chan | wire color | onscreen color

AF3 => red => pink F7 => purple => light blue F3 => brown => red FC5 => green => black T7 => pink => deep orange P3 => black x2 => N/A P7 => blue => deep blue O1 => yellow => purple

AF3

F3

O1

P7

T7

FC5

F7

P3

P3

Boards & identified ICs- the left half of the headset holds the LiPoly battery, the right half the two sub-boards- the two sub-boards may be separated but this involves precise desoldering capabilities

[ Emotiv Systems - Control Board 1.3 ]

[ what we’ll call “Sub Board n° 1“ ]

[ what we’ll call “Sub Board n° 2“ ]

5/9

[ 16889 ]

NRF Mblack

brown

red

yellow

blue

purple

green

( Gnd )

( Oz )

( batt )

( gx )

( en )

( gy )

( 3v )

BPG

( battery Gnd ) black -> ( battery Vbat ) red -> ( ts ) [ not used ] ->

<- ( gx ) yellow<- ( Oz ) brown<- ( 3v ) green

<- ( gy ) purple

<- ( en ) blue<- ( batt ) red<- ( Gnd ) black

( front )

( back )

on/offswitch

USBplug

AD6706B

P2264AI P2264AI

ATP

( front )

( back )

{ {

IC1 > scratched out componentIC2 > BPG 04W 264S

IC3 > NRF M 24L01+ 1132AR

MicroChip dsPIC33FIC4 > 640P206 1/PT 03 1107AHE

AD6706BIC5 > #1051 2919671.1 1107AHE

IC6 P2264AI & > 19KIC7 CXCY

[ to other (left ) side electrodes ] [ to (right ) side electrodes ]

R: we can’t access the back side without desoldering

R: we can’t access the front side without desoldering

IC8 > ATP

Infos on identified ICs- links to datasheet PDFs are provided for the identified components ( see .zip file ) - also, a quick summary of each of them is displayed below

[ Emotiv Systems - Control Board 1.3 components ]

[ Sub Board n° 1 components ]

[ Sub Board n° 2 components ]

6/9

IC1 > scratched out component

IC2 > BPG 04W 264S

IC3 > NRF M 24L01+ 1132AR

IC4 > MicroChip dsPIC33F 640P206 1/PT 03 1107AHE

IC5 > AD6706B #1051 2919671.1 1107AHE

IC6 & > P2264AIIC7 19K CXCY

IC8 > ATP

Not much to expect if not sniffing the circuit’s logic or knowing the role of / that specific component

Datasheet not found yet ..

Nordic’s ultra low-power 2.4GHz RF transceiver + RF synthesizer & baseband logic

DSC high-performance 16-bit Digital Signal Controller

Analog Device’s low-voltage 8-/16 channel multiplexer

[ ! > not sure ] Advanced LinCMOS Rail-To-Rail OpAmp ? ( the link points to the PDF datasheet of the “tlc2264cpw“ component )

[ !! > far away from sure ] an “Autotransformer Thermal Protection“ IC ?

Datasheet

Datasheet

Datasheet

Datasheet

Inner workings: hardware & some possible hacks

7/9

electrodesset

electrodesset

battery

ControlBoard

Sub-boards

HandlingdeviceUSB dongle

WiFidata

USB powersupply

Left side

[ EPOC headset ]

Right side

A

A > get signals from the electrodes ?

C > get gyroscope / WiFi data ?

E > sniff wifi packets ?

F > write a custom USB driver ?

G > extend supported platforms ?

D > access battery ?

B > get amplified signals ? ( after or before multiplexing )

B > extend supported platforms ? ( no more official SDK support*, but solutions already exist, ex: Emokit on RPi or BB )

BC

D

E

F

G

Middle ( back )

Inner workings: software ( “official” EDK API)- official API implementations may look like the following ( wrapper & usage ) - R: source code below uses the non-cross-platforms official Emotiv Development Kit (EDK) API

[ official API implm > example wrapper usage ]

[ official API implm > example wrapper usage (RAW EEG) - for “Research“ headset only ]

8/9

Desired implementation & POCs diagrams- planned implementations POC & final one may ressemble one of the following “mixes“- not all the setups are embeddable or cross-platform, some requires licensed hardware/software

[ Planned implementation - logical blocks diagram ( nb: a substract may suffice & fulfill all the needs of the final implementation ) ]

Needs: - acquisition & real-time EEG on computer - real-time algorithms for EEG analysis & audio stimulation - data streaming from uC to MatLab & other data processing/analysis software - embeddable in a portable device - audio bio-feedback ----------------------------------------------------------------------------------------- Nb: in the above diagram, the “embed“-tagged blocks are representations of the uC used ( ex: Arduino, RPi, BB, iPhone motherboard, .. ), and while pictured as different logical blocks, they really are one device.

[ Mixins’ / possible POC implementations - logical blocks diagram ]

Remarks: Regarding the few “mixins’“ pictured above, all have their up & down, depending on how far they involve the Emotiv hardware - using only an uC ( Arduino, RPi, BB, .. ) allows for a fully embeddable product, custom from A to Z - using the headset board(s) & Arduino together may be tough & require further hardware investigation & dev - using the headset without EDK ( ex: on RPi, BB, Android, .. ) allows for embed products, but not custom from A to Z, thus not dedicated - using only the electrodes may mean fully dissasembling the headset [ and maybe do irreversible changes ] - using the headset & EDK [ +a uC ] is ok for hardware & software test-implm/dev, but not for not-DIY products

9/9

{{ { {{ { {

dataacquisition

dataamplification

datafiltering

[ embed ]data

processing

[ embed ]feedback(s)

dataprocessing& analysis

feedback(s)

PC

headset board(s)IC(s)

embeddabledevice

uC

headset board(s)IC(s) filtering [?]

customfiltering

headset board(s)IC(s) amplification

customamplification

headsetelectrodes

customelectrodes