produceconsumerobot


 

 


 


 


 

EEG is Awesome!

Electroencephalography (EEG) is the practice of monitoring the electrical activity on the scalp generated by neurons inside the brain.

Spatio-temporal Resolution of Brain Monitoring

High Temporal Resolution

  • EEG can be captured a very high speeds, often ~512Hz or faster
  • fMRI and NIRS measure blood flow and have ~1 second resolution limit
  • Neuronal action potentials are ~1-2 milliseconds in duration
EEG Spatial Map
256 Channel EEG

Moderate Spatial Resolution

  • Up to 512 channel EEGs are available
  • Analytical techniques improve resolution
  • Sensor engineering improves resolution
NeuroSky MindWave EEG
Magnetoencephalography (MEG) MEG

DIY-able

  • No huge equipment like MRI or MEG
  • Less than $200 off-the-shelf options are growing every year (see below)

EEG is a Headache

Extracting mental activity from EEG data is VERY hard. There are several reasons for that listed below, but one way to think about it is to consider the following analogy:

Satelite

Single channel EEG might be somewhat akin to sticking a very sensitive non-directional microphone on a satelite orbiting the earth and using it to try to understand human behavior. There are indeed things about human behavior you could gather. Likely day/night cycles. Possibly changes in amount of construction work like as during recession or spurred by stimulus. Maybe even whether or not large events that coordinate large populations of people like the the World Cup or Olympics are taking place. But you might also imagine there is a LOT you can't really discern very easily. Personal conversations are very unlikely, especially if they're indoors. It's hard to tell without knowing something a priori about human behavior what jobs people do and how the hustle and bustle of daily life contributes to their endeavors. The situation gets a bit better, of course, when you can employ more and more satelites to triangulate and uncover regional localization of the sounds, but it is still a difficult problem where certain kinds of information can be more readily extracted, while others very hard to obtain.

Star Trek

Science Fiction Expectations

One of the biggest hurdles to using EEG (or any brain measurement) in an art or consumer context is the unreasonably high expectation of what is currently possible. People often ask, "what am I thinking?" expecting an answer like "red truck" with an honest level of dismay when you explain the magnitude of that problem. It's also a common dream to use your mind to control your mouse or keyboard, not realizing that your brain already controls your mouse and keyboard through your fingers and that it took years to develop those (already primed) neural connections beginning at birth and continuing beyond your middle school typing class. So when you make a new app or a new art installation using EEG, it often takes a high degree of imagination to create something that manages and channels these enormous expectations.

The Fundamental Principles of the Brain are Unknown

This can't be understated. We have no clue how the brain does what it does. That will improve over time and to the extent that it's not theoretically impossible to understand our own understanding, that may change relatively quickly in the next 50-100 years.

Pericranial Muscles
EEG vs ECG Amplitude

Signal Separation

A major difficulty of EEG is that the brain signal is small relative to EMG electrical signals created by muscle fibers. The scalp is surrounded in muscles and those muscle fibers create electrical signals that can be 3 orders of magnitude larger than the EEG signal we're interested in. Every time you blink, chew, yawn, talk, move your neck or make a facial expression, etc., artifacts are introduced into the EEG signal that can quickly swamp the signal.

EEG vs Blinks Amplitude
Sensor Engineering

Sensor Engineering

Picking up the microvolt EEG signals is not totally trivial. One of the biggest hurdles to date is the use of electrodes that need to contact the skin. Problem is that many people have a bunch of hair covering their brain and hair isn't very conductive. So the solution is often to use saline gel that is both messy and laborious to apply and pushes the technology well out of the mainstream. Good news, however, is that around the corner there are electrodes that are using capacitive sensing technology that is able to read EEG through hair (Chi et al. 2010). But, until non-contact EEG becomes mainstream, we're stuck with either gooping up our heads or only getting frontal recordings.

Principles of EEG

Neuron
Neuronal Network

Neurons Communicate with Electrical Signals

Neurons communicate by sending electrical signals down their axons. An individual firing neuron creates a current that can typically only be seen at a short distance from the cell.

Action Potential

Synchrony

Synchrony is critical to coordinate the activity of the ~100 billion neurons in your brain.

Synchrony
  • Communication

  • Neurons that fire in sync with one another are better able to transmit their signals to each other and downstream neurons.

  • Plasticity (Learning)

  • "Neurons that fire together wire together"

  • Oscillations

  • Oscillations create a method by which neurons can selectively synchronize with specific sub-groups of neurons, thereby creating selective communication and learning channels.

Cortical Map

Functions are Localized in the Brain

Different parts of the brain specialize in certain functions. Wernicke's area specializes in the recognition of speech, which the primary motor cortex controls the body's appendages.

Analysis of EEG

ERPs

ERPs

Event-Related Potentials look at the electical signature created on the scalp in response to specific sensory, cognitive or motor event. Typically ERPs are averaged over many (~100) trials or events.

Spectral Analysis

EEG Oscillations

Spectral analysis of EEG data looks at the oscillations created by rhythmic synchrony of large coalitions of neurons in the brain. Different behaviors lead specific brain areas to synchronize at different frequencies. For example relaxation or meditation with your eyes closed leads to increased alpha (8-12Hz) waves over the visual cortex (rear of the head).

EEG Behavioral Correlates
FFT Analysis
EEG Power Maps
  • Power

  • Looking at the power or amplitude of oscillations from a particular brain area implies changes in local processing by the neurons in that area. Generally power can be used to address questions like: during concentration, beta power in the frontal cortex increases.

EEG Coherence
  • Coherence

  • Looking at the coherence or phase-locking of two brain regions can reveal coordination or communication between those regions. Generally coherence can be used to address questions like: during visual-motor guided behavior, gamma coherence in the visual cortex and the motor cortex increases.

Off-The-Shelf EEG Headsets

OpenBCI

OpenBCI

  • $299
  • 8 channels (daisy chainable)
  • Wet electrodes
  • Wireless
  • Open source
Neurosky Mindwave

NeuroSky MindWave

  • $99
  • 1 channel
  • Dry electrodes
  • Wireless
Emotiv

Emotiv

  • $299-750 depending on SDK options
  • 14 channels
  • Wet electrodes
  • Wireless
Mod EEG

OpenEEG

  • 99EUR
  • 2 channels
  • Dry electrodes
  • Wired
  • Open source
Muse

Muse

  • $299
  • 7 channels
  • Dry electrodes
  • Wireless
  • Available?
Zeo Bedside

Zeo Bedside

  • ~$100-150
  • 1 channel
  • Dry electrodes
  • Wireless
  • Out of business

Code

MindWaveScope

Processing script to plot MindWave data in an Arduinoscope window.

MindWaveScope

MindWaveSectrogram

Processing script that plots NeuroSky MindWave eeg power data in a 3D Spectrogram.

MindWaveSpectrogram

zeoParser

C++ code to parse data from a zeo sleep manager with included openFrameworks example code.

You also need ofxOscilloscope and to hack your zeo bedside with these instructions.

zeoParser

Alternatively, this C# ZeoScope viewer/logger is quite nice.

produceconsumerobot