EEG Circuit - Looking for design feedback

Discussion in 'The Projects Forum' started by eboaylag, Apr 17, 2016.

  1. eboaylag

    Thread Starter New Member

    Apr 17, 2016
    Hi all,

    I've been working on a project developing an EEG circuit. I originally was using the circuit diagram found here, but had too many issues and decided to design my own with much help from others online. I've been working with my new diagram, seen below. [​IMG]
    I've had a lot of troubles getting things to work. I'm currently using a Picoscope frequency generator (set at 20uV and varying Hz) and oscilloscope to test it, but I'm not seeing the results I think I should be seeing. I'm starting to lean towards a design issue being the cause, so I wanted to post on this forum to get fresh eyes on the project.

    As an overview, the circuit is meant to read alpha and beta brainwaves (which range from 7-30Hz, with amplitudes between 10-60uV) and convert them into digital signal via Arduino to be ultimately read into Processing. The circuit has 7 parts/stages I'll discuss further: the power supply, the instrumentation amplifier, the high pass filter, the low pass filter, the notch filter, the amplifier, and the DC offset. The power supply, instrumentation amplifier, and final amplifier are all derived from the original Instructables link. All caps in the circuit are film caps.

    The circuit is being powered by two 9V batteries. The first battery's + terminal is attached to the + power strip, and the - is attached to GND. The second battery's + terminal is attached to GND, and its - terminal is attached to the negative power strip. There is a grounding electrode that will also attach to the ground line, in order to set the baseline for the other two electrodes.
    The first stage is an instrumentation amplifier using an AD620AN chip. The gain of this stage is 89, with the 560ohm resistor (Gain = 1 + 49400/R). Two electrodes input to the chip at pins 2 and 3 and the amp takes the difference and multiplies it by the gain to output.

    The second stage is a high pass filter with about fc = 7Hz (where fc = 1 / (2*pi*R*C) = 1 / (2*pi*10000*(0.0000022)) = 7.234Hz). The gain of this stage is 2, where Gain = 1 + R4/R5.

    The third stage is a low pass filter with about fc = 30Hz (where fc = 1 / (2*pi*R*C) = 1 / (2*pi*2200*(0.0000022)) = 32.883Hz). The gain of this stage is also 2, where Gain = 1 + R8/R9.

    The notch filter is scaled down from this page. Gain is 1 for this stage. As I'm writing this, I realize that my values are incorrect. I've heard that it's very possible to just apply a 60Hz notch filter within Processing (using the minim library). Thoughts? Should I keep the physical filter, or apply it in post? I'm running out of time a bit for this project, so applying it in post instead of waiting for parts to arrive may be my best option, but I'd love to hear opinions.

    The final amplifier gives a gain from 83 to 455 using the potentiometer as a variable resistor to give the circuit more adjustability before it's fed into the computer.

    The last part is not depicted, but it's a DC bias of 2.5 to center the signal between the 0V to 5V that the Arduino can receive as analog input. This is created by passing the amplifier stage output through a 1uF cap, then through a voltage divider that takes the 5V output of the Arduino and divides it using two 22kohm resistors.

    Please let me know if I missed anything or if you need any more information. If you see any errors or improvements to be made, or have any suggestions on how to move forward, I'd greatly appreciate it. I'm grateful for any help I can get. I'm very new to electronics, so I may need clarification on responses. Thanks to all in advance!
  2. eboaylag

    Thread Starter New Member

    Apr 17, 2016
    Notch filter update: Quick calculations lead to R10 & R11 as 2.7kohm and R12 as 1.2kOhm, which are inexact values since R12 should be half of either R10 or R11. This gives around fc = 58.946. Caps and potentiometer in this stage would stay the same.

    Also, here's a much bigger/zoomable circuit image. Sorry if the first one is too small.
  3. Poom Sakchai

    New Member

    Feb 8, 2018
    What materials each capacitor in Notch Filter 60 Hz? ( tantalum, ceramic orelectrolytic)
    Do you have code for arduino? May I get code please.

  4. ebp

    Well-Known Member

    Feb 8, 2018
    Is the signal out of the instrumentation amp OK?
    How are you driving the IA from the Picoscope? You MUST provide a path for bias current for the inputs of the IA. If you connect a floating signal source that is only differential between the IA inputs and has no DC path to supply common for the IA, the IA won't work properly. The input bias current for AD620A is very low, but it must still have a path.

    I'm assuming you are using proper power supply decoupling (bypass) capacitors. Battery impedance at moderate to high frequencies can cause some very strange behavior.