ZappBots wishes a warm welcome to everyone.

Especially our visitors from
Savage///Circuits and Parallax!!!


Please take a look our new forums, we hope you register and become an active user.

The ZappBots forums are being run on phpBB 3.1.4 software which is different then the vBulletin used on the Savage///Circuits and Parallax forums.
Therefore, things look and work a little different, especially creating posts and uploading images / attachments.


The important thing is we have a place toTalk, Learn and Showcase our projects.

Eye Activated Switch

This is the place to talk about Bio-Medical Electronics
User avatar
Electrons-R-Fun
Member
Member
Posts: 143
Joined: Tue May 12, 2015 7:03 pm
Contact:

Eye Activated Switch

Postby Electrons-R-Fun » Sun May 31, 2015 11:14 pm

A while back one of the members here, Art shared an article with me about an eye mouse made from a Burr Brown INA102 IC. I am going to try and build that project in part. Since Lisa can only look to the right now I will try to harness that movement to give her a new reliable switch to use. I will make an effort to connect the eye switch to the matrix grid to give Lisa a chance, once again, to make selection from the grid.

I will be using electronic components I have never worked with before, like a -10 volt supply (rail ???), a Burr Brown amplifier, an LM358 as an amplifier (even though I've used them as a comparator), and band pass filters. I believe a lot of learning is going to be going on for me with this project.

I have ordered the parts and hope to get started soon.

Jason

User avatar
Electrons-R-Fun
Member
Member
Posts: 143
Joined: Tue May 12, 2015 7:03 pm
Contact:

Re: Eye Activated Switch

Postby Electrons-R-Fun » Tue Jun 09, 2015 7:00 am

This is what is on my bench so far. Then INA102T, LM358, and various resistors, caps, and diodes. I still need to get the -10 volt voltage regulator, never used one before, so this will be interesting and educational form me.

In the picture you can see the circuit I am building, but I have little idea what is really going on with the voltages at certain parts of the circuit, so I though I would hook up my 4 channel O-Scope at some places and take a look at what the voltages are doing.

My hope is to hook it up too myself and be able to turn on on of the LED's on the PPDB. I will power the entire thing with batteries to produce around 9 volts.

Image

eye switch bread board.jpg
(576.17 KiB) Not downloaded yet

User avatar
zappman
Administrator
Administrator
Posts: 120
Joined: Wed May 06, 2015 12:31 am
Contact:

Re: Eye Activated Switch

Postby zappman » Tue Jun 09, 2015 8:18 am

The information below is provided is provided, for those that wish to help Jason AKA Electrons-R-Fun with his project.

Image

Image

Link to the PIC16C71 code from the article.
ftp://ftp.circuitcellar.com/pub/Circuit_Cellar/1995/Issue_59/EYEMOUSE.ZIP

Code: Select all

;********************************************************************
; Gregg A. Norris            9/10/94                   EYEMOUSE.ASM *
; Eric D. Wilson                                                    *
;********************************************************************
; Function:                                                         *
;     Controls the mouse cursor on a PC using EOG signals.          *
;-------------------------------------------------------------------*
; Notes:                                                            *
;     o  This source code was assembled using the Microchip         *
;        Assembler, MPALC.EXE.                                      *
;     o  The clock frequency, Fosc, is 4.096 MHz.                   *
;     o  Bit 0 of port B is the Transmit Data (Tx) line.            *
;     o  Data is sent at the default settings as setup by the       *
;        three byte/two button Microsoft Protocol.  That is:        *
;        Serial data is sent at 1200 Baud and formatted as          *
;        7 bit data, no parity, and 2 stop bits.                    *
;     o  A/D Channel 0 is connected to the EOG for controlling      *
;        the mouse horizontally (right/left).                       *
;     o  A/D Channel 1 is connected to the EOG for controlling      *
;        the mouse vertically (up/down).                            *
;     o  A/D conversions will take 10 * Tad, where                  *
;                 Tad = 32*Tosc = 32/Fosc.                          *
;        Thus, the conversion will take:                            *
;                 10 * 32/4.096M =  78.125 usecs.                   *
;     o  Only the upper 7 bits will be used from an A/D conversion. *
;        Thus, each bit represents 5/127, 39.37 mV.                 *
;     o  The RTCC Overflow interrupt is programmed to occur at a    *
;        period of 4 milliseconds.                                  *
;     o  The Main Loop is programmed to repeat itself at a nominal  *
;        period of 28 milliseconds (or 7 RTCC overflows).  When     *
;        clicks are commanded, that time is extended to about a     *
;        second.                                                    *
;                                                                   *
;-------------------------------------------------------------------*
;  Version: 1.00                                                    *
;********************************************************************

;********************************************************************
; Include Files
include     "picreg.equ"

;********************************************************************
; Register Variables                                                *
;     Note: A tic is equal to 28 milliseconds.                      *
;********************************************************************
bit_tmr     equ   0ch      ; Counter for delay
bit_ctr     equ   0dh      ; Bit counter used in xmit
out_byte    equ   0eh      ; Holds data to be sent to mouse driver

ad_chan0    equ   0fh      ; A/D data for channel 0 - right/left
ad_chan1    equ   10h      ; A/D data for channel 1 - up/down

moving      equ   11h      ; 0 = no movement, 1 = moving right, left,
                           ; up, or down
move_tics   equ   12h      ; Number of tics A/D channel 0 or 1 needs
                           ; to be greater than a move threshold in
                           ; order to start a move.

right       equ   13h      ; Threshold for a right move
right_ctr   equ   14h      ; Keeps track of how long A/D channel 0 is
                           ; above the threshold for a right move
move_rgt    equ   15h      ; 1 = Send commands to move mouse right

left        equ   16h      ; Threshold for a left move
left_ctr    equ   17h      ; Keeps track of how long A/D channel 0 is
                           ; above the threshold for a left move
move_lft    equ   18h      ; 1 = Send commands to move mouse left

down        equ   19h      ; Threshold for a down move
down_ctr    equ   1ah      ; Keeps track of how long A/D channel 1 is
                           ; above the threshold for a down move
move_dwn    equ   1bh      ; 1 = Send commands to move mouse down

up          equ   1ch      ; Threshold for a up move
up_ctr      equ   1dh      ; Keeps track of how long A/D channel 1 is
                           ; above the threshold for a up move
move_up     equ   1eh      ; 1 = Send commands to move mouse up

blink_tmr   equ   1fh      ; Number of tics since last blink
blink_ctr   equ   20h      ; Number of blinks received
blink_tics  equ   21h      ; Number of tics A/D channel 1 needs to be
                           ; greater than the up threshold in order
                           ; to be counted as a blink.
max_time    equ   22h      ; Number of tics that may pass before
                           ; clearing a single blink or counting 2
                           ; blinks as a single mouse click

s_click     equ   23h      ; 1 = send a command for single mouse click
d_click     equ   24h      ; 1 = send a command for double mouse click

isr_tmr     equ   25h      ; Used to determine Main Loop time.
                           ; Increments each RTCC Overflow interrupt
isr_tmr2    equ   26h      ; Used to time general purpose delays.
                           ; Increments each RTCC Overflow interrupt
save_w      equ   27h      ; Holds W reg during interrupts
save_stat   equ   28h      ; Holds STATUS bits Z and C during interrupt
mouse_spd   equ   29h      ; Determines frequency of the commands
                           ; sent to mouse port

;********************************************************************
; Constants                                                         *
;********************************************************************
TX          equ   00h      ; bit 0 of port B - Transmit to mouse

;********************************************************************
; Reset entry point                                                 *
;********************************************************************
            org      0000h          ; reset vector
            goto     init

            org      0004h
;********************************************************************
; Interrupt Service Routine for RTCC                                *
;                                                                   *
;     Increment counters that are used in the Main Loop for timing. *
;********************************************************************
rtcc_isr    movwf    save_w
            movf     STATUS,0
            movwf    save_stat

            bcf      INTCON, RTIF
            incf     isr_tmr,1
            incf     isr_tmr2,1

            movf     save_w,0
            ; Restore STATUS register
            btfss    save_stat,Z
            goto     clr_Z1
            bsf      STATUS,Z
            goto     chk_carry1
clr_Z1      bcf      STATUS,Z
chk_carry1  btfss    save_stat,C
            goto     clr_C1
            bsf      STATUS,C
            goto     end_isr
clr_C1      bcf      STATUS,C

end_isr     retfie

;********************************************************************
; Subroutine bit_delay                                              *
;                                                                   *
;     The bit time for a Baud rate of 1200 is 1/1200 = 0.833 msecs. *
;     Using a clock of frequency, Fosc = 4.096 Mhz, approximately   *
;     853 clock cycles occur in 0.833 seconds.                      *
;                                                                   *
;     14 cycles/loop * 61 loops + 3 cycles = 857                    *
;********************************************************************
bit_delay   movlw    .61            ;                       1 cycle
            movwf    bit_tmr        ;                       1 cycle

wloop2      goto     next1          ;                       2 cycles
next1       goto     next2          ;                       2 cycles
next2       goto     next3          ;                       2 cycles
next3       goto     next4          ;                       2 cycles
next4       goto     next5          ;                       2 cycles
next5       nop                     ;                       1 cycle
            decfsz   bit_tmr        ; done yet?             1 cycle
            goto     wloop2         ; no, go to top of loop 2 cycles
            retlw    0              ; yes, get out          2 cycles

;********************************************************************
; Subroutine send_out                                               *
;                                                                   *
;     Serially transmit data out port B, bit 0.                     *
;     7 Data Bits, No Parity, 2 Stop Bit                            *
;********************************************************************
send_out    clrf     bit_ctr
            incf     bit_ctr,1
            bcf      PORT_B, TX
            call     bit_delay

test_bit    rrf      out_byte, 1
            btfss    STATUS, C
            goto     send_0
            bsf      PORT_B, TX
            goto     xmitwait
send_0      bcf      PORT_B, TX
xmitwait    call     bit_delay

            incf     bit_ctr,1
            btfss    bit_ctr, 3
            goto     test_bit
            bsf      PORT_B, TX
            call     bit_delay
            call     bit_delay

            retlw    0

;********************************************************************
; Subroutine m_right                                                *
;                                                                   *
;     Send command to mouse port to move the pointer right 2 counts.*
;********************************************************************
m_right     movlw    40h
            movwf    out_byte
            call     send_out
            movlw    02h
            movwf    out_byte
            call     send_out
            movlw    0h
            movwf    out_byte
            call     send_out
end_mr      retlw    0

;********************************************************************
; Subroutine m_left                                                 *
;                                                                   *
;     Send command to mouse port to move the pointer left 2 counts. *
;********************************************************************
m_left      movlw    43h
            movwf    out_byte
            call     send_out
            movlw    3Eh
            movwf    out_byte
            call     send_out
            movlw    0h
            movwf    out_byte
            call     send_out
end_ml      retlw    0

;********************************************************************
; Subroutine m_down                                                 *
;                                                                   *
;     Send command to mouse port to move the pointer down 2 counts. *
;********************************************************************
m_down      movlw    40h
            movwf    out_byte
            call     send_out
            movlw    0h
            movwf    out_byte
            call     send_out
            movlw    02h
            movwf    out_byte
            call     send_out

end_md      retlw    0

;********************************************************************
; Subroutine m_up                                                   *
;                                                                   *
;     Send command to mouse port to move the pointer up 2 counts.   *
;********************************************************************
m_up        movlw    4Ch
            movwf    out_byte
            call     send_out
            movlw    0h
            movwf    out_byte
            call     send_out
            movlw    3Eh
            movwf    out_byte
            call     send_out

end_mu      retlw    0

;********************************************************************
; Subroutine sm_click                                               *
;                                                                   *
;     Send commands to mouse port to indicate a single click.       *
;********************************************************************
sm_click    movlw    60h
            movwf    out_byte
            call     send_out
            movlw    0h
            movwf    out_byte
            call     send_out
            movlw    0h
            movwf    out_byte
            call     send_out

; Wait for 0.02 milliseconds
            clrf     isr_tmr2
smc_loop    movf     isr_tmr2,0
            sublw    .5
            btfss    STATUS,Z
            goto     smc_loop

            movlw    40h
            movwf    out_byte
            call     send_out
            movlw    0h
            movwf    out_byte
            call     send_out
            movlw    0h
            movwf    out_byte
            call     send_out

            retlw    0

;********************************************************************
; Subroutine dm_click                                               *
;                                                                   *
;     Send commands to mouse port to indicate a double click.       *
;********************************************************************
dm_click    call     sm_click

; Wait for 0.04 milliseconds
            clrf     isr_tmr2
dmc_loop    movf     isr_tmr2,0
            sublw    .10
            btfss    STATUS,Z
            goto     dmc_loop

            call     sm_click
            retlw    0

;*********************************************************************
; Initialization and Main Loop                                       *
;                                                                    *
; After hardware and variable initialization, the Main Loop is       *
; executed.  This loop will execute forever (or at least until power *
; is shut off).  The Main Loop is programmed to repeat once every    *
; 28 msecs.                                                          *
;                                                                    *
; Timing is handled by the RTCC overflow interrupt that is           *
; programmed to occur once every 4 msecs.  The interrupt service     *
; routine simple increments a couple of counters and returns.  These *
; counters are used to measure time within the main loop.            *
;*********************************************************************
;* Initialize PIC Hardware
init        bsf      STATUS, RP0
            movlw    B'00000011'
            movwf    OPTION_OFF


            movlw    B'00000000'
            movwf    TRISB_OFF
            bcf      STATUS, RP0

            bsf      PORT_B, TX

            movlw    B'10000001'
            movwf    ADCON0

            clrf     isr_tmr
            clrf     isr_tmr2
            clrf     moving
            clrf     right_ctr
            clrf     move_rgt
            clrf     left_ctr
            clrf     move_lft
            clrf     down_ctr
            clrf     move_dwn
            clrf     up_ctr
            clrf     move_up
            clrf     blink_tmr
            clrf     blink_ctr
            clrf     s_click
            clrf     d_click

            movlw    .4
            movwf    mouse_spd

            movlw    .18
            movwf    move_tics
            movlw    .2
            movwf    blink_tics
            movlw    .36
            movwf    max_time
            movlw    .76
            movwf    right
            movwf    up
            movlw    .20
            movwf    left
            movwf    down

            movlw    B'10100000'
            movwf    INTCON

main_loop
; CHECK BLINK COUNTER
chk_blink   btfsc    blink_ctr,0
            goto     blinka
            btfsc    blink_ctr,1
            goto     blinkb
            goto     rd_chan0

blinka      incf     blink_tmr,1
            movf     max_time,0
            subwf    blink_tmr,0
            btfss    STATUS,C
            goto     rd_chan0
            clrf     blink_tmr
            clrf     blink_ctr
            goto     rd_chan0

blinkb      incf     blink_tmr,1
            movf     max_time,0
            subwf    blink_tmr,0
            btfss    STATUS,C
            goto     rd_chan0
            clrf     blink_tmr
            clrf     blink_ctr
            bsf      s_click,0
            goto     rd_chan0

; READ A/D CHAN 0 - RIGHT/LEFT
rd_chan0    bcf      ADCON0, CHS1
            bcf      ADCON0, CHS0

            bsf      ADCON0, GO
ad_wait0    btfss    ADCON0, ADIF
            goto     ad_wait0

            bcf      ADCON0, ADIF
            movf     ADRES, 0
            movwf    ad_chan0
            rrf      ad_chan0,1
            bcf      ad_chan0,7

; READ A/D CHAN 1 - UP/DOWN
rd_chan1    bcf      ADCON0, CHS1
            bsf      ADCON0, CHS0
            call     bit_delay

            bsf      ADCON0, GO
ad_wait1    btfss    ADCON0, ADIF
            goto     ad_wait1

            bcf      ADCON0, ADIF
            movf     ADRES, 0
            movwf    ad_chan1
            rrf      ad_chan1,1
            bcf      ad_chan1,7

            bcf      ADCON0, CHS1
            bcf      ADCON0, CHS0

; CHECK IF MOVING
check_move  btfsc    moving,0
            goto     check_up

; CHECK THRESHOLDS
check_right movf     right,0
            subwf    ad_chan0,0
            btfss    STATUS,C
            goto     check_rw
            incf     right_ctr,1
            goto     send_to_mouse

check_rw    movf     move_tics,0
            subwf    right_ctr,0
            btfss    STATUS,C
            goto     check_left
            clrf     right_ctr
            bsf      move_rgt,0
            bsf      moving,0
            goto     send_to_mouse

check_left  clrf     right_ctr
            movf     left,0
            subwf    ad_chan0,0
            btfsc    STATUS,C
            goto     check_lw
            incf     left_ctr,1
            goto     send_to_mouse

check_lw    movf     move_tics,0
            subwf    left_ctr,0
            btfss    STATUS,C
            goto     check_down
            clrf     left_ctr
            bsf      move_lft,0
            bsf      moving,0
            goto     send_to_mouse

check_down  clrf     left_ctr
            movf     down,0
            subwf    ad_chan1,0
            btfsc    STATUS,C
            goto     check_dw
            incf     down_ctr,1
            goto     send_to_mouse

check_dw    movf     move_tics,0
            subwf    down_ctr,0
            btfss    STATUS,C
            goto     check_up
            clrf     down_ctr
            bsf      move_dwn,0
            bsf      moving,0
            goto     send_to_mouse

check_up    clrf     down_ctr
            movf     up,0
            subwf    ad_chan1,0
            btfss    STATUS,C
            goto     check_blink
            incf     up_ctr,1
            goto     send_to_mouse

check_blink movf     move_tics,0
            subwf    up_ctr,0
            btfss    STATUS,C
            goto     blink1

            movf     blink_ctr,1
            btfss    STATUS,Z
            goto     blink1

            movf     moving,1
            btfss    STATUS,Z
            goto     blink1

            clrf     up_ctr
            bsf      move_up,0
            bsf      moving,0
            goto     send_to_mouse

blink1      movf     blink_tics,0
            subwf    up_ctr,0
            btfsc    STATUS,C
            goto     blink2
            clrf     up_ctr
            goto     send_to_mouse

blink2      movf     blink_ctr,1
            btfss    STATUS,Z
            goto     move_check
            incf     blink_ctr,1
            clrf     blink_tmr
            clrf     up_ctr
            goto     send_to_mouse

move_check  movf     moving,1
            btfsc    STATUS,Z
            goto     blink3
            clrf     blink_ctr
            clrf     blink_tmr
            clrf     up_ctr
            clrf     move_rgt
            clrf     move_lft
            clrf     move_up
            clrf     move_dwn
            clrf     moving
            goto     send_to_mouse

blink3      incf     blink_ctr,1
            movf     blink_ctr,0
            sublw    .3
            btfss    STATUS,Z
            goto     blink4
            clrf     blink_tmr
            clrf     blink_ctr
            clrf     up_ctr
            bsf      d_click,0
            goto     send_to_mouse

blink4      clrf     blink_tmr
            clrf     up_ctr

send_to_mouse
            decfsz   mouse_spd,1
            goto     chk_sclick
            movlw    .4
            movwf    mouse_spd

            movf     moving,1
            btfsc    STATUS,Z
            goto     chk_sclick

chk_mr      movf     move_rgt,1
            btfsc    STATUS,Z
            goto     chk_ml
            call     m_right

chk_ml      movf     move_lft,1
            btfsc    STATUS,Z
            goto     chk_md
            call     m_left

chk_md      movf     move_dwn,1
            btfsc    STATUS,Z
            goto     chk_mu
            call     m_down

chk_mu      movf     move_up,1
            btfsc    STATUS,Z
            goto     chk_sclick
            call     m_up

chk_sclick  movf     s_click,1
            btfsc    STATUS,Z
            goto     chk_dclick
            call     sm_click
            clrf     s_click

chk_dclick  movf     d_click,1
            btfsc    STATUS,Z
            goto     chk_real_time
            call     dm_click
            clrf     d_click

; Wait for isr_tmr to be equal to 7. This will either mean 28
; milliseconds (7*4m) have passed or 1.052 seconds (263*4m) have
; passed.  The longer time will occur when either a single or
; double mouse click have been commanded.
chk_real_time
            movf     isr_tmr,0
            sublw    .7
            btfss    STATUS,Z
            goto     chk_real_time

            clrf     isr_tmr
            goto     main_loop

     END


Link to the Abridged Data Sheet for the Burr-Brown INA102 Low Power Instrumentation Amplifier
http://www.ti.com/lit/ds/sbos137/sbos137.pdf

Link to the Data Sheet for the LM358-N Low-Power, Dual-Operational Amplifiers
http://www.ti.com/lit/ds/symlink/lm158-n.pdf
Image
butlh ghajbogh nuv'e' yIHo'.
Admire the person with dirt under his fingernails.

User avatar
Electrons-R-Fun
Member
Member
Posts: 143
Joined: Tue May 12, 2015 7:03 pm
Contact:

Re: Eye Activated Switch

Postby Electrons-R-Fun » Fri Jun 12, 2015 5:36 pm

Thanks ZappMan for the article post with code.

I could not find a -10 volt regulator so I got some LM337T adj. regulators. It appears I will need about 1.7K ohms for R2 to give me my -10 volts from a 5 volt supply source.

After looking at the data sheet, I am not sure what supply voltage to use for the LM337T. I only know to use the 5v, because the circuit diagram, in the article has listed a supply of 5 volts going to the Lm358.

Negative voltages are odd to me, so I am not really sure how to use them. I know with a LM317 adj. voltage regulator, a Vin of about 2 volts greater than Vout would be needed to maintain the voltage you want to keep. (ie.) to get 5 volts from Lm317 it needs 7 volts to maintain an output of 5v. So do negative regulators need 2 volts higher for Vin to maintain the set Vout? (ie.) -10 volts out would need +(positive) 12 volts for Vin ?

Jason

User avatar
zappman
Administrator
Administrator
Posts: 120
Joined: Wed May 06, 2015 12:31 am
Contact:

Re: Eye Activated Switch

Postby zappman » Fri Jun 12, 2015 11:20 pm

Electrons-R-Fun wrote:Thanks ZappMan for the article post with code.

I could not find a -10 volt regulator so I got some LM337T adj. regulators. It appears I will need about 1.7K ohms for R2 to give me my -10 volts from a 5 volt supply source.

After looking at the data sheet, I am not sure what supply voltage to use for the LM337T. I only know to use the 5v, because the circuit diagram, in the article has listed a supply of 5 volts going to the Lm358.

Negative voltages are odd to me, so I am not really sure how to use them. I know with a LM317 adj. voltage regulator, a Vin of about 2 volts greater than Vout would be needed to maintain the voltage you want to keep. (ie.) to get 5 volts from LM317 it needs 7 volts to maintain an output of 5v. So do negative regulators need 2 volts higher for Vin to maintain the set Vout? (ie.) -10 volts out would need +(positive) 12 volts for Vin ?

Jason

I am not sure that the LM317T is the best way to get the -10 volts needed for your project. However I think it will work.

Its been awhile since I did any analog design, but I will do my best to help you get your supply working. If anyone else notices an error in what I am describing, please speak up and join the conversation.

Here is a sample circuit, using a LM317 for the positive supply and a LM337 for the negative regulator.
Image
You can use fixed resistors when you build your circuit.

I am showing +/- 15 volts feeding the regulators, the data sheets for the regulators are not clear on the minimum input voltages needed, but I think 2.5 to 3 volts headway is needed above the output voltage.

Here is a link to the LM337 datasheet

From its datasheet the INA102 instrumentation amplifier has a QUIESCENT CURRENT of 750μA max. However, the LM317/LM337 need a minimum load of about 0.7mA therefore I added the 1k load resistors that provide a 10 mA load on the regulators.

Here is a link to a LM337 Resistor and Voltage Calculator

I could only find the first two pages of the Eye Mouse article, do you have the other pages? If so can you upload them?

LM317-LM337regulators-001.jpg
(50.08 KiB) Not downloaded yet
Image
butlh ghajbogh nuv'e' yIHo'.
Admire the person with dirt under his fingernails.

User avatar
Electrons-R-Fun
Member
Member
Posts: 143
Joined: Tue May 12, 2015 7:03 pm
Contact:

Re: Eye Activated Switch

Postby Electrons-R-Fun » Sun Jun 14, 2015 3:50 am

Hey Zappman,

I do have the entire article, I will try to upload it correctly for you.

I hooked up the circuit but the LM358 did not go swing positive to negative, I had my Fluke 87 looking at it. I will try the o-scope tomorrow.

I made my negative voltage from 8 AA batteries connected to 5 AA batteries and ran the -12 volts into the 337 to get my -10ish. . The INA 102 has about 9 volts at Vin and about -9 volts at the Gnd. The op-amp is 5v at Vin and about -9v at Gnd.

More tomorrow...

User avatar
zappman
Administrator
Administrator
Posts: 120
Joined: Wed May 06, 2015 12:31 am
Contact:

Re: Eye Activated Switch

Postby zappman » Sun Jun 14, 2015 8:46 am

Electrons-R-Fun wrote:Hey Zappman,

... The INA 102 has about 9 volts at Vin and about -9 volts at the Gnd. The op-amp is 5v at Vin and about -9v at Gnd. ...

I am confused?

You should have the following power supply voltages supplied to the INA102:

+10V at pin 12 (+Vcc) labeled +BAT on the Eye Mouse schematic, with respect to Pin 10 (Common) labeled GND on the Eye Mouse schematic

-10V at pin 9 (-Vcc) labeled -10V on the Eye Mouse schematic, with respect to Pin 10 (Common) labeled GND on the Eye Mouse schematic

You should have the following power supply voltages supplied to the LM358:

+5V at LM358 pin 8 (V+) labeled +5V on the Eye Mouse schematic, with respect to Pin 10 on the INA102 (Common) labeled GND on the Eye Mouse schematic

-10V at LM358 pin 4 (V-) labeled -10V on the Eye Mouse schematic, with respect to Pin 10 on the INA102 (Common) labeled GND on the Eye Mouse schematic
Image
butlh ghajbogh nuv'e' yIHo'.
Admire the person with dirt under his fingernails.

User avatar
Electrons-R-Fun
Member
Member
Posts: 143
Joined: Tue May 12, 2015 7:03 pm
Contact:

Re: Eye Activated Switch

Postby Electrons-R-Fun » Mon Jun 15, 2015 2:54 am

This is the whole set up so far. You can see the 2 different battery supplies to get my +9v and -12v
Image

Just checking the Lm358 output and Lm337 output
Image


Looking straight, this wave form seems really noisy too me....? Not sure if the wave form is suppose to look that way or not.
Image

repetitively looking left and right. Wave form looks clipped. Lisa can only look right and the looking right spike is about 3.6 volts. I think I can use that as a switch for her.
Image


When looking at the wave form, it appears the tips of the waves are clipped off for some reason or another. I looked up a wave clipping circuit in Forrest Mims volume 1 mini notebook on page 55 and it has 2 diodes facing each other with a 10K resistor in parallel with the diodes but I don't see that part of the circuit in the diagram from the article. The picture is clear from the O-Scope though the waves seem to be being clipped off.

I am not sure why the positive and negative voltage amplitude are not the same in the O-scope picture. The neg. is only about -0.75 volts when looking left and when looking right the voltage goes to about +3.6 volts.

I will see if I can light up an LED when looking to the right next.

Zappman, thanks for all the replies :D I will make a video eventually for the site. Sorry about my vague descriptions.... I had it wired correctly, I've just been very tired lately.... Lisa got really sick and we had to go to hospital for a couple of days to get PICC line, she was completely catatonic. She is doing much better now.

Jason

2 different voltage supplies to get -12 volts.jpg
This is the whole set up so far. You can see the 2 different battery supplies to get my +9v and -12v
(86.13 KiB) Not downloaded yet

voltage out from op-amp and neg. voltage regulator.jpg
Just checking the Lm358 output and Lm337 output
(61.97 KiB) Not downloaded yet

Looking striaght.jpg
This wave form seems really noisy too me....? Not sure if the wave form is suppose to look that way or not.
(61.02 KiB) Not downloaded yet

alternating looking left_right.jpg
repetitively looking left and right. Wave form looks clipped. Lisa can only look right and the looking right spike is about 3.6 volts. I think I can use that as a switch for her.
(74.57 KiB) Not downloaded yet


(edited by zappman 6/15/2015 3:26PM to make pictures show in the post)

User avatar
Savage///Circuits
VIP
VIP
Posts: 404
Joined: Tue May 12, 2015 2:43 pm
Location: Palmyra, NY
Contact:

Re: Eye Activated Switch

Postby Savage///Circuits » Mon Jun 15, 2015 5:34 pm

Hey I recognize that Fluke 111! Oh, and that TDS 2024B! ;)

Nice equipment! :geek:
Image
I'm only responsible for what I say, not what you understand.

User avatar
Electrons-R-Fun
Member
Member
Posts: 143
Joined: Tue May 12, 2015 7:03 pm
Contact:

Re: Eye Activated Switch

Postby Electrons-R-Fun » Thu Jun 18, 2015 6:01 pm

Update,

Lisa is able to use the eye switch to turn on 2 different LED's on the PPDB. I think I need to do some tinkering to fix a few problems and try and make the system control some of the false activation's that occur. I would also like to stabilize the output voltage coming out of the Lm358 so the signal is not fluctuating so much.

Since this whole thing is new to me, I just feel like something is not exactly correct as it should be. I hope that's normal.


Return to “Bio-Medical Electronics”

Who is online

Users browsing this forum: No registered users and 1 guest