loading
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!

Step 1: Parts

I purchased most of my parts from Digikey (and Amazon). Their layout might seem slightly intimidating at first glance, but they seem like the cheapest place to get parts. And they have the USPS first class shipping option ( < $3 for small orders, choose this! It will save you a lot.), meaning you don't have to spend the same amount on parts as shipping, as it is on some websites. 

Chips:

- 1x Instrumentation Amplifier - AD620AN - This is the most expensive, and most important part. While technically you can make your own instrumentation amplifier from 3 op-amps, I could never get my own to give me good results. Precision cut resistors in this ensure that it'll do its job.
- 2x Quad Op-Amp - TL084CN - Any Op-Amp will do. You need 5 single amps, this one just includes 4 in each chip.

Capacitors: 

I would strongly suggest buying a capacitor bundle from ebay or the like, espcecially if you plan on ever doing some other sort of electronic project. One bundle and you're basically set for life. Regardless, whether you buy them in a pack or individually, make sure to include these capacitors :

- 1x 10 nF, ceramic
- 1x 20 nF, ceramic
- 1x 100nF, tantalum
- 5x 220nF, tantalum
- 1x 1uF, electrolytic
- 2x 10uF, electrolytic

Resistors:

Same as capacitors, I suggest a bundle. This is a very good one, has all the values you need (minus the potentiometer). The individual values you'll need, though, are:

- 1x 1kΩ Potentiometer - via Digikey - very useful to adjust your gain on the fly.
- 2x 12Ω
- 1x 220Ω
- 1x 560Ω
- 2x 22kΩ
- 1x 47kΩ
- 2x 100kΩ
- 2x 180kΩ
- 1x 220kΩ
- 2x 270kΩ
- 1x 1MΩ

Connectors:

- A breadboard to wire everything on. This one is large enough, and comes with useful jumper wires. I suggest saving the jumper wires specifically for connecting the various stages of the design. This will make it very modular, and easy to reorganize/reorder if you end up needing to.
- Wires for everything else. I like that pack, since it's pre-cut and keeps your board tidy. You can also get plain wire and cut it yourself.
- 3.5mm audio cable.
- 2x 9V batteries for power.

Electrode Supplies:

