Cleaning the signal from EEG-SMT

An disappointment after getting EEG-SMT working: the resulting measurement is just a noice. It is a challenging task for a beginner to understand what is going wrong.

signal-is-bad

Check software

First I made sure that the signal isn't modified somehow on the way.

EEG-SMT uses the version P2 of the firmware for ModularEEG, which is available here: modeeg-p2.c. The code just dumps to outside what it has as signal inputs.

The plugin for OpenVIBE also forwards the data further from EEG-SMT to the main software.

How to attach electrodes

The device provides 2 channels and has 5 electrodes. It is confusing.

Now I know for sure for the passive electrode:

* it is plugged into "DRL" socket,
* the sensor is attached somewhere on the body: one can hold it in a hand, or attach it to a leg, an ear or a cheek.

The letters "DRL" stay for Driven right leg circuit. The explanations in the wikipedia article are sufficient.

At the moment, I do use the right leg, because the hands hold other electrodes.

I still don't understand the need to have _two_ electrodes for one channel. Even after reading The ModularEEG Design document, I can't get it.

What I'd expect is that there is one and only one electrode pro channel, and additionally there is a "base" electrode, to be used as a zero potential.

The clear thing is that when two electrodes are connected together, the signal should be zero. Surprisingly, it is not so in my case. Initially it is so, but with time the noice starts again. TODO: ask in the mailing list what happens.

For futher investigation:

Maybe a contact gel is useful.

The 10–20 system or International 10–20 system is an internationally recognized method to describe and apply the location of scalp electrodes in the context of an EEG test or experiment.

OpenVIBE with noice filter

The background knowledge suggested to play with FFT (fast fourier transform). And anyway spectrum analysis is required later to see which waves sends the brain.

The task was easy in OpenVIBE. The result is that I have a very big peak around 50 Hz. This is the frequence of the electrical supply. So I need separate the frequences which I need and frequences which is noice.

The frequences above 60 Hz are filtered out by OpenEEG circuit self. And I need only brain waves frequences, which are up to ~30 Hz (Beta wave, with the references to other waves).

OpenVIBE provides an example "neurofeedback" with an advanced data flow. I've learned from this example how to apply a filter and implemented it in a simple script.

program-to-filter-signal

Getting help

I suspect I'm not the first who has the noice problem.

The first try was to search in the mailing list of OpenEEG project. Unfortunately, sourceforge now is very out-of-date, it the searching is a bad experience, one can find anything useful only with luck.

The advices in the mailing list are centered about re-checking the circuit and using shilded wires. All that is already have done in SMT-EEG device.

A better help source is the forum Biofeedback - EEG, ECG, EKG on Olimex site. In particular, the following threads helped me to start doing something reasonable: Persistent noise with EKG-EMG shield and EEG- SMT EEG Signal Acquisition.

Reproducing feedback

After software filtering is setup, it is time to get some results. The bad new is that I don't know with which measurements to start and which result should I expect.

An already mentioned thread "EEG- SMT EEG Signal Acquisition" in Olimex forum suggests the following setup:

Please place the electrodes of one channel a bit over both temples and then hold the DRL firmly in hand. Then after you start the monitoring roll your eyes right and left and check the readings.

I tried, but was not very successful, maybe because I don't know where exact temlpes are. Instead, I found a position where I get stable reproducable reaction on strong blinking.

Unfortunately, while writing this post, I've lost the position. Also, I've got no noice on the channel 1. The channel 2 was doing nothing.

with-filtered-channel-1

Now I think that peek in the signal is caused not by brain but by eye muscles, but anyway it is good to have anything stable.

The next tasks are:

* make an EEG cap to use 10-20 system,
* find stable reproducable eeg signal patters for brain activity.

Categories: bci

Updated: