You are on page 1of 13

EOG Mouse Control

May 5,2004.

Project Members

Vinodh kumar. R 20011322


Naveen. R 20011266
Sriram. L 20011305

COTETS

1. Introduction
2. Proposal – Design Considerations
3. Specifications
4. Block Diagram
5. Typical EOG waveform
6. Performance tests
7. Implementation plan
8. Observations
9. Electrode Placements
10. Requisites
11. Cost and Parts
12. Applications

Appendix

1. Program Listing
2. Schematic
3. References
1. Introduction

Many physically disabled individuals are deterred from using computers due to
their inability to utilize a hand-controlled mouse. However, if directional
discrimination of an icon can be achieved, these individuals would be able to
take on the functions of a mouse without the use of hands.
We propose to design and build an electro-oculogram (EOG) biopotential
amplifier in order to obtain a physiological signal due to eye movements and to
use this signal to show directional discrimination. Our design can also be used
as a model for future advancements in human-computer interactions.
The EOG biopotential amplifier should be capable of detecting frequencies
between dc-10 Hz, the range at which most ocular movements operate. The
EOG signal is in the microvolt range (50-3500 ?V). Therefore, when the DC
offset is removed, it will be challenging to obtain a strong, usable signal given
the minute nature of the recorded signal. Our choice of an EOG over other
possible methods was selected based on the ease of usage and the low cost of
production. The software choice for data acquisition and display is C, selected
for its graphical capabilities and flexibility in programming.

2. Proposal:

Design Considerations

As illustrated in the figure 1, our project has four major subsections, which are
discussed below.

The first stage of our design is the electrodes. The electrodes were chosen with
the concern of protecting the eyes from hazardous elements. ECG disposable
electrodes were used because of their easy availability. Silver/Silver-Chloride
electrodes were chosen because the half-cell potential was the closest to zero.
Electrodes with the smallest amount of half-cell potential are desirable because
they cause the least amount of offset. By definition, the hydrogen electrode has
a zero half-cell potential, but due to the gaseous nature, they cannot be feasibly
used. Although lead electrodes have a lower half-cell potential than the Ag/Ag-
Cl electrodes, lead is hazardous to the health and thus is avoided. Thus our
choice of electrodes takes into account a low cost and proper signal pick-up.
Stages 2 and 3 encompass the detection of horizontal and vertical movements
of the eye, respectively. The second stage (for horizontal discrimination)
detects lateral movements at the periphery of each eye. The hardware in this
stage consists of the EOG biopotential amplifier. Similarly, the third stage (for
vertical discrimination) consists of another EOG biopotential amplifier, but also
includes two summer circuits. EOG biopotential amplifiers were chosen since
the alternative Electro-retinalgram (ERG) requires either an electrode in the
inner surface of the retina or on the cornea. Moreover, the ERG is used to
measure the changes of potential due the stimulation of the retina by a bright
flash of light. The EOG is frequently the method of choice for recording eye
movement in research because of the proportionality of eye movement to eye
position. Refer to figure 2 for electrode placement.
When the eyes look straight ahead, a steady dipole is created between the two
electrodes. When the gaze is shifted to the left, the positive cornea becomes
closer to the left electrode, which becomes more positive. There is an almost
linear relationship between horizontal angle gaze and EOG output up to
approximately ?300 of arc. Therefore by placing electrodes to the left and right
and above and below the eye, horizontal and vertical movements can be
obtained. However, the EOG suffers from a lack of accuracy at the extremes,
due to noise compounded from the effects of an EEG, EMG, and the recording
equipment equivalent to approximately 10 of eye movement. Thus movements
of less than 10 or 20 are difficult to record. In addition, large eye movements of
300 of arc do not produce bioelectric amplitudes that are proportional to eye
position. Thus, controlling the mouse will require a moderate movement of the
eyes.
The output signal from the final amplifier stage was fed to an 8 bit ADC
(AD0808 CCN).

3. Specifications

The following performance specifications were chosen based on the voltage


and frequency ranges of the EOG signal.
Frequency Range DC – 10 Hz
Input Voltage Range 50 – 3500 ?Volts
Voltage Gain ~5,000
4. Proposed Block Diagram:
5. Typical EOG waveform

6. Performance Tests:

In order for our circuit to perform within specifications, several tests will be
made to assure basic functionality. The input to the EOG is approximately in
the range of 50 - 3500?V, however, in reality, the signal actually obtained from
the body varies slightly. Therefore for our EOG circuit, we are trying to
achieve an output in the range from 1 to 10 V, after amplification. The voltage
gain needed for this circuit should be in the range of 74 ? 5 dB. However, since
the signal obtained from the body is slightly different from person to person,
we are not exactly sure what kind of voltage levels we will be picking up from
the body. Therefore, the actual voltage gain necessary may possibly be much
higher than our initial estimate. We will be testing the output of the EOG to
ensure that we have enough voltage gain so that the signal can be properly
utilized.
7. Implementation Plan:

1. Hardware:

The hardware for the signal pick up of the EOG consists of an instrumentation
amplifier stage followed by a 6 pole filter to restrict the signal to the required
Bandwidth. In our Case we used a cutoff frequency of 15Hz for the low pass
filter. A six pole active filter was constructed because the Mains supply
interference (50 Hz) was very high. The 120dB per decade roll off provided by
the six pole filter was sufficient to reject the 50 Hz interference. The final stage
consisted of amplifier stage with a gain of 100.The pre amplifier was designed
for a gain of 10.The overall gain of the 3 stages of 2nd order LPFs was
approximately 5.Hence the total gain provided is 5000.From the final amplifier
stage , a diode was used to provide the signal to the unipolar ADC.

DC Offset Compensation:

A significant hardware problem that we faced was the building up of sufficient


