0% found this document useful (0 votes)
153 views15 pages

OpenEEG Project: DIY EEG Exploration

This document explores the OpenEEG project, which aims to make electroencephalogram (EEG) acquisition and processing accessible to hobbyists and students. It discusses EEG electrodes, hardware options like the ModularEEG system, and software for analyzing EEG signals. The ModularEEG hardware consists of an analog board that filters and amplifies EEG signals and a digital board that samples the signals. The document also examines using electrodes, reducing noise with a driven right leg reference electrode, and experimenting with EEG signal processing software like analyzing eye movements, alpha waves, and sleep cycles.

Uploaded by

narendra133
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
153 views15 pages

OpenEEG Project: DIY EEG Exploration

This document explores the OpenEEG project, which aims to make electroencephalogram (EEG) acquisition and processing accessible to hobbyists and students. It discusses EEG electrodes, hardware options like the ModularEEG system, and software for analyzing EEG signals. The ModularEEG hardware consists of an analog board that filters and amplifies EEG signals and a digital board that samples the signals. The document also examines using electrodes, reducing noise with a driven right leg reference electrode, and experimenting with EEG signal processing software like analyzing eye movements, alpha waves, and sleep cycles.

Uploaded by

narendra133
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

An Exploration of the OpenEEG Project

Austin Griffith

[Link]’s BioData Systems, Spring 2006

Abstract
The OpenEEG project is an open source attempt to bring electroencephalogram acquisition
and processing to the hobbyist and student alike. In this paper I explore the inner workings of
everything from the home-cooked hardware to the plethora of free software for EEG analysis.
I’ll find out just what goes into creating the computer to brain interface. From there, I will
experiment with biofeedback and EEG signal processing.

1
Contents
1 Introduction 3

2 Electrodes 3
2.1 Passive Electrodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Active Electrodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.3 Driven Right Leg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

3 Hardware 4
3.1 ModularEEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.1 ModularEEG Analog Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.1.2 ModularEEG Digital Board . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Alternative Hardware: scEEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

4 Software 8
4.1 Electric Guru . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.2 ABI BCI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4.3 BioEra . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.3.1 Eye Movement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.3.2 Alpha Waves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.3.3 Sleep Cycles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

5 Neurofeedback 13

6 Future Work 13
6.1 The Perfect Alarm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
6.2 Game Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

7 Conclusion 14

2
1 Introduction
The OpenEEG project was formed in 2000 as an open source hardware and software organization
aimed at bringing EEG research to students at a low cost. They first designed two PCBs; an analog
board that could filter and amplify and a digital board that could sample the signal and pass the
data on to a PC. They have since coordinated with Olimex, a parts manufacturer, to have their
boards pre-built and ready to order. Along with their low cost hardware, many different software
packages have been released. All schematics, source code, and project information is available to
the public to download for free.

2 Electrodes
2.1 Passive Electrodes

The first step in the gathering of EEG signals is to draw the voltages off of the surface of the
scalp. After researching through EEG websites I found that pure Silver or, even better, Silver-
Chloride was the best medium to capture the signals from the skin. The electrodes alone do not
make very good connections with the skin and a saline gel is needed to help conduct the signals.
The trick to getting a clean signal to the computer is not only the connection to the scalp, but
also the shielding around the wire carrying the signal. I decided to go the same route as many other
OpenEEGers and use good shielded audio cables. Since I had already ordered some electrodes, I cut
the silver part off and attached it to the audio cable. I also wanted to pull signals from anywhere
on the head, so I needed pin/needle electrodes. I did the next best thing and soldered a pin tip
to another set of silver electrodes. I now had two sets of working, very low resistance, passive
electrodes.

2.2 Active Electrodes


Active electrodes have an amplifier as close to the source of the signal as possible to avoid losing
anything in the noise. Another big advantage of having a more amplified signal is not needing slimy

3
electrode gel. Here is an example of an active electrode made by Jarek Foltynski [3]. I decided
against doing all the work to build active electrodes when the passive electrodes worked just fine.

2.3 Driven Right Leg


One of the biggest ways to combat a noisy signal is to hook up a third reference electrode away
from the head know as a DRL, which can reduce common-mode signals. It is said to be able to
attenuate main hum up to 100 times better than an instrumentation amplifier. [2]
Here we can see a huge spike of noise around 60Hz without the DRL.

After connecting the DRL to the body, the noise is drastically reduced.

Note: You can still pick out the spikes from when I blinked even in the noisy signal.

3 Hardware
As with many projects in the open source community, there are no standards and therefore, many
different devices do primarily the same thing. In fact, there are numerous different hardware design
schematics floating around the internet that can be used with the same software packages for EEG
signal acquisition. In the OpenEEG community, there are only two devices that are highlighted;
the ModularEEG and the scEEG.

