Instructables
Picture of DIY EEG (and ECG) Circuit
EEGs are a noninvasive way to look into your brain. While the brain is extremely complex, areas of it can lock into circular firing patterns, resulting in telltale brain waves that one can observe with the right equipment. Intensity of these waves change depending on your internal state. The waves we will be most easily able to distinguish are alpha and beta waves -- alpha waves occur at around 8-12 Hz and when measured from the frontal lobe provide an estimate of how relaxed a person is, while beta waves are around 12-30 Hz and correspond to how much a person is concentrating or how alert they are.

The concentration of each wave can also tell more specific things about your thought patterns depending on where you measure them from. For example, alpha concentrations on the left motor cortex increase when you think about moving your right hand. Regardless of where you're taking measurements, looking at the concentrations of waves in real time - a process called biofeedback - can give you much greater control over them.

This tutorial is an in-depth guide on how to make your own simple EEG circuit. Along with monitoring brain wave concentration, the final circuit can also be used as an ECG, as a way to see your heartbeat trace. The circuit will use 3 electrodes - 2 to measure a voltage difference across your scalp, and one as a reference to ground. Depending on how many parts you already have, the circuit could only set you back around $10.

The aim for this project is to be easily available and understood by people of every technology background. For those electronically savvy, I will include up front a finalized schematic so you can jump right into making it yourself. For those that want more guidance, I will include a detailed description / explanation of every section of the circuit, showing you what it does and why you need it. 

Then, I'll move onto the software (Processing based), which is a very important piece in actually interpreting the raw data you receive.

So - let's start!

 
Remove these adsRemove these ads by Signing Up
1-40 of 169Next »
theadi15258 days ago

Soo what with this error ?

blad.png
Joe.G made it!23 days ago

I do not know how can you can run the code for reading eeg signal without any error. When I run the READ_EEG in arduino, it's contain 2 errors. When i try to fix the first error, the second error appear. I do not know why. Please help me to fix it.

Capture.PNGFKVGMMMI1946D9N_RECTANGLE1.jpg

There is a clear error right above the highlighted braces in the first image you posted. It is a function call, and the parentheses must be closed with or without (one or more separeted by comma) parameters inside and followed by a semi-colon indicating the end of the command: timeSignal(); or timeSignal(PARAMETERS);

the second image i cannot tell because missing parts of code i must see.

i've not downloaded the code or started the project yet due to lack of time. but it's my intention for soon.

Let me know if im not being clear, beacause i'm out of pratice in english language.

BoardLevel21 days ago

The electrodes go into the ad620an instrumentation amplifier at pins 2 and 3.

The written code is garbage. It does not work. everyone i have seen on this site has either used another avenue to make this circuit's raw data interpretation code work or they have purchased their own expensive software or hooked the device straight into an oscilloscope or another form of raw data interpretation.

the circuit works fine and the filters can all be made out of 741 op-amps in combination with the various listed amplifiers, capacitors, and resistors.

bit of advice, write the code first. if that doesn't work for you and you have no other form of raw data interpretation to display the actual wave forms of these readings, ABANDON the project. i have a 200 dollar eeg sitting next to me and a code that does not work so i can't use it. My coding skills are not that of a professional programmer i have had one programming in c class and this is not close enough for me to debug nearly 400 lines of code with errors popping up constantly.

the creators of this this instructible also mentioned a few years ago that they would not be answering any more questions or assisting any build. i am paraphrasing but don't expect help from them i tried.

personally i believe that this should be removed from the web sight. it is misleading and if you screw up and build the circuit first then you are left with an incomplete interpretation code.

yajbuilder27 days ago

Yo sup...

