neurofeedback with arduino

Anyone knows about any project of neurofeedback with the arduino board. (EEG)

i saw an opensource eeg project here
http://openeeg.sourceforge.net/doc/index.html

and the circuit use atmega8 so i think may be it is possible to use with arduino. who knows...

please report if someone knows about that

thanks

Anyone knows about any project of neurofeedback with the arduino board. (EEG)

i saw an opensource eeg project here
Welcome to the OpenEEG project

and the circuit use atmega8 so i think may be it is possible to use with arduino. who knows...

please report if someone knows about that

thanks

It would seem that you have two types of electrodes: active and passive. The active being the more difficult and possibly dangerous of the pair, and the passive seeming fairly easy.

Looks like the most simple route is to use passive electrodes, get the signal back to an amplifier, and then send the amplified signal (up to 5v) to one of the analog pins, then use analogRead() to get the values coming off it?

Of course, I'm just taking a swing in the dark here. But it seems like all you're doing is reading in minute electrical signals, amplifying them, and recording them. Just make sure it's not possible to have feedback so that you're sending signals down those electrodes. Could be very, very, bad =)

!c

I was considering a similar project. What do you think would be the best way to ensure that you weren't sending anything down the electrodes. Diodes of some kind to prevent reverse voltage, I guess? Or something more complicated?

I have been looking at the Open EEG project-- it seems like since we've already got a knowledge of Arduino programming, we could skip the PIC stuff and achieve similar results.

I'm a little unclear, however, on the best way to amplify the brain waves to a usable level that Arduino could measure as an analog input.

anybody have any ideas?

I don't know too much about electronics but would an audio amplifier work?
Sounds like everyone wants to make an EEG.
The hardware side of open EEG sounds like it can get complicated.
Will using an arduino make it easier to build?
I would rather focus on the programming side.
My project is making a visualization that is controlled by brain waves.
Will keep you posted.

I've been thinking of doing something like this myself for a while. What I'd like to know is: why on earth are you saying that this is dangerous?! :o

If you build the active electrodes, all you're doing is putting metal on your skin and connecting the metal to a smapp OPAMP powered by 5V from the Arduino. The only diffrence between active and passive electrodes (to my knowledge) is where the signal amplification takes place. With active electrodes, it takes place right next to the skin instead of sending really weak signals through a meter or two of wire first.

So I say, go ahead and build those amazing active electrodes and tell us what happens! Who knows? Mayhap you put together something like what these companies have promised to release this year:

:wink:

so far i have connected the arduino to an amplifier to amplify the diy saline electrode.
I'm using the analog inputs and graphing the results with the example graph code.
Its all working fine except it seems to be getting a pulse instead of brainwaves (you get waves by touching the electrode with any part of your body.
i will try getting another electrode and subtracting the current found in the finger from the current found in the head.
If it doesn't work, oh well at least i found a cool way to visualize your pulse. :slight_smile:

Cool! What kind of amplifier are you using? The Active EEG sensor from OpenEEG? From what I gather, you need an electrode connected somewhere else on your body, to act as a reffrence point against whatever you measure with the brainwave-reading gadgets. =P Not sure exactely how it works, but I'm sure you can find the neccecary info on the OpenEEG site.

I really hope you'll keep up the good work, and keep us guys updated! I mean, if you manage to do something even remotely cool with neurofeedback and the Arduino, you would probably go down in playground-history as a Legend! :wink: Hehe

One thing you could try to measure is the.. I don't know the correct term, but like the "sync"-frequency of the brain. From it, you could discern wether a person is alert, sleepy, relaxed but paying attention, etc. Since this frequency permeates the whole brain, my guess is that it should be the least advanced to read.

Good luck! Rooting for ya, man! ^^

In the interest of extreme caution, optoisolators are usually called for with EEG sensors, & so on the human side the circuitry would be battery-powered. How about this alternative: implement the sensor with a battery-powered Arduino, and transmit the readings wirelessly (Bluetooth, Zigbee, IR) to another Arduino connected to a PC?

In the interest of extreme caution, optoisolators are usually called for with EEG sensors, & so on the human side the circuitry would be battery-powered. How about this alternative: implement the sensor with a battery-powered Arduino, and transmit the readings wirelessly (Bluetooth, Zigbee, IR) to another Arduino connected to a PC?

I think I already said this somewhere, but what are the chances of beeing electrocuted by 5V equipment? What is the risk of your computer suddenly deciding to pump 230V through the motherboard, the usb controller, the arduino and then your skin? And even if the computer failed that misserably (which is as good as impossible), what are the chances of the motherboard, the usb controller and all the other paths the electricity would have to travel through to reach your skin holding up for long enough for you to get a shock?

If you need something to worry about, then worry about lightening striking you or getting hit by a car. No offence, but something tells me you are one of those people who actually believes you'd die if someone dropped a toaster in your bathtub. :wink: Hehe

If you need something to worry about, then worry about lightening striking you or getting hit by a car.

I'd venture to say that there is zero chance any commercial EEG product/toy would pass muster without isolation from line voltage (opto or wireless). For example, the NeuroSky device is battery-powered with a Bluetooth link to the PC. One is allowed to experiment on oneself however one likes though!

If you need something to worry about, then worry about lightening striking you or getting hit by a car.

I'd venture to say that there is zero chance any commercial EEG product/toy would pass muster without isolation from line voltage (opto or wireless). For example, the NeuroSky device is battery-powered with a Bluetooth link to the PC. One is allowed to experiment on oneself however one likes though!

Indeed, indeed, but does that mean there is any risk whatsoever of the computer elecrocuting you through electrodes connected to the arduino? The fuse in the PSU would die, or the tiny, tiny paths on the motherboard would. Even more likely, the electronics in the CPU, USB-controller and Arduino would burn out far to quick for anything to happen to the user.

I have worked with computers for a number of years now, and I haven't even ever heard of a computer killing itself by leading mains voltage into the entrails of the computer.

No need to worry, I think. You might have to use a battery if you are trying to design a commercial product, but for tinkering and dabbeling with private projects, I'd just ignore the dissappearingly, microscopicly tiny risk of beeing killed by a freak insident like that (if it's even possible for this to even be a risk).

