Docstoc

Theta Alpha Beta Gamma

Document Sample
Theta Alpha Beta Gamma Powered By Docstoc
					ECE 445 Senior Design

Aug 4, 2009
Project #1


                          Jay Reppert
                        Kyungmin Lee
   Hi! Nice to meet you!
   Our goal was:
   Building a theremin that has pitch control via
    hand movement and EEG control
   Design appropriate filters for a useful
    theremin and EEG sensors
   Use EEG to control sound effects of the
    theremin, such as sound modulation and
    tremolo effects
   Build a better, more interesting instrument
   EEG circuit and Theremin that we made on
    breadboard
   Control using DSP
   More interactive instrument with EEG control
   Upgradable interactivity via DSP
    programming
   More fun!
    There are three core components in our
     project

1.    EEG circuit
2.    Theremin
3.    DSP
   Purpose
-   Measuring Brainwaves
        Theta   Alpha      Beta      Gamma
        4-7Hz   8-12Hz     13-30Hz   31-50Hz



+ Amplifying small signals to be readable
+ Filter out unnecessary frequencies
(Only getting 4Hz – 50Hz)
   Electrodes
-   Ag/ AgCl electrodes as sensors
-   Detecting signal well
   Instrumentation Amplifier
   AD620 – designed for EEG/ECG
            circuit.
       -low DC offset, low noise
       and high gain up to 10,000

   Gain = 1+ 49.4kohm / Rg
   Gain = 1+ 49.4kohm / Rg

- 1st amplifier
 Gain = 1+ 49.4kohm / 90 ohm
       = 549
- 2nd amplifier
Gain = 1+ 49.4kohm / 9.8 kohm
       =6
 Total gain = 549 * 6 = 3294
 Result of amplifier ( connected in series)
- Using power supply,
inputting 1.3mV
outputting 4.097V
 Actual gain
= 4.097 / (1.3*10^-3)
= 3151
 Theoretical gain
= 32394
   Filter
-   To only get frequency between 4Hz to 50Hz
-   One 2nd active low pass filter
-   One 2nd active high pass filter


   Passive? Active?
   Low pass filter

Cut-off frequency
= 1/ (2*pi*R*C)

 Randomly chose
Resistors and capacitors to
have cut-off frequency of 50Hz
 Cut-off frequency
48.23Hz
= 1 / (2*pi*33kohm*0.1uF)
                                                       Gain
1.2


 1


0.8


0.6                                                                                                     Gain



0.4


0.2


 0
      0.2 0.5 0.8 1   2   3   4   8 15 20 25 30 35 40 45 50 55 60 65 70 80 90 100 120 150 200 250 300
   High pass filter

