PS2 mouse control using EOGEMG signals - PowerPoint by krx12803

VIEWS: 23 PAGES: 34

									  PS/2 mouse control using
  EOG/EMG signals

                     Group #9
                    Vikas Gupta
                    Nick Chang


September 1, 2010
Overview

   PS/2 mouse controlled with eyes
   Original Design
   Specification Deviations
   Functionality Tests
   Challenges
   Improvements
   Conclusion
Objective

   Many people unable to use a mouse
       Create a device which allows people to control
        mouse cursor with eye movements
   Goals
       Obtain useable logic signals from eyes
       Convert signals into instructions the computer
        can understand
   Personal Interests
       Implement something cool!
Original Design


                EOG
                                 Signal Filtering
              electrodes        and Amplification


                                         wires

               PS/2 male-male
                                Field Programmable
   Computer      connector
                                     Gate Array
Original Design



          EOG electrodes    Signal Filtering
                           and Amplification
Obtaining The Biosignal

                   0.4 – 1 mV
                    potential between
                    Cornea and Retina
                   Use electrodes to
                    measure potential
Electrode Placement

                  Red electrodes
                   capture lateral eye
                   movement
                  Blue electrodes
                   capture vertical eye
                   movement
                  Black electrode is
                   common ground
         Amplification, Filtration, Isolation
                                                                    Non-
                                                                  inverting
                                                                              Rectifier
 Up                                                                 Amp
             Input    Diff.   4th Order    Inverting   Summer
             Buffer   Amp       Filter       Amp        Circuit
Down                                                              Inverting   Rectifier
                                                                    Amp

Ground

         Ground                                                     Non-
                                                                  inverting
                                                                              Rectifier
Right                                                               Amp
             Input    Diff.   4th Order    Inverting   Summer
             Buffer   Amp       Filter       Amp        Circuit
 Left                                                             Inverting   Rectifier
                                                                    Amp


                                          Output
         Amplification, Filtration, Isolation
                                                                 Non-
                                                               inverting
                                                                           Rectifier
 Up                                                              Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
Down                                                           Inverting   Rectifier
                                                                 Amp

Ground
                                                                 Non-
                                                               inverting
                                                                           Rectifier
Right                                                            Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
 Left                                                          Inverting   Rectifier
                                                                 Amp


                                       Output
         Amplification, Filtration, Isolation
                                                                 Non-
                                                               inverting
                                                                           Rectifier
 Up                                                              Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
Down                                                           Inverting   Rectifier
                                                                 Amp

Ground
                                                                 Non-
                                                               inverting
                                                                           Rectifier
Right                                                            Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
 Left                                                          Inverting   Rectifier
                                                                 Amp


                                       Output
         Amplification, Filtration, Isolation
                                                                 Non-
                                                               inverting
                                                                           Rectifier
 Up                                                              Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
Down                                                           Inverting   Rectifier
                                                                 Amp

Ground
                                                                 Non-
                                                               inverting
                                                                           Rectifier
Right                                                            Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
 Left                                                          Inverting   Rectifier
                                                                 Amp


                                       Output
         Amplification, Filtration, Isolation
                                                                 Non-
                                                               inverting
                                                                           Rectifier
 Up                                                              Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
Down                                                           Inverting   Rectifier
                                                                 Amp

Ground
                                                                 Non-
                                                               inverting
                                                                           Rectifier
Right                                                            Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
 Left                                                          Inverting   Rectifier
                                                                 Amp


                                       Output
         Amplification, Filtration, Isolation
                                                                 Non-
                                                               inverting
                                                                           Rectifier
 Up                                                              Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
Down                                                           Inverting   Rectifier
                                                                 Amp

Ground
                                                                 Non-
                                                               inverting
                                                                           Rectifier
Right                                                            Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
 Left                                                          Inverting   Rectifier
                                                                 Amp


                                       Output
         Amplification, Filtration, Isolation
                                                                 Non-
                                                               inverting
                                                                           Rectifier
 Up                                                              Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
Down                                                           Inverting   Rectifier
                                                                 Amp

Ground
                                                                 Non-
                                                               inverting
                                                                           Rectifier
Right                                                            Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
 Left                                                          Inverting   Rectifier
                                                                 Amp


                                       Output
         Amplification, Filtration, Isolation
                                                                 Non-
                                                               inverting
                                                                           Rectifier
 Up                                                              Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
Down                                                           Inverting   Rectifier
                                                                 Amp

Ground
                                                                 Non-
                                                               inverting
                                                                           Rectifier
Right                                                            Amp
          Input    Diff.   4th Order    Inverting   Summer
          Buffer   Amp       Filter       Amp        Circuit
 Left                                                          Inverting   Rectifier
                                                                 Amp


                                       Output
Original Design
         Field Programmable
                                   Computer
              Gate Array




    2 main components:
        Master State machine
            Controls when the mouse should
             send/receive
        Sensor Decision Logic
            Convert inputs into mouse words
    Original Design
        Block Diagram of FPGA components from our Design Review:



                 Mouse Word (3 bytes)

         Left
         Right        Decision           State
                                        Machine    PS/2 Interface
         Down          Logic

          Up
                              Step Down Counter

15 kHz
                 PS/2 Oscillator