still at this fantastic work? I all of a sudden NEED to make an eeg machine! Another way to get low noise, high channel counts is to use some high end recording stuff, like a -real- power conditioner (used for 60hz hum, I dunno to what degree though) (furman, monster) and a many-channel audio interface (focusrite, heck go bigger get an antelope or even bigger a rme hammerfall! (like 52 channels of conversion... like a ski mask of electrodes!) . that sure isn't portable, but big readings would be a piece of cake!

I want to make something I can use to monitor sleep and euphoric caffeinated feelings, so it may come down to a larger a/d converter to get those subtleties.

Also from the software-recording type end of things, HPF and LPF and all the notch filters in the world are super easy if one was to run the raw signals (post amplified) through a simple EQ. I mean, if one was to use a interface, a copy of logic pro x or PT 12 or Reaper 4 shouldn't big a biggie. :) Plus reaper is almost free and has that stuff.

Anyway, anyone still here? support? get that software fixed? ehh? ehh?

peace

SaidM29 days ago

CAN YOU HELP ME I WANT MAKE SIMULATION FOR THIS DESIGN ON PROUTUES HOW?????????????????

SaidM29 days ago

CAN YOU HELP ME I WANT MAKE SIMULATION FOR THIS DESIGN ON PROUTUES HOW?????????????????

SaidM29 days ago

CAN YOU HELP ME I WANT MAKE SIMULATION FOR THIS DESIGN ON PROUTUES HOW?????????????????

rbayareh mancilla made it!10 months ago

Hi! I made this proyect. I only used a High pass filter from 8Hz to 50Hz (alpha to beta waves) just for watch the changes between the waves. I used Labview and MyDAQ to observe the changes, programming a 60Hz notch filter, a graph and FFT to observe better the frequency of alpha and beta. Here are the results:

filtro pasa banda 8-13Hz.pngfiltro pasa banda 14-30Hz.pngCapture.PNGCapture2.PNGCapture3.PNGCapture4.PNGCapture5.PNGCapture7.PNG

Thank You. It helped me a lot.

Your welcome

please can you help me i want source of simulation, code
what is the price of DAQ?

I wanna get a 50Hz notch filter one!

OK, what's the problem?
BoardLevel made it!1 month ago

take into consideration that this circuit requires you purchase electrodes as inputs and some sort of electrode gel that will set you back more than $10. even if bough on line.

There are a lot of parts to buy if you don't have a bunch of ICs and caps laying around you will end up buying online and paying shipping costs too. some were hard to find particularly hard to find were the tantalum capacitors.

be prepared to get the run around on ambus electrodes too. they charged me four times for my order before even sending me the right 2 products even though i only needed one set of electrodes and only wanted one. i have yet to dispute the charges due to just not wanting to deal with them any more. seeing as how i might need the electrodes when and if i ever get the code running.this project cost me closer to 100 dollars than 10.

20150126_163329 (1).jpg
BoardLevel made it!1 month ago

BEST ADVICE. TRY AND GET THE CODING WORKED OUT FIRST.

I ran in to lots of coding errors before the program would even attempt to open. Also I did not receive much help other than my professors at my school and a lot of hours looking though someone elses code (which is still not complete yet. this project is still on the site ??????????????????why?!). if coding is not you strength, then don't bother here but the circuit is absolutely beautiful.

if you can't write your own code in arduino or processing 2 than don't bother with this project. This provided code did not work for me and i did not get a single helpful reply from the creators of this gem. i will be reading my eeg through an oscilloscope rather than my laptop. there goes the convenience of a screen shot.

20150126_163329 (1).jpg
BoardLevel1 month ago

the circuit works

the code for interpreting does not

chee keongc1 month ago

Hi Cah6

Can you please confirm that the notch filter work? We made the circuit and simulated the circuit we are not getting a notch behavior, we are getting a high pass behavior. Can you please give us the correct notch circuit.

Thank you.

Cheers,

iasolano1 month ago

Hi, I'm interested in doing software for something like this, but I have no knowledge in the electronics involved. Is there some way I can buy the circuits ready to use?

when i made my circuit, it was a very small one with a few LEDs. when i rigged it up in the breadboard there was a lot of unwanted noise on it.. when i soldered the noise reduced considerably, almost became zero.. why not solder this onto a general purpose pcb??

when i made my circuit, it was a very small one with a few LEDs. when i rigged it up in the breadboard there was a lot of unwanted noise on it.. when i soldered the noise reduced considerably, almost became zero.. why not solder this onto a general purpose pcb??

when i made my circuit, it was a very small one with a few LEDs. when i rigged it up in the breadboard there was a lot of unwanted noise on it.. when i soldered the noise reduced considerably, almost became zero.. why not solder this onto a general purpose pcb??

when i made my circuit, it was a very small one with a few LEDs. when i rigged it up in the breadboard there was a lot of unwanted noise on it.. when i soldered the noise reduced considerably, almost became zero.. why not solder this onto a general purpose pcb??

also, where exactly is the program???

I downloaded processing and had a bit of trouble getting it to start the first few times it's almost like you need to open a blank sketch or a prewritten one to open the program and then start a new sketch. (sketches are what arduino and processing 2 call their code).

The problem that I have run into is that the project link with the downloadable codes that i found is missing some code around line 166 it appears to be missing code chunks here and possibly in an earlier portion of the code too.

If I am wrong please tell me, I would love to make the data interpretation code work after spending a considerable amount of time and money buying the parts (I had none to begin with) and hooking them up.

As of now i have a working EEG when hooked to an oscilloscope i can read the waves but the code is not full. and processing will not read it or record it because i do not have a full code.

IF ANYONE HAS SOLVED THIS PROBLEM PLEASE EMAIL ME AT RAYMONDVASSIL@GMAIL.COM

hi,

i have a couple of questions...

a) does this work on arduino platform directly or can the processing linked with arduino work??

b)i am not able to download processing actually... so any other alternate?? in multisim or labview?

c) where exactly are the electrodes going to be placed??

d) how to convert this to ecg measuring device????

thanx!!!

processing is not getting downloaded... is there any other possibility??? thanx!!

nik_sharky5 months ago

Hi, thanks a lot for Your awesome work. I'm newbie in electronics and have some questions.

1. R5 and R16 on common scheme is 220 Ohm but on detailed schemes its 270KOhm, I try calc RC filter freq and think that it should be 270K. Am I right?

2. Can I use ceramic capacitors instead of tantalum? Can't find it in DIP :( only SMD

3. I make circuit but for some reasons its not work correctly. Try to test it using 13Hz triangle wave from smartphone on input1 and input2 connected to GND. And see the signal until R9, so diff-amp and notch filter work normal, after R9 signal is too weak, what it can be, is it mut be 180KOhm?

If you want to present your SMD capacitors on a DIP package it's easy enough to make a small PCB that would sit on a DIP socket. Working with SMD components isn't as difficult as you might think, just have to be a little innovative with your soldering technique. I wouldn't worry about solder mask until you have a working prototype.

Thank for a reply :)
I was nebie when write previous comment, now I already use smd PCB adapters for smt components;

Hey I need some serious help with this project.
I'm a total newbie, and don't get half the tech here.

Plus the code seems to have been removed, and I've to work from the scratch on that too.
Could you help me please?

Easy going, You can connect only ad620 with gain resistor between 1 and 8 pins and bipolar power. Out of this circuit can be connected to mic input of computer and recorded with audacity free soft. You also need 1 electrode connected to ear (reference) and 2 connected to head.

Alright, I understand. :)

But how do I translate the Audacity input into a EEG graph?

And how do I differentiate between the Alpha, Beta and Delta waves?

Can I contact you on some other platform? I'm gonna need a lot more help man. Thanks for the reply though.

Especially with the Processing code. I intend to build the original Instructable. And yeah, don't have a strong base in electronics. :)

theadi152511 months ago

I downloaded the program (READ_EEG) and Processing show my "unexpected token: }" in 166 line and next (Cannot find anything named "in") 143 line, Is the program correct ?

i am running into the same error

I got the same error result. Did you ever get it resolved?

can someone please tell me what the code is supposed to be on line 166 of Read_EEG. it says "timeSignal(" and then it just ends like that. whats in that parentheses? THANK YOU

Would it make a difference if a Potentiometer was used versus a Trimmer Potentiometer? I do not understand the difference between the two.

lm358 is a dual op amp so can I just use three of them?
JanB53 months ago

Hi,

It took me some time to build this complex amplifier so nicely described in this initial post.

My electronic is powerd with 2x9 V bateries.

One non-significant change : the readout is using ADC to digitize the wave forms, sampled at 200 Hz (MAX144), FFT is done on the computer.

On the qualitative level my setup looks like it is working - at least I see on the scope a stream of pulses in the range between few to ~30 Hz

with the amplitude of ~50 mV. When I blink (or touch the electrods) the pulses goes over the scale (exceed few V).

So far so good - my problem is I can't find the alpha waves ( 5-10 Hz) lasting for at least a second.

I have tried many electrodes locations, ask the human subject to close the eyes, concentrate, then open the eyes - there is no discernable change in the wave form patterns.

Attached is PDF with more details:

- location of electrodes,

- FFT amplitudes for a 40 seconds long measurement (2D plot)

- examples of raw wave forms with closed & opened eyes (two 1D plots)

Perhaps someon sees what I do not see? A mistake in electrod location, a pattern ?

I'd like to turn on a LED with my thoughts - but I do not see how to controll with my though the brain waves which I measure.

Any advice is welcome

Thanks

Jan

1-40 of 169Next »