Title: Puff The Magic Mouse
1PuffThe Magic Mouse
BME 264 Medical Devices Dr. Patrick Wolf
April 22,
2004
2Background and Objective
- Computers are ubiquitous in modern society
- Interface can be difficult for people with
disabilities - Keyboard and mouse require high level of
dexterity - - Objective create an interface that does not
require complex movement of arms or hands
3Could use voicebut why bother?
- - Voice II Interface is very slow time between
successive inputs 1 second - - Accurate recognition depends on distance from
microphone, ambient noise - - Parts and software very expensive Voice II
kit cost 50.00, voice recognition software can
cost several hundred dollars - - Parts break randomly, online documentation is
often completely useless!
4Pressure Transducer Interface
- - Interface consists of mpx5100GP pressure
transducer, surgical tubing, and straw - - Inexpensive, parts easily replaced
- - PIC polls input pin for voltage jump
- - Looks for various combinations of long and
short puffs
5Input Circuit and Block Diagram
Data
Pressure Input (Puff)
PIC
PC
mpx5100GP
Clock
6Software/Interface description
- - PIC polls input pin for high voltage using bit
test - - Program calls a delay function
- - Within the delay function are an additional
series of bit tests and delays - - Depending on when the bit tests within the
first delay find a high voltage, puff is treated
as short or long
7Puff Command Summary
Clock Mode Cycles Through Clock Positions 1 - 8
Grid Mode Cycles Through Locations 1 - 9
L
S
S
S
S Short Puff L Long Puff
S
Move
L,
S
Returns After Command
Click Mode Mouse Vibrates as indicator
Any Input
S
S,L
L
S,S
Single
Drag
Right
Double
8PS/2 Physical Interface
6-pin Mini-DIN (PS/2) Pin 1 Data Pin 2 Not
Implemented Pin 3 Ground Pin 4 Vcc (5V) Pin
5 Clock Pin 6 Not Implemented
9PS/2 Electrical Interface
PS/2 Electrical Interface
Data and Clock lines are both connected directly
from the computer to the PIC Both lines are
normally held at 5V, but either can be pulled
low by the computer Clock cycling always
performed by mouse
10PS/2 Communication Interface
Computer to Mouse
- Data high, Clock high Idle state.
- Data high, Clock low Communication
Inhibited. - Data low, Clock high Host Request-to-Send
Mouse to Computer
- Mouse-to-Computer The Data line changes state
when Clock is high and that data is valid when
Clock is low. - Computer-to-Mouse Data line changes state when
Clock is low, with exception of ACK
11PS/2 Movement Data Packet
L,R,0 Left, Right, Middle ButtonsXS,YS Sign
Bit of X and YXY,YY Overflow bit for X and
YX0-X7 Movement in X DirectionY0-Y7
Movement in Y Direction
12PS/2 Command Data Packet
- - Commands are sent by computer to mouse and
consist of 2 bytes - - Commands sent using request to send protocol
and are largely used for handshaking and
initialization - After request to send, data is clocked in by
mouse - Using the PIC to control the clock allows for
free transmission of data between device and host
13Acknowledgements
- - Dr. Patrick Wolf for taking the time to
organize and teach the course - - Michael Rizk for his infinite patience (even
until 130am the night before) and for having the
magic touch - - Sensory Inc. for making a non-functional and
poorly documented product that caused us to
abandon our original scheme 12 hours before the
deadline and devise a more efficient interface
14Any Questions?