This is the amplifier that I used:
http://www.jaycar.co.nz/productView.asp?ID=AA0223&CATID=&keywords=amp&SPECIAL=&form=KEYWORD&ProdCodeOnly=&Keyword1=&Keyword2=&pageNumber=&priceMin=&priceMax=&SUBCATID=
It only needs 4.5v to run and has an input sensitivity of less than 80 mV.
You need one amp per electrode, so i will get another one tomorrow.
This is a video of the processing graph plotting my pulse http://boogerlab.com/pictures/pulse.mov

This is the amplifier that I used:
http://www.jaycar.co.nz/productView.asp?ID=AA0223&CATID=&keywords=amp&SPECIAL=&form=KEYWORD&ProdCodeOnly=&Keyword1=&Keyword2=&pageNumber=&priceMin=&priceMax=&SUBCATID=
It only needs 4.5v to run and has an input sensitivity of less than 80 mV.
You need one amp per electrode, so i will get another one tomorrow.
This is a video of the processing graph plotting my pulse http://boogerlab.com/pictures/pulse.mov

That's pretty cool! =D

Is it just my imagination, or did the graph go flat at the exact instant you started moving the mouse? =P

thats when I take my finger off the electrode. :o

Looking pretty good so far. Now does anyone know an easy-ish way of coding for frequency recognition? I know someon e who made afourrier transform for different sound recognition but that's beyond me at the moment. I'm hoping to make one that's independent of a computer so I can take it everywhere, so different LEDs could correspond to the relative strengths of certain frequency ranges.

but what are the chances of beeing electrocuted by 5V equipment?

Quite high actually, and it could be fatal. It's not the voltage that kills you it's the current. As you have attached electrodes to your body, probably using electrode gel you have a very low resistance. Therefore it doesn't take much to pass a few milliamp through you which could be sufficient to kill you.
Ad you touch the signals given at the output side of the amplifier you form a positive feedback loop which puts the whole of the supply of the op amp across the electrodes. If these electrodes are across the temples it can hurt.

I know, I did this back in 1973 hooking myself up to various voltage controlled oscillators of a synthesiser.

Is it possible to build this??

Star Wars Force Trainer

just happened to read the wiki article about the arduino and they mention this:

"The Programmable Chip EEG BCI" - an Arduino-compatible schematic and PCB retooled into an EEG brain-computer interface.

You guys know it probably already.

Stickboy,
It's all rubbish, it doesn't work.

Grumpy_Mike, how can you say that? First of, it's proven technology. EEG has been used in the medical field for decades now, but without much pressure on further development because the huge, clunky and precise machines they use in hospitals fulfills their needs perfectly.

Now, what is an EEG? Something that picks up an electromagnetic field/signal, amplifies it and applies Fast Fourier Transform algorithms to the dirty, noise-like signal. Seems pretty straight forward, doesn't it..?

With hospitals using this tech for decades, and 3 different home-EEG products out, you can't really dispute the fact that it does work. So what are you whining about? What is it you think is rubbish? Do you not think we can consciously affect our brainwaves?

Check out http://www.nytimes.com/2007/08/26/business/yourmoney/26stream.html?_r=1

Here[ch8217]s how Omneuron uses fMRI to treat chronic pain: A patient slides into the coffin-like scanner and watches a computer-generated flame projected on the screen of virtual-reality goggles; the flame[ch8217]s intensity reflects the neural activity of regions of the brain involved in the perception of pain. Using a variety of mental techniques [ch8212] for instance, imagining that a painful area is being flooded with soothing chemicals [ch8212] most people can, with a little concentration, make the flame wax or wane. As the flame wanes, the patient feels better. Superficially similar to an older technology, electroencephalogram biofeedback, which measures electrical feedback across multiple areas of the brain, fMRI feedback measures the blood flow in precise areas of the brain.

Notice how medical experts are using fMRI (and EEG) to create a feedback loop that essensially lets the patient control activity in targeted areas of the brain? Ever read the countless studies about those pesky ADHD/ADD kids who get to play EEG-games where mental concentration and focus is rewarded/required? Check it out. The benefits they recieve are huge, even compared to putting them on drugs (not to mention more permanent, more healthy, etc.).

Lastly, I myself have the OCZ Neural Impulse Acutator. No, I am not one of those guys who sit through 30 minutes of randomness, and when the right thing happens go "YEAH, I did that, with my MIND!". I have used it (if sporadically) and can vouch for it working. When I look at the brainfingers screen I can, with a little effort, pull all the bars all the way down,and I have some control of one alpha and two beta channels.

My only real beef with the OCZ NIA is that once inside a game you don't see the analog feedback (brainfinger bars). You divide each bar into zones corresponding with an action (keypress, keydown, mouseclick, etc.) and without continous feedback it gets very difficult to know if you are moving the bar up or down.