DC voltage. The DC voltage was identified to be partly caused by the
electrodes (improper contact) and the offset currents of the OPAMPs used.
Hence we included an offset compensation circuitry for the 741 opamps used.
This is a potentiometer arrangement with an end connected to negative
supply.741 opamps were used throughout the amplifier chain. The use of 741
opamps caused the size of the circuit to increase but it minimized interference
problems. However we intend to use only low offset opamps OP27 in the future
because additional compensation circuitry had to be used for the 741 OPAMPS.

Safety Considerations:

? As in any bio potential experiment, the patient is to be isolated from the


power supply.

? An important check to be made is to ensure that the supply lines and ground
lines are adequately separated. Shocks and sparking were observed due to
accidental shorting of negative and ground reference lines.
? Since we used a unipolar ADC, the absolute rating specified a minimum
voltage of -0.3v. Hence, we used a diode to prevent any negative voltage from
affecting the ADC.
The final hardware part is the ADC. We used the ADC0808 CCN which was
obtained as a free sample from Analog Devices. Since it was a unipolar ADC,
we provided a DC offset to the ADC input i.e. the EOG signal with a peak
value of 1V was superimposed on a DC voltage of 1.5V.The DC voltage was
critical because it decides the positioning of the cursor at the centre of the
screen.

8. Observations about the EOG signal

The EOG signal has a pulse shape with the pulse duration approximately
200ms on the average.
2. When eye ball is moved one side the voltage remains positive (or
negative) and returns to zero when looking straight.
3. When measuring horizontal movement, the potential caused by vertical
movement on the horizontal electrodes is less significant compared to
horizontal potential.
4. Movement of the patient’s head or body alters the DC level of the signal.
5. The pulse produced by leftward movement is nearly the same as
produced by rightward movement in both amplitude and pulse duration.
6. Even with the eye closed, the potential was observed to be the same. This
indicates that there is no significant interference from
ElectroRetinoGram(ERG).
7. For the two patients under test, the amplitude was approximately the
same, but the pulse duration varied slightly.
8. Depending on the angle through which the eyeball was moved, the
amplitude of the EOG signal changed.
9. Electrode Placement
10. Requisites

Bread boards / PCB


ECG electrodes
Opamps, Resistors, Capacitors
Electrodes connectors, wires
ADC
Parallel port interface cable
PC with Turbo C installed
Power supply
Clock Generator

11. Cost and Parts

Electrodes Rs.100
741 op amps Rs.50
Connectors and wires Rs.30
ADC0808CCN --- (available)
Port Interface Rs.50
Resistors, capacitors Rs.25s
----------------------------------------------------------

Total Costs Rs.255 ( $5)

12. Applications:

1. Computer mouse control

2. Identification of squint eyes and degree of squint ness


Appendix
1. C Program Listing

#include<stdio.h>
#include<graphics.h>
#include<dos.h>
#include<math.h>

void *buff;
void main()
{
int gd=DETECT,gm;
int x,y,maxx,maxy,area;
int temp,sens=1,mid,up,low;
int flag=0,val,val1=0,val2=30777;
int i;

//configuring the parallel port as input


temp=inport(0x37a);
outport(0x37a,0xff2b);

//Graphics initialisation
start:
initgraph(&gd,&gm,"");
maxx=getmaxx();maxy=getmaxy();
rectangle(0,10,maxx,maxy);
x=maxx/2;y=maxy/2;
drawptr(x,y);
area=imagesize(x-15,y-15,x+15,y+15);
buff=malloc(sizeof(area));
getimage(x-15,y-15,x+15,y+15,buff);
x=maxx/2;
y=maxy/2;
flag=0;

//Getting the mid value as a mean of 100 samples


//The user is instructed to look at the centre of the screen
//for the first 5 seconds
mid=0;
for(i=0;i<100;i++)
mid=mid+inport(0x378)-30700;
mid=mid/99+30700;

//infinite loop for port monitoring


while(1)
{
val1=inport(0x378);
gotoxy(21,1);
printf("%d",val1);

//Neglecting LSB changes occurring due to noise or interference


if(abs(val1-mid)<35)
{
continue;
}

//Setting the Thresholds for the Right and Left movements


if((val1-mid)>55)
{
if(x>15)
{
putimg(x,y);
x=(x-sens)%maxx;
putimg(x,y);
delay(80);
}
}
else if((val1-mid)<55)
{
if(x<(maxx-15))
{
putimg(x,y);
x=(x+sens)%maxx;
putimg(x,y);
delay(80);
}
}
}
}

putimg(int x,int y)
{
putimage(x-15,y-15,buff,XOR_PUT);
}

//Subroutine for mouse pointer graphic


drawptr(int x,int y)
{
setcolor(RED);
line(x-13,y-13,x,y-13);
line(x-13,y-13,x-13,y);
line(x-13,y,x-7,y-5);
line(x,y-13,x-5,y-7);
line(x-7,y-5,x+11,y+13);
line(x-5,y-7,x+13,y+11);
line(x+11,y+13,x+13,y+11);
setfillstyle(2,RED);
floodfill(x,y,RED);
}

/*
The following changes can be adopted if the program doesnot provide the
intended result

1. The mid value can be set as 30850.


2. The Thresholds can be increased or decreased
3. Delays can be modified
*/

2. EOG Schematic

Click here for a Detailed Schematic

3. References:

1. Eagle Eyes - http://www.bc.edu/schools/csom/eagleeyes/


2. Evaluation of the EOG for communication through eye movements E.
Lileg1, G. Wiesspeiner2, H. Hutten2 Boltzmann Institut für technische
Lebenshilfen,Institut für Biomedizinische Technik,Austria
3. http://www.ee.ualberta.ca/~ee401/archive_fall_2001.html

You might also like