Sie sind auf Seite 1von 4

EEG AMPLIFIER

W. Durfee, 04-feb-02

Overview
This is admittedly sketchy documentation for the EEG amplifier board designed and
constructed by the NPDBD Newco team as part of the product concept prototype. The
box performs these functions: amplification, bandpass filtering, digitization, isolated
communication to the host PC. The board is battery powered by two 9V batteries, one for
the main circuit, one for the isolated circuit.

Warning
The Newco EEG board is a prototype device intended to be used by the Newco team
only and only for experimental and prototyping purposes. It is not a medically
approved device and no medical claims are made for the device, nor should it be used
for diagnostic purposes. Safe use requires that the device be operated only by two
batteries and that the isolated and non-isolated portions of the circuit never be joined
electrically.

History
The board design evolved from an existing biopotential amplifier used for EMG detection
in the Durfee lab. The second major source was the HAL-4 EEG Brainwave Analyzer
that originated in a 1988 issue of Byte Magazine and revised in three issues of Circuit
Cellar. HAL-4 kits were sold by Creative Control Concepts
(www.cc-concepts.com/products/hal4/), but they recently abandoned sales and support.
Other sources for the design were various public domain EEG circuits available on the
web. Specifications for the design were benchmarked against commercial machines. For
a 2-channel EEG amplifier, the Newco model is as good as any other. The Newco board
design was originated by Durfee. Schematics were drawn using Multisim and board
layout was done on expressPCB.

Documentation
1. Schematics (5 pages)
2. Bill of materials
3. Printed circuit board printouts (3 pages)
4. This document

Circuit description
This explanation assumes the schematics are nearby and assumes some knowledge of
electronics and the workings of biopotential amplifiers.

The circuit is fairly basic. Two channels of EEG are amplified, band-pass filtered (4 to 20
Hz), and digitized. The digital signal is communicated in real time to the host PC through
an optically-isolated RS-232 serial channel. All processing intelligence, including sorting
into brainwave bins, is done on the host PC. In the following explanations, one of the two

Newco EEG amplifier Page 1 of 4


identical channels is followed. Read the bill-of-materials to see which resistors and
capacitors are precision components.

For safety, the circuit should only be powered by two 9 volt batteries only. Never use a
wall-powered battery eliminator to run the circuit because if things go wrong, wall-level
power could make its way to the electrodes and into the user.

The two differential input channels and reference channel are brought to the board
through five RCA phono jacks. On the PCB, the entire area around the electrode inputs is
flooded with a ground plane. The differential inputs are brought to the Burr-Brown
INA126 instrumentation amplifier (U1) that has excellent input characteristics and
common-mode rejection ratio. The INA126 is set to a gain of 2000 through R1.

High-pass filtering at 4 Hz is performed using a 2-pole, Butterworth, unity-gain Sallen-


Key opamp filter using opamp U3A. Note that precision resistors and capacitors are used
throughout to ensure the proper filtering type and cut-off frequency. R5 is a 2.0 Mohm
resistor realized as two 1.0 Mohm resistors in series because 1% resistors with values
greater than 1.0 Mohm are not available through Digi-Key, the main component supplier
for this circuit. See any analog filtering book for details on this type of filter. "FilterLab"
from Microchip (www.microchip.com) is a nifty little program for calculating resistor
and capacitor values for analog filter circuits. Other on-line filter design programs are
"FilterPro" from Texas Instruments and "FilterCAD" from Linear Technology.

The TLC2274 quad opamp from Texas Instruments was chosen as the main workhorse in
this circuit for the following reasons: (1) low-noise (9 nV); (2) relatively low input offset;
(3) reasonable bandwidth and slew-rate (3.6 V/u-sec); (4) relatively low power (1.5 mA
per amplifier stage); (5) single-supply with wide supply input range (4-16 V); (6) rail-to-
rail inputs and outputs; (7) in-stock from Digi-Key in a DIP package; (8) low cost ($1.53
in singles). This opamp has excellent performance specs for the value. Other amplifiers
considered and rejected for this application included: TL074 (higher noise, not rail-to-
rail), OP484 (better specs but very expensive), OP496 (higher noise, more expensive)

Next is a 0.1 to 10 variable gain stage realized as an opamp inverting gain circuit (U3B).
Potentiometer R7 is varied by the operator, but should not be set to go outside the 0.1 to
10 gain range. With this and the input stage, overall gain from electrode to digitization is
200 to 20,000. For use, set R7 so that the final signal nicely fills the 0 to 5 V range. This
optimizes the signal for the 5 V digitizer.

The signal is low-pass filtered with a 7-pole Butterworth, unity-gain circuit with cutoff
frequency of 20 Hz. The circuit is realized using a 5-pole switched-capacitor filter (U5)
followed by a 2-pole, Sallen-Key analog filter (U3C). The LTC1062 from Linear
Technology was chosen for the switched capacitor stage. The MAX280 from Maxxim is
pin-for-pin compatible with slightly better specs, but is much more expensive. R9 is
realized as two resistors in series. To trim the switched capacitor filter, tune
potentiometer R11 until the signal on pin 5 of U5 (Cosc) cycles at 2.00 Khz. Use a low-
capacitance probe for this measurement.