Project Build – Signal Circuitry

   Input Buffer
       Unity gain
           3.3/3.3 = 1
Project Build – Signal Circuitry

   Difference Amplifier
       R1 = R2, R3 = R4
       Av = R4 / R2
           Av = 33/3.3 = 10V/V
Project Build – Signal Circuitry
   4th Order Butterworth Filter
       Maximally flat passband
       Cascade two 2nd order filters
   H(s) = Avo/B(s)
       B(s) = s2+1.414s+1
   Avo = 3 – 1.414 = 1.586
       Total gain = (1.586)*(1.586) = 2.515 V/V
   1.586 = R1‟/R1
       R1 = 10K, R1‟ = 5.86K
   Want Fo ~33 Hz
       33 = (2*pi*R*C)-1
           Let R = 10K, C = 0.47uF
Project Build – Signal Circuitry
                     Project Build – Signal Circuitry
                           Frequency Response of 4th Order Butterworth Filter with Input Voltage of
                                                            1V

                      3


                     2.5
Output Voltage (V)




                      2


                     1.5                                                                       Output Voltage (V)


                      1


                     0.5

                      0




                                                                                           0
                      1
                           2
                               3
                                   4
                                       5
                                           6
                                               7
                                                   8
                                                        9
                                                       10
                                                            15
                                                            20
                                                            25
                                                                 30
                                                                 35
                                                                         40
                                                                         45
                                                                              50
                                                                              60
                                                                                   70
                                                                                   80
                                                                                         90
                                                                                        10
                                                        Frequency (Hz)
Project Build – Signal Circuitry

   Inverting Amplifier
      Avo = -R2/R1
   Up/Down
       Avo = -82/1.2 = 68.3
        V/V
   Left/Right
       Avo = -68/1.2 = 56.6
        V/V
    Project Build – Signal Circuitry

   Summer Circuit
       Can add +/- 12V to
        input signal
   Unity gain
       10/10 = 1 V/V
Project Build – Signal Circuitry
   Inverting / Non Inverting Amplifier & Rectifier
   Inverting Gain           Non Inverting Gain
    Avo = 33/3.3 = 10 V/V     Avo = 1 + 33/3.3 = 11V/V
          Project Build – Signal Circuitry


Device        Input    Diff.    Filter   Big amp    Big amp    Summer    Non-Inv    Inv Amp   Total
              Buffer   Amp               (Up /      (Left /    Circuit   Amp                  Gain
                                         Down)      Right)
Theoretical   1 V/V    10 V/V   2.515    68.3 V/V   56.6 V/V   1 V/V     11 V/V     10 V/V    14234-
Gain                            V/V                                                           17177
                                                                                              V/V
Actual        1.1      ~10      2.53     53 V/V     41.5 V/V   1.1 V/V   10.8 V/V   9.7 V/V   13720-
Gain          V/V      V/V      V/V                                                           17522
                                                                                              V/V
Signal        ~.7      50-100   100-     ~500 mV    ~.5-1 V    ~.5-1 V   5 – 10 V   5 – 10    XXXXX
Voltage       mV       mV       250                                                 V
                                mV
Project Build – FPGA mouse

   XSA-100 Prototyping Board
       Conveniently comes with a PS/2 port
   555 IC Timer (x2)
       Generation of arbitrary frequency clocks
        (a function of external R and C elements)
       30 kHz clock – PS/2 signal clock
       slow clock – large state machine
     Project Build – FPGA mouse
            Input from
          signal circuitry


                                    8-bit
          Mouse Word
                               Shift Register
           Generator                            Onboard Display
                             (Command Word)


30 kHz    Send/Receive          Master State    Seven Segment
555 Clk   State Machine          Machine           Decoder


           PS/2 Signals           ~150 Hz
           to Computer            555 Clk
               Project Build – FPGA mouse
                        If Reset = „1‟                     Clk = „1‟
                                                                              NOT byte_received

                                            Reset                      Init                   Listen
                   Reset

Enable_sendbyte = „1‟         psClk = 0->1, psData = „0‟
                              (Request to Send state)

                   Send
                                                           Setup                                               Response
                                                                                                                States
                 Recieve
                                                                                                       Send
                                                                              Ready                    Mouse
                Finished                                                                               Words
Functional Tests

   Independent component tests were
    feasible with our design
       FPGA mouse – switches/LEDs/Logic
        Analyzer
       Signal circuitry – LEDs/Oscilloscope
Challenges – Signal Circuitry

   Placement of Electrodes
       Slight changes create affect dc baseline
       Electrodes too large
   Reliability of Signal
       Looking “left” had an affect on “down”
Challenges - FPGA

   PS/2 protocol occurs at a frequency of
    15kHz
       Solution: 555 timer
   Minor Detail – Major Hurdle!
       PS/2 specification website
   Large Number of States
       A single byte transfer takes 22 states
   Strict Timing Requirements
Improvements

   Mouse button emulation
       Implemented in FPGA, but not in signal
        circuitry
   Blinking
   Variable Amplifier Gain
   DC Drift
   PCB Implementation
Conclusion

   It worked!
       8 direction mouse movement
       Functionality was as expected


   Questions?

								
To top