EEG Page


Around 1967 a fellow named Maurice "Barry" Sterman discovered that cats could be trained to alter their brain waves, and that these same cats were less susceptible to having seizures when injected with monomethylhydrazine (rocket fuel); hence the start of some very interesting research into neurofeedback. I was told of two books on the subject, which I have purchased, read, and would recommend: A Symphony in the Brain, by Jim Robbins, and Getting Rid of Ritalin, by Robert Hill and Eduardo Castro. I have purchased and would NOT recommend ADD The 20-Hour Solution by Steinberg and Othmer. Only click this if you want to hear me rant.

Besides the above mentioned books, and general Googling, I've have learned the most about measuring brain waves (EEG signals) from The OpenEEG Project. They have posted schematics for a few different DIY EEG designs, and even arranged for a company to sell you assembled circuit boards for about $200. Similar commercial units cost at least $1000. You'll get software with the commercial unit, and the $200 doesn't include a case, cables, etc... but you simply can't get anything like it for that price. The OpenEEG project has a mailing list which I subscribe to. A guy named Joerg Hansmann, one of the designers of ModularEEG, answered a boatload of questions which I posted to the list allowing me to fairly quickly design a simple unit.

Here are some links to stuff that I have learned from.

My EEG

I haven't yet spent the time to put a full description of my system on this page, but here are the basics on my EEG stuff as of 3/07/2007:

Pictures:

My first breadboarded EEG hardware. The basic design was INA114 inst-amp, TLC1078 op-amp, MAX7401 filter, PIC12F675, RS232 interface, PC running LabVIEW. Single 5.0 volt supply, with a TLE2426 "rail splitter" driving a 2.5v VGND. Another TLC1078 is used for a DRL (driven right leg) circuit. It is basically a simplified ModularEEG system with NO input protection, op-amp filter replaced with MAXIM filter, and Atmel processor replaced by a PIC. In the picture, the green board on the right has a MAX232 RS232 interface on it. Unit draws 14 mA with RS232 interface, 5 mA without. With this hardware I measured these ECG signals on my chest. On the blue trace (marked ECG G10) the instrumentation amp (inst-amp) had a gain of 10, and my system had a gain of 1000 (ECG mode). On the red trace (marked ECG G100) the inst-amp had a gain of 100, and my system had a gain of 10000 (EEG mode). In EEG mode my signals clip at 175uV, caused by non rail-to-rail output of the TLC1078. I have since replaced the TLC1078 with an AD8605 to remedy this. In EEG mode it had more 60 Hz noise which was improved with a better layout and gain line up.

My application software is written in LabVIEW. Here is a snapshot of the panel It reads in one or two channels of data and does an FFT. The PIC software takes commands from a PC via RS232, and sends 10 bit A/D samples to the PC. The PIC has a 4 channel A/D, I use 3 of them. PIC is configurable through RS232 commands for variable sample rate, variable calibration output frequency, which A/D channels to read, what to use as a reference voltage (5v supply or one of the A/D inputs). I use a software UART at 9600 baud, so I only have time to send two A/D channels at 256 Hz. (3 bytes for 2 10bit samples, sent ModEEG -p3 like). This lets me get away with using the PIC's internal 4MHz oscillator (look Mom, no crystal!). My target was something with very low part count (something I can easily breadboard), very low cost (my cost so far has been a $10 jar of Ten20 EEG paste!), and performance on par with similar home units.

Here is a cleaned up breadboard. This less sprawling version has less 60 Hz noise (no surprise). Here is a picture with electrodes attached. The static wrist strap I used for my DRL. I used two of the white round Meditrace electrodes to take the ECG data I showed previously. The gold plate is an unfinished homemade EEG electrode. The PCB sticking out of the breadboard in an opto-isolated RS232 interface. Here is two seconds of EEG data with an FFT. You can see some 60 Hz noise (this is actually quite low, which is good), and some brain activity around 10 Hz.

Schematics:

Here is the EEG amplifier and microprocessor. The schematic shows a TL062 for the DRL op-amp, but my breadboard still has a TLC1078. Here is a schematic of my opto-isolated RS232 interface. It may not be bullet proof, but I've used it with one laptop and two desktop PCs at 9600 baud. It derives power from the RS232 lines. I only use it half duplex. I based the RS232 interface design on this one, by M Asim Khan, but I removed the LEDs and the buffers (among other things). A PIC12F675 running RS232 loopback code with this interface draws 0.8 mA sending 0x00 and 1.4 mA sending 0xFF (or vice versa, I forget). Here is a parts list with prices.

My planned to do list:

  • run it off of 6 volts (4 AA cells) with 5V LDO regulator (I use a wall wart with a 7805 regulator)
  • finish making EEG electrodes
  • compare inst-amps (I have INA114, INA128, AD8553 and LT1168)
  • add beta/theta training to LabVIEW software (maybe not since I can now use Brainbay)

    Things I might do:

  • build a second EEG amp (My software and firmware already handles 2 channels)
  • put it on a PCB

    p.s. My motivation for looking into this EEG neurofeedback stuff is for those in my family with ADD.


    Updates:

  • 7/25/2006: I received the book Getting started with neurofeedback by John Demos which was suggested to me by Ian on the OpenEEG list. It looks like a GREAT book. Demos doesn't rant like I do, he just gives information. (I wish I could be so calm). Of the books I have so far, this is definitely tops (I wouldn't really need the others, but I still liked the first two I mentioned).

  • 7/26/2006: I received samples of my rail-to-rail op-amps (AD8605, AD8606) and 5v LDO regulators. They are surface mount parts, so I made adaptor boards to plug into the solderless breadboard.

  • 8/5/2006: I replaced the LT1078 gain op-amp with an AD8605. Now the rail-to-rail output is limited by the MAX7401 filter, but I'm not going to worry about this now. With 38 inch shielded cables attatched, electrode ends connected to VGND, the system noise is not more that 1 LSB peak to peak. That is 0.488uV (Gain=10000, range=+/-250uV, 10 bits).

  • 8/7/2006: Bought 50 clothespins for $1 to make ear clips (afternoon). Took my first EEG measurements (evening). Picture of my trying this. I show the clothes pins and jar or Ten20 paste ($10), because they are the only things that I have invested money in so far.

  • 3/7/2007: Modified PIC firmware to output "1 Channel Raw Data" format to make it compatible with Chris Veigl's BrainBay. Yeah! Now I'm compatible with someone else's software. (Thanks Chris) This only works for one channel (which is all I've built anyway).