Newco EEG amplifier Page 2 of 4


The signal is brought to an RJ11 (telephone style) connector (J6) for monitoring. Under
normal use, there should be no need to monitor the signal here. WARNING: if you look
at this signal using a wall-powered oscilloscope, you have lost isolation on the circuit. be
careful!

The signal is digitized (10-bits, 0-5 V range 128 Hz) by the PIC16F872 microprocessor
(U7). The resolution of 1 bit is 5/1024 = 4.88 mV. 128 Hz is chosen as a compromise.
Any faster and it becomes challenging to send the data in real-time over the RS-232 serial
port. Any slower and you start to lose information. With a low-pass cutoff of 20 Hz, in
theory you could sample at 40 Hz and keep all the information. In practice, however, one
tries to sample at 10-20 times the cut-off frequency. For 128 Hz sampling, the Nyquist
frequency is 64 Hz. Even with a 7-pole low-pass filter, there is still considerable signal
content at 64 Hz. So, the situation is not ideal, but we do the best we can here.

The PIC16F872 microprocessor was chosen for the following reasons: (1) it is a member
of the PIC family of microprocessors from Microchip (www.microchip.com), the hottest
family these days, combining excellent performance for value; (2) it has on-board, 10-bit
ADC's, (3) C cross-compilers are available for software development; (4) it requires
almost no support components to get up and running; (5) it has flash programming
memory making the development iteration cycle easy, (6) there is tons of information
about PIC chips available in books and on the net; (7) it is in-stock at Digi-Key; (8) it is
relatively inexpensive.

The PIC16F872 runs at 4 MHz using resonator X1. This translates into 1 MHz per
instruction cycle. Since most instructions take 1 cycle, it's basically 1 MHz per
instruction at assembly language level. Instructions at the C language level take multiple
assembly instructions. To find out how long a C instruction takes, look at the assembly
language code generated by the cross-compiler, or even better time it while running.

The software, and thus overall circuit behavior for the microprocessor is described
elsewhere in this document.

LED1 is a general purpose indicator that flashes to indicate the circuit is working. Under
software control it can perform a variety of indicator and alert functions.

U8 and U9 are high-speed, TTL-level opto couplers. U8 sends information from the
microprocessor to the PC while U9 is in the reverse direction. U10 is a TTL to RS-232
translator. The MAX233 was chosen as the best price/performance value among the wide
range of level translators offered by Maxxim. Note that 1/2 of U8, 1/2 of U9 and U10 are
all powered by the isolated supply. The only thing that connects this side to the rest of the
circuit is light. This provides the barrier that makes it safe to attach electrodes to the head.

Digital information is carried to and from the PC serial port through J7, an RJ11 style
telephone connector.

Newco EEG amplifier Page 3 of 4


Power conditioning generates the main and isolated supply. For the main supply, a 9 V
battery connects to power jack J8. U11 and U12 provide 5 V regulation for analog and
digital portions of the circuit. The analog supply is split in two by R22 and R23 and
buffered by U4D to form a pseudo ground used to provide a reference point in the
amplification and filtering circuits.

Another 9V battery is used for the isolated supply and enters the board through power
jack J9. This is regulated down to 5V by U13. Make sure that no part of the main and
isolated batteries or supplies touch at any point.

Printed circuit board


A printed circuit board was made using the expressPCB drawing tools and printing
service (www.expressPCB.com). Bus traces are 0.100 wide and signal traces 0.012 wide.
A ground plane was flooded around the input connectors. The isolated areas are confined
to the middle right. All connectors were placed on the board to minimize noise and
maximize simplicity. Another approach would be to place connectors on the front panel
of the enclosure and run wires to the board, but this adds complexity and lowers
reliability.

It is expected that there will be no enclosure with the board held off the ground by
standoffs mounted at the four corners. If noise is a problem, try wrapping the board in
Saran wrap then aluminum foil, grounding the foil to the board. Or try stuffing into a
shielded box.

Circuit assembly
Assembly basically consists of stuffing and soldering the circuit board. If you are not
skilled at soldering, practice soldering resistors to some scrap perf board before tackling
this circuit.

Assemble and solder components in order of height off the board, lowest to highest.
Resistors will be first. The power jacks and telephone connectors will be last. All dual in-
line integrated circuits have sockets. Double check socket orientation before soldering.

NOTE: U9 and its socket are installed upside down. This was done to keep a simple
isolation boundary line on the PCB.

Check for valid power at the sockets before installing the IC's.

Electrodes
Electrodes are connected using shielded audio cable. For electrode design and
construction, it is recommended that we follow the design detailed in the HAL-4 manual.
That manual has excellent instructions for building and constructing home-brew
electrodes. Shielded cables will help considerably to keep noise at a minimum.

Software and board behavior


…coming…

Newco EEG amplifier Page 4 of 4

Das könnte Ihnen auch gefallen