diy eeg (and ecg) circuit

Upload: nicholas-larson

Post on 19-Oct-2015

465 views

Category:

Documents


13 download

DESCRIPTION

Plans for a diy EEG and ECG circuit

TRANSCRIPT

  • EEGs are a noninvasive way to look into your brain. While the brain is extremely complex, areas of itcan lock into circular firing patterns, resulting in telltale brain waves that one can observe with the rightequipment. Intensity of these waves change depending on your internal state. The waves we will bemost easily able to distinguish are alpha and beta waves -- alpha waves occur at around 8-12 Hz andwhen measured from the frontal lobe provide an estimate of how relaxed a person is, while beta wavesare 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 patternsdepending on where you measure them from. For example, alpha concentrations on the left motor cortexincrease when you think about moving your right hand. Regardless of where you're takingmeasurements, looking at the concentrations of waves in real time - a process called biofeedback - cangive you much greater control over them.

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

    The aim for this project is to be easily available and understood by people of every technologybackground. For those electronically savvy, I will include up front a finalized schematic so you can jumpright 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 actuallyinterpreting the raw data you receive.

    So - let's start!

    Related

    (/files/deriv/FEH/C1XA/H5TU9RMD/FEHC1XAH5TU9RMD.LARGE.gif)

    About This Instructable

    Posted:Aug 10, 2012

    License:

    62,574 views

    159 favorites

    (/member/cah6/)

    cah6 (/member/cah6/) Follow 22

    eeg (/tag/type-id/category-technology/keyword-eeg/)

    circuit (/tag/type-id/category-technology/keyword-

    circuit/)

    Tags:

    (/id/EEG-

    EEG "Coral" headband(/id/EEG-Coral-headband/)by dukode (/member/dukode/)

    (/id/How-

    How to hack EEG toys witharduino (/id/How-to-hack-EEG-toys-with-arduino/)by frenzy (/member/frenzy/)

    (/id/Brain-

    Brain-Controlled RCHelicopter (/id/Brain-Controlled-RC-Helicopter/)by puzzlebox (/member/puzzlebox/)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)(/)

    let's make

    share what you make >

    (/about/submit.jsp)(/)

    Explore (/tag/type-id/) Create (/about/submit.jsp) Contests (/contest/) Community (/community/)Login ( )

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    1 of 20 9/25/2013 5:29 AM

  • Step 1: Parts

    I purchased most of my parts from Digikey (http://www.digikey.com/) (and Amazon). Their layout mightseem slightly intimidating at first glance, but they seem like the cheapest place to get parts. And theyhave 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 (http://www.digikey.com/product-detail/en/AD620ANZ/AD620ANZ-ND/750967) - This is the most expensive, and most important part. While technically youcan make your own instrumentation amplifier from 3 op-amps, I could never get my own to give me goodresults. Precision cut resistors in this ensure that it'll do its job.- 2x Quad Op-Amp - TL084CN (http://www.digikey.com/product-detail/en/TL084CN/296-1784-5-ND/277429) - 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 everdoing 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 (http://www.amazon.com/Joe-Knows-Electronics-Value-Resistor/dp/B003UC4FSS/ref=sr_1_1?s=toys-and-games&ie=UTF8&qid=1340397296&sr=1-1) is avery good one, has all the values you need (minus the potentiometer). The individual values you'll need,though, are:

    - 1x 1k Potentiometer - via Digikey (http://www.digikey.com/product-detail/en/3362P-1-102LF/3362P-102LF-ND/1088411) - 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

    See More (/tag/type-id/?q=)

    (/files/deriv/FLZ/T2TP/H3Z3C82W/FLZT2TPH3Z3C82W.LARGE.jpg)

    (/id/Brain-

    Brain-Controlled Wheelchair(/id/Brain-Controlled-Wheelchair/)by jerkey (/member/jerkey/)

    (/id/Mindflex-

    Mindflex Duel BluetoothArduino FIO Hack(/id/Mindflex-Duel-Bluetooth-Arduino-FIO-Hack/)by mbmosher (/member

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    2 of 20 9/25/2013 5:29 AM

  • - 2x 270k- 1x 1M

    Connectors:

    - A breadboard to wire everything on. This one (http://www.amazon.com/microtivity-400-point-Experiment-Breadboard-Jumper/dp/B004RXKWDQ/ref=sr_1_3?ie=UTF8&qid=1340398203&sr=8-3&keywords=breadboard) is large enough, and comes with useful jumper wires. I suggest saving the jumperwires specifically for connecting the various stages of the design. This will make it very modular, andeasy to reorganize/reorder if you end up needing to.- Wires (http://www.amazon.com/Elenco-Piece-Pre-formed-Jumper-Wire/dp/B0002H7AIG/ref=sr_1_1?s=toys-and-games&ie=UTF8&qid=1340398467&sr=1-1&keywords=jumper+wire+set) foreverything else. I like that pack, since it's pre-cut and keeps your board tidy. You can also get plain wire(http://www.amazon.com/100-Stranded-Wire-Gauge-Black/dp/B0006O94DE/ref=sr_1_1?s=toys-and-games&ie=UTF8&qid=1340398643&sr=1-1&keywords=22+gauge+wire) and cut it yourself.- 3.5mm audio cable (http://www.amazon.com/Cables-Unlimited-AUD-1100-06-6-Feet-Stereo/dp/B000SE6IV8/ref=pd_sbs_t_7).- 2x 9V batteries for power.

    Electrode Supplies:

    - Ambu Neuroline Cups seem to be the most cost-effective method, found here(http://www.ambuusa.com/usa/search/product/neuroline_cup.aspx?PID=23913). Thanks to userjonencar for the link in the comments.- electrode gel (http://www.amazon.com/Parker-Spectra-Electrode-Gram-Tube/dp/B0002CA8RQ/ref=sr_1_1?ie=UTF8&qid=1340913387&sr=8-1&keywords=spectra+360+electrode+gel)

    Step 2: Complete Design

    The attached picture is the final schematic. After the instrumentation amplifier, each box is a singleop-amp (couldn't find a non-dual op-amp using this schematic program). I've also included the frequencyresponse of the finished circuit (taken with the NI myDAQ, a good all-purpose oscilloscope) -- excludingthe ~90x amplification the data receives by going through the instrumentation amplifier. For those nottoo familiar with dB, a nice conversion calculator with dB to linear gain/attenuation can be found here(http://www.mogami.com/e/cad/db.html).

    Regarding power: the easiest way to power the circuit is with 2 9V batteries. To feed your op-amps -9Vto 9V of power, connect one battery the correct way, and one backwards. That is, connect the positivelead of one battery to your positive power supply line and its negative lead to GND (ground). With theother battery, connect its positive lead to GND, and its negative lead to the negative power supply line.

    (/files/deriv/FR5/NQTR/H3QFL7UP/FR5NQTRH3QFL7UP.LARGE.jpg)

    (/files/deriv/FTY/HDPF/H6MF2WPG/FTYHDPFH6MF2WPG.LARGE.jpg)

    (http://cdn.instructables.com/FUV/VMQ0/H3QEXKLR/FUVVMQ0H3QEXKLR.LARGE.jpg)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    3 of 20 9/25/2013 5:29 AM

  • To "set" GND, you will eventually connect an electrode from your leg directly to the GND line. This willensure that "0V" is your leg's voltage (unaffected by any head activity), and that all readings will varyfrom there.

    The biggest design goal for this circuit is to obtain the data, then reduce noise by enough to get a goodsignal into the computer, where we will process the data a bit more. As we will be using our computer'ssound card to get the data in, we have to cut noise enough that the signal with noise does not spikeabove or below +1V and -1V, as this is the point where the sound card clips the data off. As we will beusing +-9V through batteries to power the circuit, we also have to make sure that as our data is goingthrough the circuit, it never peaks above or below this value.

    I've also included an example of how to lay out the components on a breadboard, one with notes on itand one without. It isn't exactly how I did it, but should give you a general idea if you haven't worked withbreadboards before. Still, I do NOT suggest using that picture as a strict guide on how to wireeverything. Follow the actual schematic -- the breadboard layout looks like a pretty jarbled mess (it getsreally hard to avoid that when you try to fit everything on a 30-column board). The program also didn'talways layer the components correctly, and since there's no way to test the "breadboard schematic",there's a possibility that it's not perfect. Use it as a general guideline, if you need it.

    To clarify some specific colors used on the breadboard view -- all red wires are power lines, and allblack are basic interconnections between circuit pieces (most are connections to ground). The greenwire is the output of the first notch filter, the yellow is the output of the 8 Hz HPF, the blue is the output ofthe 30 Hz LPF, and the white wire is the output of the gain stage. The box at the bottom represents theaudio cable going to the sound card.

    In general, things to remember are that in breadboards the power lines (top and bottom rows) areconnected horizontally, and the rest is connected vertically, with breaks in connections across themiddle gap. When looking at the schematic, take care not to connect wires together unless a black circleis there with the connections - a cross without a dot doesn't indicate a connection.

    Step 3: Stage 1 - Instrumentation Amplifier

    An instrumentation amplifier takes as its inputs 2 voltages, and outputs the difference between the twomultiplied by some gain, G. Instrumentation amplifiers, however, are not perfect. On real amplifiers, theoutput is slightly skewed if both input voltages are offset the same by some amount. A perfect amplifierwould take as inputs 2.1V and 2.2V, and output 0.1V*G. A real one is influenced by this common offset,and will change the output slightly accordingly. The Common Mode Rejection Ratio (CMRR) is a valuegiven to the amplifier that corresponds to how well it ignores the common offset between inputs. A higherCMRR is better, and will output something closer to what a perfect amplifier would. It is possible to make

    (/files/deriv/F1O/L5RJ/H3QFJ1G9/F1OL5RJH3QFJ1G9.LARGE.jpg)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    4 of 20 9/25/2013 5:29 AM

  • your own instrumentation amplifier (usually with 3 op-amps (http://en.wikipedia.org/wiki/Instrumentation_amplifier)), but unless you make it with precision resistors, it will suffer from a lowCMRR. I personally couldn't get a good reading with a self-made instrumentation amp.

    Using an instrumentation amplifier chip, the gain is changed by altering the value of the resistor betweenpin 1 and 8.

    The datasheet for the AD620AN (our instrumentation amplifier) is here (http://www.analog.com/static/imported-files/data_sheets/AD620.pdf). From it, you can see that the formula for gain using this chip isG = 1 + 49,400 / Rg, which equates to a gain of 89.2 with a 560 ohm resistor. This is a good number toget the data into a not-miniscule range; we'll add a way to adjust gain on the fly a bit later. You shouldalso see on this datasheet that on your actual circuit, your active electrodes (ones that are not theground electrode) will be connected to pin 2 and 3 (-IN and +IN).

    Step 4: Stage 2 - 60 Hz Notch Filter

    The biggest source of noise in our system will be centered at 60 Hz, due to power line interference.

    (/files/deriv/FNP/SS4W/H3QF1FD0/FNPSS4WH3QF1FD0.LARGE.jpg)

    (http://cdn.instructables.com/FB5/LWP9/H3QFM1WR/FB5LWP9H3QFM1WR.LARGE.jpg)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    5 of 20 9/25/2013 5:29 AM

  • Even if you use batteries to power your circuit, your circuit will still experience this noise. For thisreason, we will have 2 "notch" filters - filters that have a severe reduction of gain around 1 particularfrequency. We will use one now, to cut out as much interference as we can before we apply any moregain to our circuit, and one at the very end, to cut out any more interference we may have picked up.

    The notch filter is most sensitive to changes in the 12 ohm resistor. To ensure the notch is centered at60Hz, take a reading (detailed on the last stage) at the end of the instrumentation amplifier, then do soagain once the signal has gone through the notch filter. You should see a significant reduction in theamplitude of the 60Hz (light grey) frequency band. If it is not centered at 60Hz, try a 10 ohm resistor, oreven a different 12ohm one, as at that resistance it can easily vary by a considerable amount.

    Step 5: Stage 3 - 7Hz High Pass Filter

    As we are measuring data across the skin, our final data will also contain voltage from our galvanic skinresponse across our head. This will obscure the brain data we want, and as this interference is primarilylow frequency, it can be fairly easily filtered out with a high pass filter (HPF). The trade-off doing this isthat we also filter out a lot of gamma/delta wave data (the brain waves that are about 8 Hz and less), butif our main focus is alpha/beta wave monitoring, this isn't much of a problem.

    (/files/deriv/F2T/5L7V/H3QFL7V3/F2T5L7VH3QFL7V3.LARGE.jpg)

    (/files/deriv/F9Q/7EO6/H3QFJN23/F9Q7EO6H3QFJN23.LARGE.jpg)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    6 of 20 9/25/2013 5:29 AM

  • This filter is a 2-pole HPF with a cutoff frequency of 7.23Hz. A cutoff frequency of 7.23Hz means that atthis frequency, the circuit outputs data that is reduced to about 71% of its original value. As it is a highpass filter, frequencies above this cutoff will approach a gain of 1, while frequencies below will becontinually reduced. The filter having 2 poles means that in the region below the cutoff frequency, thegain falls off much faster than a simpler resistor/capacitor circuit. More specifically, in this circuit, ourdouble pole design reduces data by a factor of about 56 by the time it gets to 1Hz, while a single polewould only reduce it by a factor of about 7.5.

    Along with the circuit design, I've also included the frequency response of this particular section.

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    7 of 20 9/25/2013 5:29 AM

  • Step 6: Stage 4 - 31Hz Low Pass Filter

    Next up, we want to filter out data above the frequencies we are interested in. More specifically, as betawave information stops out at 30Hz, we want to get rid of anything above that, as combined it cancontribute a good amount of noise to our data. The circuit design is very similar to the high pass filterfrom stage 3 - it has a gain of .71 at 31.23Hz, and decreases from there at a rate such that by 300Hz ithas attenuated the data by about a factor of 100.

    Again, I've included the frequency response of this section here.

    Step 7: Stage 5 - 1 Hz HPF and Gain of 83-455

    (/files/deriv/F94/TYG6/H3QFJ1IY/F94TYG6H3QFJ1IY.LARGE.jpg)

    (http://cdn.instructables.com/FRO/NM3B/H3QF1F05/FRONM3BH3QF1F05.LARGE.jpg)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    8 of 20 9/25/2013 5:29 AM

  • The beginning of this circuit contains a quick HPF of cutoff frequency 1Hz (Fc = 1/(2*pi*R11*C11), justfor some extra attenuation of unwanted noise. On the other end, the resistor and capacitor in parallelprovide some extra filtering of high frequencies (Fc = 1/(2*pi*10nF*100k) = 160Hz on a low-pass filter).

    The main purpose of this section, however, lies below this, with the 220 resistor and potentiometer(pot for short). This op-amp is a non-inverting amplifier (http://en.wikipedia.org/wiki/Operational_amplifier#Non-inverting_amplifier), and so has a gain of G = 1 + R12/(R13+R14),(ignoring the 10nF capacitor, as it's a small value and won't contribute much to the gain). Thepotentiometer is a variable resistor - when the input is connected to the first pin and the output to thesecond, turning the wiper changes its resistance linearly between 0 and 1000 ohms. This means thatwhen the pot is turned all the way to the left, the gain of this circuit is G = 1 + R12/(R13 + 0) = 1 +100k/(220 + 0) = 455. When it is turned all the way to the right, the gain is G = 1 + R12/(R13 + 1000) =1 + 100k/(220 + 1k) = 83.

    Remember, this 83-455 gain is on top of the 89.2x gain from the instrumentation amplifier. Alpha waveamplitude varies from person to person, from about 10 to 30 uV. Using a middle value of 20 uV, thismeans the ending voltage reading could range from 83*89.2*20e-6 = .148V to 455*89.2*20e-6 =.81172V. Once you've started taking readings, adjust the potentiometer such that when you're notmoving at all, voltages don't fluctuate offscreen (over 1V). It doesn't have to be maximized such that theamplitude is the highest possible without clipping - just know that if you make it too small, you'll increasethe error incurred from digitally reading the data into the computer.

    Step 8: Stage 6 - Another 60Hz Notch Filter (and into the computer!)

    (/files/deriv/FPG/QOXA/H3QFJ1IX/FPGQOXAH3QFJ1IX.LARGE.jpg)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    9 of 20 9/25/2013 5:29 AM

  • Even with all the previous filtering stages, the data will still at this point contain a good amount of 60 Hznoise. To fix this, we will process it through another notch filter centered at 60 Hz, identical to theprevious one. The final data will still have a small amount of noise, but that can be ignored throughsoftware once the data is loaded into the computer.

    To get the data into the computer, we will be using a 3.5mm male-to-male cable (this is the same sizeending as any headphone jack). On the cable, the first 2 notches are the right and left channels, and theone furthest down is GND. As shown in the picture, you should connect the end of the cable between the22k resistor and 220nF capacitor (the yellow alligator clip), and the base of the cable to the GND line ofyour circuit -- the same line you connected your GND electrode to (the red alligator clip in the image). Isuggest connecting the other end of these alligator clips to jumper wires, inserting these into theirappropriate place in the circuit. Connect the other end of the cable into the microphone port of yourcomputer, and you're good to go!

    (/files/deriv/FUY/EDNA/H3QETR43/FUYEDNAH3QETR43.LARGE.jpg)

    (/files/deriv/F22/KAB3/H3ZN4VY6/F22KAB3H3ZN4VY6.LARGE.jpg)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    10 of 20 9/25/2013 5:29 AM

  • Now, onto the electrode setup and code.

    Step 9: Getting electrodes, and proper placement

    For the electrodes themselves, these (http://www.discountdisposables.com/index.php?act=viewProd&productId=16) are known to be very good ones. Check this page for updates, though, as I'm currentlyinvestigating cheaper ways to make your own electrodes.

    There are many possible electrode placements - which one you choose will depend on a mix ofconvenience and what you wish to measure. For a trial demonstration, we will measure alpha wavesoriginating from the occipital lobe. This is because these waves are the easiest to produce, are quitelarge in amplitude, and only require 1 electrode on a section of the scalp with hair.

    Parts of your head you'll need to know for this are the mastoid (http://en.wikipedia.org/wiki/File:Processusmastoideusossistemporalis.PNG), nasion (http://www.google.com/imgres?imgurl=http://www.gtec.at/var/plain_site/storage/images/media/images/support/mount_gammacap_nasion_inion/10705-1-eng-GB/mount_gammacap_nasion_inion.png&imgrefurl=http://www.gtec.at/Support-Offer/FAQ/Tips&h=389&w=410&sz=32&tbnid=67W64DTMB1JjyM:&tbnh=90&tbnw=95&zoom=1&usg=__CXDcWJ4adYvjxji6RjwkyFJ4Gjg=&docid=sd5hJ1RQxi1DhM&hl=en&sa=X&ei=sCXrT8SYJarY2QXj_LWfAQ&ved=0CGYQ9QEwBg&dur=202), and inion(http://www.google.com/imgres?imgurl=http://www.gtec.at/var/plain_site/storage/images/media/images/support/mount_gammacap_nasion_inion/10705-1-eng-GB/mount_gammacap_nasion_inion.png&imgrefurl=http://www.gtec.at/Support-Offer/FAQ/Tips&h=389&w=410&sz=32&tbnid=67W64DTMB1JjyM:&tbnh=90&tbnw=95&zoom=1&usg=__CXDcWJ4adYvjxji6RjwkyFJ4Gjg=&docid=sd5hJ1RQxi1DhM&hl=en&sa=X&ei=sCXrT8SYJarY2QXj_LWfAQ&ved=0CGYQ9QEwBg&dur=202). The mastoid is the bone behind your ear: you can easily feel it by rubbing that area. Thenasion is the ridge between your nose and forehead, just between your eyebrows. The inion is the pointwhere your skull ends at the back of your head.

    For this setup, you'll need a bandana and some tape (I used electrical tape, but scotch tape or even aband-aid would probably work). First, find your left mastoid. Clear away any hair, and tape the groundelectrode to the skin there. Next, tie the bandana tight around your head, such that it is above both thenasion and inion. The bandana will be used to secure in place the remaining 2 electrodes. Put oneelectrode about 1 inch above and 1 inch to the right of your nasion, and the second the same distancefrom your inion. Using this (http://en.wikipedia.org/wiki/File:21_electrodes_of_International_10-20_system_for_EEG.svg) top down view, your electrodesshould be roughly in the area of Fp2 and O2.

    As mentioned, we will be primarily measuring alpha waves with this setup. Alpha waves are around 8-12Hz waves, and in general increase in amplitude when you are relaxed or in a more meditative state.Because one electrode lays on your occipital lobe (the part of your brain used for visual processing),whenever you close your eyes there should be a distinct increase in alpha wave concentration. Theincrease should be even more apparent if you relax and try to clear your mind while your eyes areclosed.

    (/files/deriv/FH9/V3GW/H5JVXVJC/FH9V3GWH5JVXVJC.LARGE.jpg)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    11 of 20 9/25/2013 5:29 AM

  • Step 10: "Processing" the Data

    CAUTION: I highly suggest doing this on a laptop, because there is a danger involved if there's a spikein voltage from the wall outlet. Regardless, BE VERY CAREFUL WITH THE PROBES GOING TO THESOUND CARD. If they accidentally touch a high voltage source (i.e. you stick them into a power outlet),you can fry your computer's sound card.

    First thing to do is to download Processing, available at http://processing.org. It doesn't require anyinstallation; just unzip the download, open the folder, and run it. Download the sketch (what programs arecalled in processing), and open it up. The program should be good to go as is, and while there should beenough documentation to understand what's going on in the sketch, I want to make a few notes and givea general outline of what it does here.

    I encourage you to tinker with the program - change things, make your own, etc. Don't be afraid to breakit, since a working version can always be found here. If you're new to programming, the guys that madeprocessing have some really great basic tutorials here (http://processing.org/learning/). One thing tonote is that Processing is case sensitive - if at some point you type in FFTHeight instead of FFTheight,the program will give you an error and take you to the line where you typed in the former. I didn'tdocument every single function that I used - if you're unsure about what a part of code does, you shouldlook up the function being used at processing.org, so that you can see what its meant to do, as well asexactly what it takes as inputs and produces as outputs. Audio classes won't be found as easily there(minim, FFT, AudioInput, etc). To find documentation for those pieces, look here(http://code.compartmental.net/tools/minim/), specifically at the manuals under the tools tab at the top.

    Also, a little background on the FFT. Data can be represented in many ways, two common ways being intime and frequency. Representing information into frequency domain usually amounts to showing data asthe combination of a lot of sine waves with various frequencies and amplitudes. If you have a pure sinewave, say oscillating at 1 Hz, you would see the sine wave we all know and love in the time domain, butin the frequency domain would just see one line at f = 1. If in time you had a wave that was made byadding one sine wave at 1 Hz, and one that was half the amplitude the first but at 2 Hz, in frequency youwould see two lines - one at 1 Hz with a height of 1, and one at 2 Hz with a height of 0.5.

    From this, you can represent very complicated signals (any signal!) as a combination of a number(sometimes an infinite number) of sine waves. The most common way to convert signals from the timedomain to frequency is with the FFT (Fast Fourier Transform). It does exactly what I just described -- ittakes as input a section of time domain signal, and outputs bands corresponding to the concentration ofcertain ranges of frequencies in that signal. This data can easily be visualized by displaying each bandas a bar with a certain height, as I did in the code.

    This program is really just a data acquisition / visualization one. There are a LOT of things you can dowith this circuit -- I encourage you to really play around with it and make something of your own! Thenext step is an optional one detailing something a little more fun that I made with the type of dataacquired in this program.

    Code available here (http://rapidshare.com/files/4025495621/READ_EEG_cleaner.pde).

    (/files/deriv/FQ4/7TBN/H401UZ2Y/FQ47TBNH401UZ2Y.LARGE.jpg)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    12 of 20 9/25/2013 5:29 AM

  • Step 11: Playing Pong With Your EEG

    I also decided to make a quick demo game of something more fun you can do with the EEG circuit. Youcan read most of this in the attached processing code, but the general concept is a simple pong gamewhere you control the paddles with your concentration of alpha waves. The easiest way to manage thecontrols is to close your eyes and relax to make the paddle move up, and to open your eyes and focusto make it move down. The electrode setup is the same as the previous code slice - GND behind leftear, and active electrodes on the right frontal and occipital lobes.

    The associated code is much neater than the data-reading one. Because the game code incorporatesobject oriented programming, experienced programmers will likely find it easier to follow along, whilethose that have not worked with object oriented code before may have a harder time. If you fall into thelatter category, I highly suggest reading this tutorial (http://processing.org/learning/objects/) to getfamiliar with the basics.

    The circuit used for this one is exactly the same, except you need two, since you have two players. Toget it in via the audio cable, connect one of the circuits the usual way (outlined in the previous steps),and the other circuit to the other audio channel (the middle section of the audio cable). You can use oneset of batteries for both circuits, so they should share the same ground.

    Code available here (http://rapidshare.com/files/2686115236/TWO_PLAYER_PONG.pde).

    Quick video demo of me using it against a wall here (http://www.youtube.com/watch?v=Kyh-13Kxflc).

    Step 12: Going Further - Using Arduino to get more inputsBy using the microphone input to your computer, you can monitor two EEG nodes at once (right and leftchannels). To monitor more simultaneously, however, you need to use a microcontroller such as theArduino Uno (http://www.amazon.com/Arduino-Rev-3-Uno-R3/dp/B006H06TVG/ref=sr_1_1?ie=UTF8&qid=1344621931&sr=8-1&keywords=arduino+uno) to get the data into your computer. The Uno has 6analog inputs, so you can observe 6 channels at once without any extra circuitry. If you want to observemore, you need a multiplexer chip such as the MAX4051. This chip will take as input a number of EEGchannels and a number from 0-7, and output only the channel corresponding to the number. Rapidlycycling through the channels samples all of them at a rate necessary for good data acquisition.

    Arduino and Processing code for 3+ inputs is coming soon.

    (/files/deriv/FRO/Y9DR/H461X1ZN/FROY9DRH461X1ZN.LARGE.jpg)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    13 of 20 9/25/2013 5:29 AM

  • Post Comment

    (/member/rlabina/)

    Sep 21, 2013. 2:21 PM Reply (CDQQJ1OHLSGSPKZ)

    1(/member/chipstein/)

    Jul 24, 2013. 8:59 PM Reply (CXT3XPPHJGDLAKN)

    (/member/mjb123/)

    Sep 15, 2013. 9:53 AM Reply (C8WHKUYHLJUXR4L)

    (/member/Mvtnns/)

    Sep 15, 2013. 2:04 AM Reply (CBET3JKHLJUZS2C)

    1-40 of61

    Next (http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?&sort=ACTIVE&limit=40&offset=40#DISCUSS)

    rlabina (/member/rlabina/) says:

    I want to make an ECG using your instructable. My 100nF and 220nF tantalum capacitors lookednothing like in your breadboard. They're really, really small (see image) and I have no idea how toplace them. Can I replace the tantalum capacitors with electrolytic/ceramic? Would this have anyeffect?

    I would really appreciate it if you can answer my questions. Thank you very much.

    (/files/deriv/FYS/8VJM/HLSGSPKY/FYS8VJMHLSGSPKY.LARGE.jpg)

    chipstein (/member/chipstein/) says:

    This is an excellent description of EEG frequencies and all the components of the circuit. I hope youwon't mind suggestions from somebody who does EEG for a living.1. Even with professional EEG systems, the most important component of a good recording is goodcontact between the electrodes and the skin, which requires some sort of skin prep and conductiveelectrolyte. These are available at the same places you can buy the electrodes, and will give muchbetter results than a second notch filter. 2. The electrodes, and especially homemade ones, can produce large unbalanced half-cellpotentials--i.e., act like batteries--and generate DC offsets of hundreds of millivolts. With the AD620,a gain of 89, and 9-volt batteries, a DC offset of only 84 mV will pin the output against the positiveor negative rail, obliterating it. To prevent this, the first stage gain is usually set much lower.3. Unfortunately, computer mike inputs all seem to have their own high pass filters, ranging fromaround 5 Hz for Macs (when they have one) up to 20-40Hz for PCs. With a Mac, you don't need the7 Hz HPF. With most PCs, alpha and low gamma are toast. A good USB audio input adapter will godown to 5 Hz and get around this problem.- Chip

    mjb123 (/member/mjb123/) in reply to chipstein

    Like, or +1, or Kudos.... don't seehow to upvote but this commentdeserves!

    Mvtnns (/member/Mvtnns/) says:

    What is 220n cap for? Is it a part of the notch filter or is it used to remove DC offset?

    navidstuv (/member/navidstuv/) says:

    please help me..i realy need your help.

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    14 of 20 9/25/2013 5:29 AM

  • Aug 20, 2013. 2:12 PM Reply (CEHBKBAHKJRZI4V)

    (/member/navidstuv/)

    5(/member/polkijain/)

    Jul 27, 2013. 9:31 PM Reply (C65UWRJHJKC10EP)

    (/member/ClaireSophie/)

    Jul 19, 2013. 8:34 AM Reply (CXIX9ITHJAHSDCA)

    1(/member/cah6/)

    Jul 22, 2013. 12:31 PM Reply (CRWPSUGHJFSZSYT)

    5(/member/polkijain/)

    Jul 17, 2013. 5:01 AM Reply (CTYNW1LHJ602ZJM)

    1(/member/cah6/)

    Jul 22, 2013. 12:28 PM Reply (CKIZHWYHJFSZSYD)

    (/member/generalissimosuvorov/)

    Jul 8, 2013. 12:58 PM Reply (CZGQ5FIHIPIM1UD)

    1(/member/cah6/)

    Jul 10, 2013. 1:28 PM Reply (CXO423IHIYWSB7R)

    Thanks for your project..Idownloaded yourcode.but it has error('framebuffer objects arenot supported by thisharware(or driver)') i dontknow what my problemis?is it because of myhardware???

    polkijain (/member/polkijain/) says:

    Please help me out to build a robot with it!

    ClaireSophie (/member/ClaireSophie/) says:

    Hey, I would like to use this EEG for a project where I need to distinguish two different signals. Is itpossible this with this circuit? I need a sign for going left and one for right.:) Thank you in advance!

    cah6 (/member/cah6/) (author) in reply to ClaireSophie

    What exactly do you need? Thebasic mechanics behind this isthat it's taking the differencebetween the two input signals.So, if you wanted toindependently read two signals,this might not be the best, as itonly measures the relativedifference. What do you mean bysign for left and right?

    polkijain (/member/polkijain/) says:

    can I use metallic coins for electrodes

    cah6 (/member/cah6/) (author) in reply to polkijain

    It'd probably be too noisy toactually read. You can try, but thequality of standard electrodes isusually worth it.

    generalissimosuvorov (/member/generalissimosuvorov/) says:

    What is the sampling rate you get with thisEEG?

    cah6 (/member/cah6/) (author) in reply to generalissimosuvorov

    It depends on how you read it. Thecircuit itself is completely analog -- itdoesn't perform at a certain rate. Inmy code, I believe I just used asampling rate of 240: we're onlyinterested in frequencies up to about30 Hz, so it doesn't need to be thathigh.

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    15 of 20 9/25/2013 5:29 AM

  • (/member/stanna/)

    May 14, 2013. 12:56 AM Reply (C1XTNNNHGH723IR)

    1(/member/cah6/)

    Jun 20, 2013. 10:17 AM Reply (C77N9WRHI3TX1RH)

    (/member/njay3/)

    Jun 20, 2013. 7:28 AM Reply (CPZPQ7FHI3TRKH3)

    1(/member/cah6/)

    Jun 20, 2013. 10:15 AM Reply (C1WJ327HI3TX1QU)

    (/member/Rodolfoelfeo/)

    Jun 4, 2013. 3:07 PM Reply (C0JZJCGHHJE22ZX)

    (/member/jpeepers18/)

    May 15, 2013. 4:02 PM Reply (CTIBY3XHGH6RLL6)

    (/member/nie.doma/)

    May 4, 2013. 6:52 AM Reply (CU6UGF6HG85CCTF)

    (/member/shineonyoucrazydiamond/)

    May 3, 2013. 4:27 PM Reply (CZA66LVHFSH5B9B)

    stanna (/member/stanna/) says:

    i have a question, why are you using -9 V on the ground pin

    cah6 (/member/cah6/) (author) in reply to stanna

    I'm not: GND is connected to yourbody, +-9V are the supply pins.

    njay3 (/member/njay3/) says:

    Hey. We've built the circuit according to your instructions, but we can't get the notch filter stages towork at all. We would like to adapt it to filter out 50 Hz, but it is not even filtering out 60 Hz at themoment. Instead it is just attenuating everything below 15 Hz. Could you please update this tutorialwith notch filters that work and can be easily changed between 50 and 60 Hz. Please reply soon, aswe only have about a week to finish working on thisThank you.

    cah6 (/member/cah6/) (author) in reply to njay3

    I don't have a ton of time to messaround with stuff right now, but youshould try the notch filter posted acouple comments down(http://www.radio-electronics.com/info/circuits/opamp_notch_filter/opamp_notch_filter.php). I'm notreally sure why the filter on theinstructable worked for me but isgiving so many other peopleproblems (and doesn't help that Ican't find the source), but the onein that link looks promising. Let meknow how it goes or if you needmore help.

    Rodolfoelfeo (/member/Rodolfoelfeo/) says:

    woow

    jpeepers18 (/member/jpeepers18/) says:

    What is the case size for the capacitors? Or what are the model numbers for the capacitors used inthis design?

    nie.doma (/member/nie.doma/) says:

    better filter for power supply broom you can find here.http://www.radio-electronics.com/info/circuits/opamp_notch_filter/opamp_notch_filter.php

    shineonyoucrazydiamond (/member/shineonyoucrazydiamond/) says:

    Great instructable, I'm just a little confusedabout the electrodes. Does the "ground"electrode (the one that connects to yourmastoid or reference area on your body)serve as the ground line for the whole circuit?Is the circuit then connected to physicalground at all? Thanks!

    cah6 (/member/cah6/) (author) in reply to shineonyoucrazydiamond

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    16 of 20 9/25/2013 5:29 AM

  • May 3, 2013. 5:07 PM Reply (CNRG74JHFPTJDUA)

    1(/member/cah6/)

    (/member/thuiberts/)

    Mar 21, 2013. 2:57 AM Reply (CW42UCAHEI4BONW)

    1(/member/cah6/)

    Apr 21, 2013. 1:07 PM Reply (CQVWPN4HFSH4PT3)

    (/member/jchen23/)

    Mar 7, 2013. 6:25 PM Reply (C8T0VN7HDYZC0YV)

    (/member/jonencar/)

    Mar 20, 2013. 11:13 PM Reply (CH32Y42HEI4FGL7)

    (/member/jonencar/)

    Mar 20, 2013. 11:12 PM Reply (CJ2XBEOHEI4FGL3)

    Yes, that'sground for thewhole circuit,since thesesignals you'remeasuring arereally only usefulin relation toyour head'soverall groundstate. So, thebatteries are+-9V relative tothat spot on yourbody.

    thuiberts (/member/thuiberts/) says:

    Could it be that following this schematic does not make a notch filter because I used a regular220nF capacitor instead of a tantalum one? What I get now seems to be more like a high pass filterwith a not so very steep slope at around 60 Hz.

    cah6 (/member/cah6/) (author) in reply to thuiberts

    The type of capacitor in thatrespect shouldn't really matter.The notch filter I used and listedhere isn't a very conventional one,but it works for me in both testingand actual use. I grabbed thedesign from some random websiteas it seemed to be the simplestcircuit for the function, but can'tfind it again. In a couple weekswhen I have the time I'm going torevisit this section of the circuit,document it more, and fix anyissues regarding it.

    jchen23 (/member/jchen23/) says:

    just noticed you also use only 1 10nf capacitor. on the guide u list to have 3. just letting you know!

    jonencar (/member/jonencar/) in reply to jchen23

    Noticed that one, too :)

    jonencar (/member/jonencar/) says:

    Thanks for this sweet DIY! :)

    For the electrodes, did some searching around for a more cost-effective option and found these:

    Ambu Neuroline Cup

    $7.50 for a pack of 10! They are "Single patient use", and intended to be disposed of after eachuse in medical environments. This is mainly for purposes of sterilization; for our purposes, however,we should be able to get extended use. :)

    Can pick them up directly from Ambu (http://www.ambuusa.com) in the US; King Medical(http://www.kingmedical.com/) is a good option for Canadian DIY.

    Picked these up for my first attempt at the EEG circuit and should be giving them a try in the nextfew days. Will post how it goes.

    dbhaumik (/member/dbhaumik/) says:

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    17 of 20 9/25/2013 5:29 AM

  • Feb 20, 2013. 7:51 AM Reply (CLW1NPSHD8Z1E6D)

    (/member/dbhaumik/)

    1(/member/cah6/)

    Mar 4, 2013. 8:21 PM Reply (CJ0D80DHDOW40PW)

    (/member/jchen23/)

    Mar 1, 2013. 11:08 AM Reply (CSRD0QAHDOW6GEX)

    (/member/sidharrth/)

    Feb 9, 2013. 1:38 AM Reply (C28P3XEHCV8NKED)

    (/member/apinto5/)

    Jan 25, 2013. 7:02 AM Reply (CE6QWVUHCB8HDJS)

    (/member/Benny+Boy/)

    Jan 20, 2013. 2:37 AM Reply (CB1MWGIHAQ2ZWVZ)

    (/member/sidharrth/)

    Jan 13, 2013. 9:57 PM Reply (C8AS472HAQ2ZN5L)

    (/member/sidharrth/)

    Jan 13, 2013. 9:55 PM Reply (C5XNE1SHAQ2ZN5J)

    (/member/Benny+Boy/)

    Jan 11, 2013. 10:34 AM Reply (C1M5NEZHAQ3C40K)

    (/member

    Jan 10, 2013. 11:32 AM Reply (CWAZJIWHBNXV6PW)

    Will this work with activeelectrodes?

    cah6 (/member/cah6/) (author) in reply to dbhaumik

    I haven't used active electrodes atall, but yes they should. As far as Ican tell, they just help make asecure connection, which is whatthe gel does on the passiveelectrodes.

    jchen23 (/member/jchen23/) says:

    if i'm doing ECG, would everything on this tutorial be the same? I'm also using arduino but i justfigured I switch the soundcard with the arduino, correct?

    sidharrth (/member/sidharrth/) says:

    i did the whole thing and connected it to my laptop.But im not getting the waveforms inprocessing.org......1. i replaced those tantalum capacitors with electrolytic ones of the same value ...will it affect thecircuit operation??2. The power line frequency over here is 50 hz....so,whats the new value of resistors andcapacitors?Plz help.....

    apinto5 (/member/apinto5/) says:

    i'm unable to download the code Please help !!! ERROR: Download permission denied by uploader.(0b67c2f5) !!! Its urgent

    Benny Boy (/member/Benny+Boy/) says:

    50 Hz / 60 Hz interference, or hum, is introduced from sources around you that use the mains powersupply and will not be due to the battery. The interference can be picked up at various stagesthroughout the circuit. The frequency relates to the number of times a second that that the ACcurrent changes direction.

    sidharrth (/member/sidharrth/) says:

    what do mean by this power line interference??How can u have a power line interferance from abattery source(DC)??would u pls explain about it??

    sidharrth (/member/sidharrth/) says:

    what i want to know all is about how u derive the values of capacitor and resistors??For eg : innotch filter we used a resistor of 12 ohm and 270k ohm...How u get those values??What was thedesign??

    Benny Boy (/member/Benny+Boy/) says:

    Nice one. I should have it all sorted over this weekend. Thanks for your help. Have you considereddoing any more with the device, for example controlling things?

    Benny Boy (/member/Benny+Boy/) says:

    That's fair enough. I'm using the Biomedical Toolkit of LabVIEW to write my program.

    I think what I'll do is ignore the amplifier and use the components to make another set of ~ 30 HzLow Pass filters.

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    18 of 20 9/25/2013 5:29 AM

  • /Benny+Boy/)

    1(/member/cah6/)

    Jan 10, 2013. 3:01 PM Reply (C04QZ0EHAQ2ZK07)

    (/member/sidharrth/)

    Jan 5, 2013. 8:51 AM Reply (CWAWD24HBFFJGEH)

    1(/member/cah6/)

    Jan 9, 2013. 6:15 PM Reply (C2X8KBEHAQ2ZJ3U)

    (/member/Benny+Boy/)

    Jan 6, 2013. 10:20 AM Reply (CP4NAPXHAQ315AT)

    Did you have to do much processing of data in your program? I'm applying more filtering inLabVIEW, including the 50 Hz Notch filters. I see some changes when messing around with theelectrodes but am waiting on the electrode gel to take proper readings.

    What sort of environment did you take your readings in? Do you have any screen shots of the sort ofreadings you got from your system?

    Thanks for your quick response to my other queries. Much appreciated. I'll let you know theoutcome of the alternative implementation!

    cah6 (/member/cah6/) (author) in reply to Benny Boy

    I didn't do a whole lot moreprocessing in the program. I appliedanother 60 Hz notch filter and LPFjust to get rid of any residual noisethat may have passed through,mostly just because Processing hada built in function for that throughthe minim library.

    Besides that, once I got the timesignal in I just took the FFT of it anddisplayed that to see the variousfrequency bands. On step 10there's a picture of the time data(after the quick digital filtering) thatI got in, with the FFT beneath it.

    sidharrth (/member/sidharrth/) says:

    Thanx cah6 for this wonderful project.......But now i need ur help very much!!!! Actually i was tryingto design the capacitors and resistors for the past few day....bt am getting wrong somewhere....Plsdo help me...i need the whole design of the capacitors and resistors used in your circuit....pls doreply....awaiting ur response soon...

    cah6 (/member/cah6/) (author) in reply to sidharrth

    What exactly do you mean? Are youhaving problems finding capacitors /resistors with the appropriate value,knowing where they are in thediagram, etc?

    Benny Boy (/member/Benny+Boy/) says:

    Hey cah6. This really is an amazing project. I'm designing a similar EEG system based on yourcircuit. So far I've made good progress but I am stuck on a few problems and was hoping you couldhelp me out with a few questions that I have.

    Firstly, it looks like you had a myDAQ available to you but instead you used the sound card of yourPC to acquire the signals. Was there a particular reason for this? I am trying to use the myDAQanalogue input channels of the myDAQ to acquire a differential signal from the circuit.

    Secondly, I'm not having much luck with the 60 Hz notch filters. I've put the design into multisim andthe response is very different from what you've shown in LabVIEW. Instead of the 60 Hz frequencycut off, I am seeing attenuation of all frequencies below 84 Hz and above 2 kHz. It's a long shot but Iwas wondering whether you came across any similar issues with your circuit that may help meresolve this problem?

    1-40 of61

    Next (http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?&sort=ACTIVE&limit=40&offset=40#DISCUSS)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    19 of 20 9/25/2013 5:29 AM

  • Post Comment

    About Us

    Who We Are (/about/)Advertise (/advertise/)Contact (/about/contact.jsp)Jobs (/community?categoryGroup=marketplace&category=jobs_internships)Help (/community?categoryGroup=Help)

    Find Us

    Facebook (http://www.facebook.com/instructables)

    Youtube (http://www.youtube.com/user/instructablestv)

    Twitter (http://www.twitter.com/instructables)

    Pinterest (http://www.pinterest.com/instructables)

    Resources

    For Teachers (/teachers/)Artists in Residence (/group/air/)Forums (/community/)Answers (/tag/type-question/?sort=RECENT)

    MobileDownload our new apps foriOS and android!

    Android (https://play.google.com/store/apps/details?id=com.adsk.instructables)

    iOS(https://itunes.apple.com

    /app/instructables/id586765571)

    Visit Our Store (http://store.instructables.com/)

    Go Pro Today (/account/gopro?sourcea=footer)

    Join our newsletter: Join! Copyright Terms of service (/tos.html) | Privacy ((http://m.instructables.com)

    DIY EEG (and ECG) Circuit by cah6 (/member/cah6/)+ Collection Download (/id/DIY-EEG-and-ECG-Circuit/?download=pdf) 12 Steps Favorite (/id/DIY-EEG-and-ECG-Circuit/)

    2013 Autodesk Inc. All rights reserved (http://usa.autodesk.com/adsk/servlet/pc/index?id=20781545&siteID=123112)http://usa.autodesk.com/privacy/) | Legal Notices & Trademarks (http://usa.autodesk.com/legal-notices-trademarks/) | Mobile Site

    DIY EEG (and ECG) Circuit http://www.instructables.com/id/DIY-EEG-and-ECG-Circuit/?ALLSTEPS

    20 of 20 9/25/2013 5:29 AM