4
3.1 ModularEEG
The ModularEEG device is made up of an analog board for filtering and a digital board for signal
processing. Multiple 2 channel analog boards can be connected to a single digital board to form up
to 6 channels of EEG capturing. A ModularEEG system can be built within the range of $200 to
$400 dollars, which makes it perfect for students that wish to explore EEG signals without spending
thousands of dollars for a high-end system. The boards can be purchased bare and then assembled
by the customer or pre-assembled directly from Olimex [1].

3.1.1 ModularEEG Analog Board

The signal entering the analog board from the probe is a very weak signal, around 10 uV, and is
also full of noise, primarily 60Hz main hum. This signal is going to need to be filtered and amplified
enough that the digital board can process it. The first stop on the tour of the analog board is the
protection circuit. The protection circuit helps to limit the current hence protecting the circuit
components from static and also the person hooked up to it, via electrodes, from getting shocked.

Next, the signal travels through an instrumentation amplifier that provides a gain of 12. After
the first stage of amplification, the filtering process begins with a high pass filter to get rid of any
DC components.
Then, a second stage of amplification boosts the signal by a gain of 40. It is important to note
how the amplification is done in steps and certain bands of frequencies are eliminated.
A second high pass filter is then implemented. The purpose of this filter, as documented on the
ModularEEG design website [2], is to filter out any DC charge that has accumulated on the probes.

5
Finally, the signal passes through the last stage of amplification and is ready to be passed on
to the digital board.

6
3.1.2 ModularEEG Digital Board

Confusingly enough, the final piece of the analog signal’s path is a low pass filter located on the
digital board.

Here is the final gain of the entire filter from the ModularEEG boards straight from the Ope-
nEEG website:

The final design is deemed a ”besselworth”, they explain it best as:


...it is modeled to be a blend of a Butterworth and a Bessel filter; The group delay is
flatter than that of a Butterworth filter, but not absolutely flat as that of a Bessel filter.

7
The ”knee” on the boundary between the pass and transition bands is more rounded
than that of a Buttherworth filter, yet sharper than that of a Bessel filter. [2]

The main component of the digital board is its micro-controller, the ATmega8. The chip can
do 10-bit analog to digital conversion on 6 different channels. When the signal leaves the micro-
controller, it passes through an opto-coupler to provide circuit isolation. It is then passed on via
RS-232 serial communication to the PC. Due to the nature of an open source project, the firmware
for the ATmega8 is available for download straight from the main OpenEEG website. [2] I went
for a quick dip into the firmware code and discovered it was pretty easy stuff. A timer clocked
at 256Hz overflows and calls the analog to digital conversion on each channel. The information is
then packaged into a packet and sent out to the RS-232 communication. I also purchased the small
programming cable that allows the user to update the firmware of the chip.

3.2 Alternative Hardware: scEEG


An alternate method is also mentioned called the SoundcardEEG. Even though most sound cards
filter the frequencies lower than 20hz because of human hearing abilities, a method of frequency
modulation can be implemented in hardware to pass EEG signals through to a computer that can
use software to first demodulate and then analyze the EEG signals. This is a cheap method that
requires little extra hardware, but they don’t have any working modules released to the public so
I decided to go with the ModularEEG boards.

4 Software
Now that the EEG signal is filtered, amplified, sampled, and passed on to the PC, it’s time for a
software package to work with the data. There are many different applications that are all available
for download from the OpenEEG website. [2] Some are basic and limited to simple oscilloscope
and FFT display, while others boast realtime complex EEG analysis. I picked out a few dissimilar
applications to study in depth.

8
4.1 Electric Guru
Electric Guru was the first open source EEG application I downloaded. It is a very simple but
powerful application that is good for troubleshooting and checking that your electrodes are reading
valid signals.

Electric Guru includes the signal plotted in the time domain along with frequency response and
phase differences.

4.2 ABI BCI


ABI Brain Computer Interface is a small windows application that implements a neural network for
Biofeedback training. It works by taking a raw EEG signal and filtering it down to frequencies that
you specify. It then sends those specific, filtered signals into a two layer feed-forward neural network
that learns how to differentiate between two or more different types of signals. For instance, there
is a left white box and a right white box on the screen, and the user is supposed to do one mental
task when the left box is displayed and a separate mental task with the right box comes up. The
neural net then attempts to start predicting what mental task you are performing.

9
4.3 BioEra
BioEra is by far the best program I could find to interact with my OpenEEG module. It allows
the user to build designs out of a large list of components. For example, I could drop in a filter,
connect it to my incoming signal, configure it, and then connect it to an oscilloscope object.

If you wanted to see an FFT, you just drop it in and connect it to a display.

BioEra also provides the user with enormous control of each component. Here is an example of
how to configure a filter:

As you make changes to how the filter works, its frequency response is automatically updated.

10
You can also customize how the FFT will work.

4.3.1 Eye Movement


The first thing I tested in BioEra was a simple threshold module to decide which way I was looking.

I set it up so which ever circle you looked at would turn green. It worked really well, but it was
just facial muscle signals not actual EEG signals.

4.3.2 Alpha Waves


I knew that alpha waves would probably be the easiest EEG signal to capture. After building a
BioEra setup that would filter out everything but the alpha band, I hooked the electrodes up the
same way I had them to capture my eye movement. I couldn’t see any distinct changes between
having my eyes open or closed. After some reading, I found that the human alpha rhythm is quite
interesting. The most important thing I discovered was that the best place to pull alpha waves
is near the back of the head in the occipital cortex. [5] After this discovery, I took the needle
electrodes I had built and hooked them up to the back of my head. After the signal settled down,
I watched it for a while and then closed my eyes. When I opened my eyes I was amazed to see that
the alpha wave had greatly increased while my eyes were closed.

11
4.3.3 Sleep Cycles

I recorded my sleep for a night and was surprised to see very distinct stages as the night went
on.

From these charts, I can see the my alpha fades in and out, but my theta and my delta have
very sharp transitions. Also, my beta rhythm was only visible right before and after I fell asleep,
but never during deep sleep. Eventually, I would like to use both channels to do these readings.
The first channel I will leave on the back of my head to get these nice transitions between stages,
but the second channel could be used on my forehead to show eye movement during REM.

12
5 Neurofeedback
Biofeedback is a method of understanding, through feedback, and ultimately controlling functions
of the body that we previously were unaware of. [6] Neurofeedback is a type of biofeedback that
deals specifically with brain functions. Neurofeedback can be used to help patients overcome
mental disabilities such as ADHD by practicing enhancing or avoiding certain frequency bands
that represent underlying neurological processes. In my case, I used neurofeedback to enhance my
alpha waves.

Within fifteen minutes of meditation-like relaxation, I was able to generate longer, stronger
alpha waves. I did this using an example that came with the BioEra package. It uses your alpha
wave to control the pitch of a MIDI output sound. Meaning, when my alpha waves are high, the
pitch of the instrument also increases. When I have my eyes open the pitch then decreases to a
low hum. By listening carefully and concentrating on what made the pitch higher, I was able to
produce longer, higher MIDI outputs. My best explanation of how to get better alpha, and this
is going to sound a little strange, is relaxing enough that I feel like I’m sliding down an enclosed
water slide. Yeah, that’s pretty weird, but for some reason, my alpha went crazy when I tried not
to think of anything else but that.

6 Future Work
6.1 The Perfect Alarm
Although the body naturally adjusts its sleep rhythms to a human being’s time schedule, I would
like to interface the ModularEEG device with an alarm clock that could wake a subject up at
precise times within their circadian sleep cycle. I feel that this could maximize a person’s rest and
help compensate for ever-changing sleep patterns. Along with this, a person could evaluate how
they are sleeping by recording sleep stage information and viewing it compared to a base case they
recorded.

6.2 Game Control


On the fun side, I would like to use an application called NeuroServer to interface with an online
computer game I designed in the fall of 2005 named AIBattle. NeuroServer can pull and filter an
EEG signal and then send corresponding TCP/IP data to an internet server. I would like to have

13
a ModularEEG device judging a persons relaxation vs. aggression and use that information to
control the game’s swarms respectively.

7 Conclusion
I was able to completely build and experiment with the ModularEEG device within a semester’s
time on a college student’s budget. Although my signal processing skills were sub-par, I could
still filter and work with multiple frequency bands pulled in realtime from my own brain. This
device has not been proven to be completely safe, however, it worked fine for me on 4 different
computers in three different locations. Using BioEra, I believe a student with more knowledge
could put together some pretty remarkable experiments. Also, I have just skimmed the surface of
the neurofeedback and I believe that further investigation could lead to a better understanding of
one’s neurological processes. With products like the ModularEEG device, students are starting to
learn more and more about their own EEG, but I would like to close by saying that many times
something like the OpenEEG project can promise too much to the end user and then end up being
a disappointment. So please, take this experiment for what it’s worth... you can pull alpha waves
from your own brain for around 300 bucks and about 25 hours of soldering and fine tuning.

14
References
[1] OLIMEX Ltd, [Link] BULGARIA.

[2] The ModularEEG Design, [Link] [Link]

[3] Active Electrodes, [Link]

[4] The ABI software, [Link] peortega/abi/

[5] Paul L. Nunez and Ramesh Srinivasan, Electric Fields of the Brain, 2nd ed. , 2006.

[6] David G. Danskin and Mark A. Crow, Biofeedback An Introduction and Guide, 1st ed. , 1981.

[7] Ramoser and Pfurtscheller Real-Time EEG Analysis with Subject-Specific Spatial Patterns for BCI,
December 2000.

[8] Barbara B. Brown Infinite Well-Being, 1985.

15

You might also like