Cut-off frequency
= 1/ (2*pi*R*C)
Cut-off frequency
4.8 Hz
= 1 / (2*pi* 0.33Mohm * 0.1uF
                                                                        Gain
1.2   Gain




 1




0.8




0.6
                                                                                                                     Gain


0.4




0.2




 0
      0.4 0.6   1   1.8   2   2.3 2.6   3   3.4 3.7   4   4.5   5   6    7   8   10   15 20 25 30   35 40 45 50 55
                                                                    Frequency
       Connect two filters in series
                                                            Gain
    1

0.9

0.8

0.7

0.6

0.5                                                                                                                  Gain

0.4

0.3

0.2

0.1

    0
         0.2 0.4 0.8 1.1 1.3 1.6 1.8 2.1 2.3 2.5 3 3.5 4 5 8 11 14 17 20 23 26 29 32 35 38 41 44 47 50 53 57 60 66
   Final design
   When EEG on
   When EEG off
   Connect to DSP (EEG off)
   Connect to DSP(EEG on)




         0.001708 * 8192 = 14Hz


                  36Hz
   An instrument you can play without touching!
   Consists of an antenna, oscillators, mixer, low
    pass filter, and amplifier
   Used often in old sci-fi movies
   Invented by Russian León Theremin
   People are impressed when you change the
    pitch without touching the instrument
   Extremely fun to play!
                                                                               R14




                                                     14
                                                                               1k
                  U15A             U15B                   U15C

           1       2         3      4         5            6


                  CD4069UB   R7    CD4069UB               CD4069UB




                                                     7
                             22k
           R6                                                            C7    R8
           270k                                                          10u   27k
                                              C6
                                              100p
                             R15
                             10k




                                                                     0




   This oscillator has a variable frequency
    determined by a variable resistor
          Antenna




           R1                  R2               C5
           270k                27k              100p




                                                       14
                    U14A             U14B                   U14C

           1         2         3      4         5               6


                    CD4069UB         CD4069UB               CD4069UB




                                                       7
                                                            0

   This oscillator has a variable frequency
    determined by the capacitance in the antenna
                        R5
                             270k



                               U14F
          R3                              C3
                                                R12
                  13            12
                                                22k
          1k                   CD4069UB   .1u
                                                          C4
                 R4                                       .01u
                 270k

                                                      0



   This mixer heterodynes the two oscillator
    signals together, and puts it through a LPF
                                                   C1

                                                   .01u


   This amplifies the     R13
                                               R9



    mixed signal and       22k
                                               270k
                                                          U14E


    passed it through a                   11               10




    second LPF                                            CD4069UB

                                                          U14D



    After this you have
                                           9               8
                                                         CD4069UB

    sound you can listen                                                 C2


    to with headphones                                                   1n


                                                                         R10


    or powered speakers!         Output
                                                                         470k



                                                                         R11
                                                                         27k




                                               0                     0
                                     100 k

                      100 k
           Theremin
                                               +5 V
                      27 k
              EEG
                                                      Output
                                             5532



                              33 k            -5 V




   Because our DSP can only read one input, we
    had to mix our EEG signal with our theremin and
    then analyze them on the board in real time
   Op Amp mixers are not designed for super
    low frequencies used for EEG signals
   Had very high noise at lower frequencies, and
    very high gain at lower frequencies
   Because of this, our theta waves (4-8 Hz)
    were eclipsed by noise, and we could not read
    these signals effectively
                                                   6”


                                          6”




                                                   8”

                        8”
         6”
                   6”
              4”




   Our antenna was designed specifically to be
    large and highly conductive and to eliminate
    electromagnetic radiation
                         THD (dB)
 0
      150 Hz   300 Hz   500 Hz      700 Hz   900 Hz

 -5


-10


-15


-20                                                   THD (dB)


-25


-30


-35


-40
   Best SNR is 24 dB at roughly 800 Hz
   Worst SNR is 8 dB at the low cutoff of 200 Hz
   SNR is around 10 dB at high cutoff of 1.6 kHz
   These values are lower than hoped, which
    limits how much we can do with our FFT
    before the algorithm fails, but it sounds clean
    at the end and we always found the right
    peak during testing for the theremin
    frequency
   The floating point c6713 is a powerful chipset,
    but very difficult to program
   We needed at least 4 Hz resolution for the
    EEG and a spectrum as high as 2 kHz for the
    Theremin, this is very computationally
    intensive
   Problem solved with Radix-2 FFT algorithm
    used to optimize code
   Lag went from seconds to unnoticeable
   LED array circuit schematic was incorrect in
    the tutorial book, fixed by looking at pin
    mappings on c6713 chipset and datasheets
    for 74LS244 line drivers
   Could not output sound with working state
    machine without horrendous lag
   At first, making it do anything at all
   Working real time DSP with high resolution
    and considerable frequency spectrum
   Working sound modulation
   Working LED array
   Working state machine (although cannot be
    used simultaneously with audio output)
   The LEDs show the strength of each brain
    wave and act as biofeedback
   I wanted to add the wah-wah tremolo effect
    that would be turned on and off by touching
    the antenna
   Eventually the state machine worked, but
    could not output sound
   Equation:
   No matter how hard I tried, equation would
    not work
   Eventually used it for distortion with DIP
    switch control
EEG           The Dead Zone                 Theremin           Touch


      50 Hz                   150 Hz                   4 kHz
                                Frequency




     The idea behind this is to put our junk
      frequencies somewhere where we don’t need
      them, so AC hum and theremin hum are
      between 50 and 150 Hz
   Since touching the antenna produces a
    frequency of roughly 20 kHz, this is far higher
    than our 4 kHz cut off
   But this means we are only reading noise
    within our spectrum, so if our peak is below
    the noise ceiling, we know we are touching
    the antenna
   Only check for the theremin frequencies to
    avoid EEG signal interfering
   Our goal was to make a more interesting
    instrument, specifically one that wasn’t just a
    gimmick
   We succeeded in integrating mind control
    into a theremin in an innovative manner, and
    although our SNR and THD measurements
    were not excellent our final output (the
    sound) was excellent
   Could not make touch control work with
    audio
Parts                         Manufacturer        Cost
Electrodes                    Biopac systems      $30
Resistors                                         $7
Capacitors                                        $8
Instrumentation amplifiers    Texas instruments   $14
Speaker                                           $13
Small Breadboard                                  $12
4 AAA Battery, 1 9V battery   Energizer           $10
Oscillator                                        $3
Antenna                       TERK TV1            $20
TI 67x DSP dev board          T1                  $400
Total                                             $517
   EEG circuit must be hooked up to player’s
    scalp
     We must ensure that the system is safe
     We must inform the player that we are going to
     peer deep into his innermost hidden thoughts
   Electrodes can be dried up easily

   Our DSP can be easily upgraded
     Add more filters
     Change how/when the DSP reads from EEG
   Theremin can be improved
     Add volume control
     Improve bandwidth
 Special thanks to
Professor Carney
Paul

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:77
posted:10/29/2012
language:English
pages:51