- Ambu Neuroline Cups seem to be the most cost-effective method, found here. Thanks to user jonencar for the link in the comments.
- electrode gel
<p>What program did you use to make the breadboard layout?</p>
​Hi , I am making your project but i couldn't find AD620AN in my local<br><br>what can i use instead of AD620AN ?<br><br>and How can i make DIY electrodes at home <br>
<p>What values of capacitors and resistors do I use in the notch filters for 50Hz? Because it's 50Hz where I live.</p>
<p>Your power outlet freq. has nothing to do with the circuit, because you will be using 9V batteries to power the circuit, which is DC.</p>
<p>I know but the circuit will still experience this ambient noise, as mentioned in step 4.</p>
<p><a href="http://www.calculatoredge.com/electronics/sk%20high%20pass.htm" rel="nofollow">http://www.calculatoredge.com/electronics/sk%20hig...</a> This will defiently help</p>
<p>Totally! Thanks! :D</p>
have u tried it
Hi, <br>Where I live is 50 hertz. What do you need to change?
<p>For the first notch filter I used a 10 ohm resistor instead of 12 ohms given here in the circuit.</p><p>It seemed to have filtered out 50hz signal. At least thats what prelimnary FFT on the signal seems to suggest. </p>
<p>Ah alright. I'll try that..</p>
Try using a different configuration (Twin T) for the 50hz notch filter. I'm doing so, as I couldn't figure out the configuration or transfer function of the particular design he gives, but can calculate it easier building one from the Twin T way. (there are specific tutorials online in how to construct a 50hz specifically with values if that's easier) then just connect to the following circuit block as normal.
Ah yes! I'll try that. Thanks!
<p>Hey guys, so I, unlike most of the people who completed this seem to have done, did this project on a breadboard. After everything is said and done, it seems to work. When I run the code, i can make the graph spike and jump mainly by shaking my head or occasionally when blinking eyes. It seems that the gain on my model is not high enough, as beta waves (i.e. when shaking head, moving eyebrows, etc.) show up strongly and alpha waves are hit or miss at best. I'll go back and check my circuit to make sure it was all done correctly and such which may address the problem. That being said, assuming I made no egregious errors, the graphs you will see will not look like the image provided in all probability (at least not on your first few go-arounds). The waves were not nearly that defined for me and they looked to be generally like a series of arches that specific data points, and, for me, the bars on the bottom did not really move. Whether it was an issue with the code or my setup, I'm not sure. That said, I did some extensive testing on this system and it does indeed do what it is advertised to do and I made sure that it was indeed brainwaves that were being measured and not random interference, albeit not at the same advertised resolution, at least for now. </p><p>Something very useful I found out: if you have access to a 3d printer at your university/school or anywhere else, I suggest using it. I used 3d models from a company called OpenBCI, which is an open-source BCI company that allowed me to use their models for free to create this headset. It improved comfortability and increased accuracy of electrode placement a hundred times over, and I would advise attempting it if you have such a thing at your disposal. Overall a great journey. I'm planning on improving this one and hopefully moving on to a better version later on by applying some upgrades of my own that I've been formulating. Good luck to anybody attempting this, the instructable was missing a few things (i.e. working code and had some ambiguous statements at times), but it was solid overall, especially for one of such length. If anybody is curious, this guy, Marquis de Geek made some great improvements to the code if you're not one of those people who can code well, and his version seems to work well. here's the link: <a href="https://github.com/MarquisdeGeek/EEG" rel="nofollow">https://github.com/MarquisdeGeek/EEG</a></p>
<p>Hi Alan,</p><p>Since you already made this, can you please clarify as to how did you use the tantalum capacitors in the project.</p><p>The schematic given here does not say anything about the polarity of tantalum capacitors. But as far as I know, putting tantalum caps in the wrong direction can destroy it.</p><p>So do I need to keep any particular polarity for the tantalum caps?</p><p>Hope to hear from you.</p>
<p>Hi,<br><br>So, I actually ran into the same issue building the circuit. Rather than deal with the uni-directional capacitors and track down the current to make sure everything was hooked up properly, I just got some ceramic caps for those instead of tantalum. The diagram called for bi-directional caps, so I decided to trust that instead of the material that was called for in write-up (which never references the fact that the tantalum caps have a direction anyway).</p>
<p>Thanks a lot !!</p>
Hello sir. .. i really appreciate your kindness and for distributing knowledge among people . ..<br>Please. . I just want to do another experiment. . So I just want to detect the signal. .. so can the signal after amplification be detected by the regular oscilloscope? <br>Thank you very much sir
<p>It depends on several factors, but, in short, not really. Of course it is entirely feasible for you to switch out that 560 ohm resistor for another to increase the gain (all the way up to 10,000 if you felt like it, following the specifications of the instrumentation amplifier and the formula provided to determine the gain) and it would be then entirely possible to read it on an oscilloscope, provided your scope had the proper specifications (bandwith, min/max input voltage, etc.). The problem I foresee here though is that these filters that are included are entirely necessary for a few reasons. Even if you have built-in low and high pass filters on you oscilloscope to satisfy the Nyquist Criterion in order to even read the frequency spectrum, you still willl invariably need that 60 Hz noise filter. Let me provide an example to show you what I mean. If you read a signal of say, 12 microvolts, then amplify it 10,000 times, but you don't remove any of the noise, you've amplified the ambient voltage from your lights and your computer, and whatever nearby electronics there are, also by 10,000 times. So, if you went to read the signal then, you would only see random fluctuations of ambient noise and you would have much less signal than you do noise, so chances are you wouldn't see any noticeable movement based on what you were thinking or doing with your body from the eeg signal, because your noise was amplified so much it was covering up any signal you may be trying to measure. But, if we do it as above, providing a small pre-amplification, then filtering out noise (like 60Hz electrical hum), then amplified the signal the rest of the way to whatever your desired amplification is, you will only have amplied your signal (at least in an ideal circuit) and you could easily measure that on your scope.</p>
<p>It depends on several factors, but, in short, not really. Of course it is entirely feasible for you to switch out that 560 ohm resistor for another to increase the gain (all the way up to 10,000 if you felt like it, following the specifications of the instrumentation amplifier and the formula provided to determine the gain) and it would be then entirely possible to read it on an oscilloscope, provided your scope had the proper specifications (bandwith, min/max input voltage, etc.). The problem I foresee here though is that these filters that are included are entirely necessary for a few reasons. Even if you have built-in low and high pass filters on you oscilloscope to satisfy the Nyquist Criterion in order to even read the frequency spectrum, you still willl invariably need that 60 Hz noise filter. Let me provide an example to show you what I mean. If you read a signal of say, 12 microvolts, then amplify it 10,000 times, but you don't remove any of the noise, you've amplified the ambient voltage from your lights and your computer, and whatever nearby electronics there are, also by 10,000 times. So, if you went to read the signal then, you would only see random fluctuations of ambient noise and you would have much less signal than you do noise, so chances are you wouldn't see any noticeable movement based on what you were thinking or doing with your body from the eeg signal, because your noise was amplified so much it was covering up any signal you may be trying to measure. But, if we do it as above, providing a small pre-amplification, then filtering out noise (like 60Hz electrical hum), then amplified the signal the rest of the way to whatever your desired amplification is, you will only have amplied your signal (at least in an ideal circuit) and you could easily measure that on your scope.</p>
<p>hello sir :)</p><p>please i have a question --</p><p>why a lot of these kind of circuits they use a/d converter and then present it on pc ?</p><p>can they use an oscillator like ( usb oscillator ) like this ---</p><p></p><p>im waiting for your answer :) thank u for ur kindness ..</p>
<p>Hopefully, I'm understanding your question correctly. As far as why many of these types of circuits use an ADC, the reasoning behind this has to do with optimization for more complex circuits. While, in a simple EEG setup like this one, an analog cable such as the 3.5mm one used here is fine for relaying the data to the computer, but in larger systems it's not as efficient. In systems with, say, 16 channels, you would use an analog multiplexer to to read and pass all of these various signals to your high-speed ADC which would then allow you to pass it all at once through a bus (like a USB) to your computer which can then read it all without the need for the added complexity of keeping your analog signals isolated. Though there's not much reason to build this section yourself, both for the added complexity and cost as well as decreased reliability, and you could easily accomplish this by passing your signal into a pre-built micro-controller like an Arduino or something and hooking that straight up with a USB to your computer. I hope that answers your question.</p>
<p>If we do the helmet, do we need to use the gel anymore?</p>
<p>no you don't need the gel anymore if you go the helmet route, the electrodes are dry electrodes. They run slightly more expensive, but are definitely worth it.</p>
<p>Dude! The helmet is way wicked cool! A true brain bucket! I'm probably going to use the ole &quot;silver spoon&quot; technique for style -- but that sci-fi lookin headgear is making you the envy!</p>
<p>Does anybody know what to do about this?</p>
<p>How do the electrodes connect to the breadboard? all the pictures I've seen don't include it.</p>
<p>how do I download the sketch? please somebody answer my questions</p>
<p>My circuit seems to work until the LPF(LM4250) which locks the signal at a DC voltage. Anyone who might know what's wrong?</p>
<p>how do I connect the electrodes to the breadboard? I'm kind of new at this and I don't understand the GND</p>
<p>Why not simply replace the 60Hz notch filters by setting up the amplifiers as a differential amplifiers with a reference at a site with no EEG signal, but near equivalent electrical noise (such as the earlobe)?</p>
<p>Guys i am noob... i want to relly make this.... do this actually work??? becaue i am a poor student in poor country ao...asking some question.....hope you reply me</p>
<p>I want to use 6 electrodes, which would require me to create 3 same circuits. The question is, how do i connect electrodes to arduino? I simply ignore sound card, and wire it to analog input?</p>
<p>You should be able to go directly to an analog input. Just make sure the voltages are positive.</p>
<p>One more question. Tantalum capacitors, as far as i know, are Polarized. I can't seem to find + and - markings in schematic of the circuit. Only for electrolytic one.</p>
<p>You could just use ceramic capacitors instead of tantalum ones.</p>
<p>Then what is the point of semiconductor capacitors if they can be replaced? Just curious :D</p>
<p>Tantalums have a few advantages. A couple are that they are physically small in size for a large capacitance (uF range) and they do not contain electrolyte like electrolytic caps so cant dry out if left unused for long periods of time.</p><p>They are limited in voltage range. </p>
<p>I'm not sure why he chose tantalum capacitors over ceramic.</p>
<p>I would suggest that you don't use tantalum caps in these locations. Any non polarised caps will do but ceramics tend to be more stable and are closer tolerance.</p>
<p>The above instructable says that the alpha brain waves have an ampltude of 10 -30 microvolts whereas this article that I have linked below says that the alpha brain waves have an amplitude in the range of 20-200 microvolts.</p><p>This is a major difference(a factor of 10) and will make a huge difference in the gain applied in the second amplification stage.</p><p>So which one is correct ?</p><p><a href="http://www.psych.westminster.edu/psybio/BN/Labs/Brainwaves.htm" rel="nofollow">http://www.psych.westminster.edu/psybio/BN/Labs/Br...</a></p>
The parts list have tan capacitors marked nf, but i cannot find any 220nf caps, only 220uf caps,, is the parts list correct?
<p>Initially I had similar issues as I could not locate tant caps with 100nF and 220nF ratings but ultimately I found a vendor (here in India).</p><p><a href="http://www.industrybuying.com/capacitors-multicomp-EL.CA0.1500908/?q=tant+capacitor&cat=" rel="nofollow">http://www.industrybuying.com/capacitors-multicomp...</a></p><p>and</p><p><a href="http://www.industrybuying.com/capacitors-multicomp-EL.CA0.1500909/?q=tant+capacitor&cat=" rel="nofollow">http://www.industrybuying.com/capacitors-multicomp...</a></p>
<p>can i use it in a car for a car safety? that is when a driver feels sleepy the alarm makes the driver alert....can i make it....please reply fast.....if it is possible can you sent me the circuit diagram?</p>
<p>Hi I am actually trying to do the exact same thing right now for an EDD (Engineering Design and Development) class and I am having trouble with the coding part of it right now if you know anything about that maybe we could try to figure this out together! </p>
<p>Hi I am trying to put the code from Read_EGG into the processing system that it tells you to download and when I hit run it comes up with a lot of different errors dealing with &quot;FFT&quot;, &quot;minim&quot;, &quot;in&quot; etc... I don't know what to do I don't really know coding all to well can anyone help me please! I need a response fast! </p>
<p>please help me, sir</p>
<p>can i make it with only the 1mohm potentiometer, and no other potentiometers, or do I have to buy all of them</p>
<p>can I make it with only the 1kohm potentiometer, but no other potentiometers</p>
<p>How would I export the data to an app? </p><p>And also could you give me some links for quality dry electrodes for if I use the helmet? </p>

About This Instructable

705,569views

1,037favorites

License:

More by cah6:DIY EEG (and ECG) Circuit 
Add instructable to: