EYE CONTROLLED MOUSE USING EMBEDDED SYSTEM S.Mohamed Yousuf C.Guru prasath SYED AMMAL ENGINEERING SYED AMMAL ENGINEERING COLLEGE. COLLEGE. e-mail id – yousufrahan@gmail.com ABSTRACT: e-mail id –gurusuf@gmail.com Many physically nature of the recorded signal. Our choice disabled individuals are deterred from of an EOG over other possible methods using computers due to their inability to was selected based on the ease of usage utilize a hand-controlled mouse. However, and the low cost of production. if directional discrimination of an icon can be achieved, these individuals would be OBJECTIVE: able to take on the functions of a mouse without the use of hands. build a module that consists of an EOG We implemented a module that consist of The objective of this project is to Electrooculogram (EOG) biopotential amplifier in order to obtain a physiological signal due to eye movements amplifier to control the mouse pointer in the system monitor. This module will be very useful for physically challenged people. and to use this signal to show directional DESIGN IMPLEMENTATION discrimination. Our design can also be DESIGN STAGES: used as a model for future advancements in human-computer interactions. The EOG bio potential amplifier should be capable of detecting frequencies The first stage of our design is the electrodes 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 electrooculogram (EOG)biopotential amplifier. between dc-10 Hz, the range at which most ocular movements operate. The EOG and Stages 2 and 3 encompass the detection of horizontal and vertical movements of the eye, respectively. The second and third stages (for horizontal and vertical discrimination) detect lateral movements at the periphery of each eye. The hardware in these stages consists of the EOG converters are used for horizontal and vertical bio-potential electrode outputs. For the microcontroller amplifier. The filters are implemented using IC LM358.Two ICs are part 8051 is used. used in order to produce a six pole lowpass The last and stage 5 is interfacing the whole filter. The cutoff frequency of the filter is circuit with system using the PS/2 mouse port 15Hz and roll off rate is 120dB/decade. to access the mouse pointer by programming Stage 4 consist of Analog to Digital converter and microcontroller to convert the analog signal into digital signal and to send this digital signal to the system. Analog to digital counter is implemented using IC0809.Separate analog to digital BLOCKDIAGRAM: Fig:1 Design model the microcontroller to synchronize with PS/2 port. Design model: eye rotates in its orbit. This potential can be 1. Right upper electrode. registered in electoretinogram or electrooculogram. 2. Left upper electrode. The 3. Right lower electrode. continuous corneal-retinal potential can be used to measure eye’s position, this can be done by placing 4. Left lower electrode. superficial electrodes in both sides of the 5. Right electrode. eye (left and right) or in the top and bottom and a third electrode on the 6. Left electrode. forehead as a reference. This type of MEASUREMENT AND ANALYSIS OF ELECTROOCULOGRAPHY: registration is called electrooculogram. When the sight is centered, the dipole is The eye is a seat of a steady electric potential field that is quite unrelated to light stimulation. In fact, this symmetrically localized between the two electrodes, so the output of the EOG is zero. field may be detected with the eye in total When the person looks to the right darkness and/or with the eyes closed. the positive cornea gets closer to the left Between the cornea and retina exists a electrode that becomes more positive. differential potential. This potential is There is an almost linear relation between because there are established ionic currents the horizontal angle and the output of the between the EOG, by approximately +30 degree or -30 photoreceptors and its base (darkness degree from the visual arc. When the currents).These currents relatively change electrodes are located on the top and when the photoreceptors are excited. This bottom, the movements register vertically. potential can be considered as an electric The magnitude of this cornea-retinal dipole which rotation center is in the potential is in the range 0.05-3.5 mV. external segment of center of the eye and it rotates when the Fig2:Section of Eye It is not generated by excitable electrodes were chosen because the half- tissue but, rather, is attributed to the higher cell potential was the closest to zero. metabolic rate in the retina. The polarity of Electrodes with the smallest amount of this potential difference in the eyes of half-cell potential are desirable because invertebrates is opposite to that of they cause the least amount of offset. By vertebrates. This potential difference and definition, the hydrogen electrode has a the rotation of the eye are the basis for a zero half-cell potential, but due to the signal measured at a pair of surface gaseous nature, they cannot be feasibly electrodes. The signal is known as the used. Although lead electrodes have a electro-oculogram, (EOG). lower half-cell potential than the Ag/AgCl electrodes, lead is hazardous to the health Ag-AgCl ELECTRODE: and thus it is avoided. Thus our choice of 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 takes into account a low cost and proper signal pick-up. To record the ECG, EEG, EMG, EOG, etc. electrodes must be used as a transducers to convert an ionic flow of current in the setting the electrode back slightly from the body to an electronic flow along a wire. surface of the skin on a quantity of Two coupling jelly (electrolyte paste). important characteristics of electrodes are electrode potential and contact impedance. Good electrodes will have low stable figures for both of the MEASURMENT OF ELECTROOCULOGRAPHY above characteristics. Electrode potential The acquisition system employs arises because a metal electrode in contact Ag – AgCl surface electrodes for signal with an electrolyte (body fluids) forms a pickup which requires application of half cell with a potential dependent upon sufficient electrolyte gel to reduce the skin the metal in use and the ions in the impedance. As we said earlier human eye electrolyte. can be described as a dipole with positive All electrodes suffer from variations in contact resistance due to movement, and the drying out of any pole at cornea and negative pole with retina. Two surface electrodes are placed surrounding coupling medium. This is improved by Fig3: Formation of dipole moment due to eye ball movement the eye. When the eye turns to right side, electrode. Likewise when the eye turns to right surface electrode becomes positive left side, left surface electrode becomes when compared with the other surface positive than the other surface electrode. Fig4: Typical EOG waveform DESIGN OF ELECTRO- owing to Rejection OCULOGRAM AMPLIFIER its high Ratio Common (CMRR). Mode Two instrumentation amplifiers are employed The first stage of any EOG biopotential amplifier is the instrumentation amplifier which provides the initial amplification while reducing the effect of signals such as Power-line interference and skin muscle artifacts for this purpose, one for each of the two channels. Since the EOG signal content varies between DC and 10 Hz, a low pass filter is used after the signal pickup stage, with cutoff frequencies of 15 Hz as shown in fig. 5. Fig 5: EOG measurements INSTRUMENTATION AMPLIFIER required gain. Actually, this stage can be implemented using IC 741.But, three ICs. Here instrumentation we use amplifier. AD620 The main objective of this stage is to eliminate the So, we designed this filter part using IC LM358. It has two comparators inside the IC dc drift between cornea and retina in our eyes. It is a low power amplifier. If we use ANALOG IC741 we need three op amps, so we finish CONVERTER: TO DIGITAL it with this single op amp. It is also an 8pin IC, but it consumes very low power. The next stage is to convert the Minimum CMRR value is 100dB, so it has analog signals to digital signals. ADC the greater tendency to eliminate the 0809 is used to do this operation. Since common mode signal, so it provides two analog signals are to be converted to difference signal which we need exactly. digital signals ADC 0809 is used which has 2 channels. The ADC0809 data The input current is 3mA.The acquisition component is a monolithic output of this amplifier is the difference CMOS device with an 8-bit analog-to- between voltage digital converter, 8-channel multiplexer outputs. So this voltage contains the and microprocessor compatible control information of the eye movement. logic. The 8-bit A/D converter uses the two electrodes LOW PASS FILTER successive approximation the conversion technique. Usually noise frequency is in the range of features high KHz or MHz, but our signal is in the range stabilized comparator, a 256R voltage 0-15Hz. But, the output voltage is very divider with analog switch tree and a low. So if noise interrupts, then the successive approximation register. The 8- information may lose. To avoid this, we channel multiplexer can directly access designed a low pass filter for 16Hz.It is a any of 8-single-ended analog signals. The six pole filter (Three second order filters device eliminates the need for external are cascaded). It provides 120dB/decade. zero and full-scale adjustments. a The as impedance converter chopper So the noise will be completely eliminated at the end of this stage. Here feedback resistors are adjusted to provide the Easy interfacing to microprocessors is provided by the latched and decoded multiplexer address inputs with an overload-protected 5V power and latched TTL TRI-STATE outputs. supply. The design of the ADC0809 has The standard PS/2 mouse interface been optimized by incorporating the most supports desirable (right/left) aspects of several A/D the following movement, inputs: Y X (up/down) conversion techniques. The ADC0809 movement, left button, middle button, and offers high speed, high accuracy, minimal right button. The mouse reads these inputs temperature dependence, excellent long- at a regular frequency and updates various term accuracy and repeatability, and counters and flags to reflect movement and consumes minimal power. These features button states. make this device ideally suited to The standard mouse has two applications from process and machine control to consumer and automotive counters that keep track of movement: the X-movement counter and the Y-movement applications. counter. These are 9-bit 2's complement PS/2 INTERFACE AND PROTOCOL values and each has an associated overflow flag. Their contents, along with The PS/2 mouse interface originally appeared in IBM's "Personal System/2" computers in the late 80's. It still remains a widely-supported interface for the sake of constantly maintaining backward compatibility. The PS/2 mouse interface uses a bidirectional serial protocol to transmit movement and button-position data to the computer's auxiliary device controller (keyboard controller). The computer, in turn, may send a number of commands to the mouse to set the report rate, resolution, reset the mouse, disable the mouse, etc. The computer also provides the mouse the state of the three mouse buttons, are sent to the host in the form of a 3-byte movement data packet (as described in the next section.) The movement counters represent the amount of movement that has occurred since the last movement data packet was sent to the host (i.e., they do not represent absolute positions.) When the mouse reads its inputs, it records the current state of its buttons and checks for movement. If movement has occurred it increments (for +X or +Y movement) or decrements (for -X or -Y movement) its X and/or Y movement counters. If either of the counters has overflowed, it sets the appropriate overflow flag. PS2 ports use synchronous these are large margins both this works serial signals to communicate between the good since this is a synchronous port (this keyboard or mouse to the computer also helps cut on the cost of high precision clocks). The data line transition is made on Data transmission from the mouse to the computer is done with, each clock period is usually between 70 to 150 microseconds (10 to 25 microseconds for transitions and 30 to 50 microseconds for the falling edge of the clock signal and is usually sampled when the clock is low. Each data packet is composed of 11 bits, 1 start bit (which is low), 8 data bits, 1 odd parity bit and 1 stop bit (high). high or low state), some may feel that MOVEMENT DATA PACKET: The standard PS/2 mouse sends movement/button information to the host using the following 3-byte packet Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Byte1 Y overflow X overflow Y sign bit X sign bit Always 1 Middle Btn Right Btn Left Btn Byte 2 X Movement Byte3 Y Movement MOUSE RESOLUTION AND TRACKING RATE tracking rate of 102 inches per second and for 400 CPI mouse only 25.2 inches per second.Bi-directional transmission is The standard PS/2 mouse (with controlled by the CLK and DATA lines. Logitech mouse) defaults to 160 CPI and Both are fed by an open collector device can be switched to 40, 80, 160 or 320 CPI which let either host or mouse force the with software. Microsoft mouse driver for line to "0". During non-transmission, CLK Windows 3.x and Windows 95 defaults to is at "1" and DATA can be at "0" or "1". 160 counts per inch. The maximum tracking rate for PS/2 mouse is 40 report/second * 255 counts per report = 10200 counts per second. For 100 CPI mouse this would indicate maximum The host can inhibit mouse transmission by forcing CLK to "0". If the host inhibits the mouse while it is transmitting, the byte must be retransmitted (if the inhibit state arrived Sending data: Check that both before the 11th clock).There is a simple clock and data are high. Pull down data for description in old IBM PS/2 model 50/60 start bit, and start clocking. technical reference. The mouse interface is the same as the keyboard interface. The Intel 8042 supports two channels, one for APPLICATION OF EOG SIGNAL: Computer mouse control. keyboard and one for the auxiliary device (mouse, trackball, touchpad). Pin 1 is the Robotics. data, pin3 ground, pin 4 +5V and pin 5 Guidance of a wheelchair. clocks. Receiving data: Check "clock". If inactive, there is a bit on the "data" line. Each transmission unit is one start bit, eight data bits, odd parity and one stop bit. Start bits are low, stop bits high. Each clock active or inactive period is 30 to 50 microseconds. Data transition to falling edge of clock is 5 to 25 microseconds. CONCLUSION: The paper includes various applications Computer mouse control, Robotics, Guidance of a wheelchair. The paper will be very much useful to the handicapped people to operate their pc using their eyes alone.