EEG With an Arduino

Getting all the way down to the 1 Hz frequency range of EEG requires communication through a digital port;  in the current era this would be a USB connector.  A cheap and convenient device for recording and transmitting data through USB cables is the Arduino, which costs about $30 (less if you assemble your own).  The Arduino performs reasonably fast analog--to-digital conversion and doubles as a platform for additional circuity.  It's programmed as a serial port but automatically translates to USB.  The software, including the Processing language, is open source, and large amounts of information are available on the internet for different platforms and applications.  The techniques described here should work for Macs, PCs, and Linux.  [However, CPU speed may be critical.  The program timing works fine with my 2-year-old Mac Powerbook.  It's too slow to be useful with my new Samsung netbook and Intel Atom.]

The downside of the Arduino is that it cannot resolve voltages as small as those handled by an audio  or mike input, so a more complicated amplifier with greater gain is necessary.  The upside is that when not recording EEG you will have a flexible device with vast potential for other interactions between your computer and the outside world.

The onboard power available from the Arduino is only 5 V.  This leaves very little room for DC offsets from the electrodes, so the gain of the AD 620 is limited to about 20.  A second stage using the ancient workhorse 3130 op amp provides additional gain plus signal filtering and DC biasing for the Arduino's analog input.  Because that input is relatively noisy, it requires some low-pass filtering, which may as well do double duty for reducing 60-Hz noise.  Another stage of filtering in the feedback loop needs only a single capacitor, so we will throw that in as well.  The listed component values will therefore provide a second order low-pass filter.  The combined filter is not well-characterized, but is good enough for our purpose.  It helps ameliorate both the 60-Hz noise problem and muscle contraction artifacts, without unduly reducing normal EEG activity.  (Because the Processing routine we have borrowed uses a rather low sampling rate, muscle noise might tend to produce aliasing, which looks like activity in the EEG frequencies and can be very difficult to decipher.)

You could use this circuit for EKG as well, but I don't recommend it.  The gain is actually too high, and several circuit adjustments would be required just to switch back and forth between EEG and EKG.  The only advantage would be a more accurate reflection of the ST segment and the T-wave.  This is likely to be of importance only to doctors, who really should be using real EKG machines.

Preamp Parts List:

-Arduino Decimilla or Duemilanova, usb cable, protoboard/breadboard, hookup wire

- multimeter

-AD 620 instrumentation amplifier (consider buying a spare)

-3130 CMOS op amp (2)

         (Again, make sure you get the DIP packages for the chips, not the surface mount)

-15k resistors (3)

-1M resistors (2)

-10K resistor (1)

-2.2K resistor (1)

-1M trim pot (1)

-10 uF electrolytic capacitor, preferably non-polarized (1)

- .0068 uF capacitor (1)

- .68 uF capacitor (1)

- .001 uF capacitor (2)

A schematic of the overall circuit and a closeup of the connections are shown on the next page.  If at all possible use a breadboard that fits inside a protoboard, not sitting outside with long wire runs that can come loose or pick up noise.