Final Year Project: Design and Build an Air Mouse for people with

advertisement
Final Year Project:
Design and Build an Air Mouse for people
with lower mobility
Electronic and Computer Engineering
Colin Grogan
06656404
Components
 The Toothpick takes readings from an accelerometer and
sends the results to the PC
 PC will then control cursor based on received information
Overview of System
Design
 Must fit on a glove
 Tilting of hand causes cursor movement
 Large zone where no cursor movement
 Larger tilt causes faster movement of cursor
 Buttons should be easy to press
 Made from copper contacts. Removes need to “click” the
buttons
Design Goals
 Pass:
 Design and build a working air mouse
 Average
 Design software for PC that receives information from air-mouse and
move the mouse around the screen in real time
 Good
 Design a working gesture recognition algorithm for the mouse
 Design a application on the PC so that users can define their own
gestures for later use
 Very Good
 Get both systems working effectively together
 Exceptional
 Get the system into a case and fitting onto a glove
Design Goals review
 Air-Mouse is not completely working

Pass
 PC successfully controls cursor based on information received
from Air-Mouse

Average
 Gesture recognition algorithm effectively picks up user made
gestures.
 Can easily define new gestures and associated commands

Good
 Cannot launch Gesture Recognition easily from device, must use
shortcut
 Device not yet in a case or mounted onto glove.
Planning
Design Decisions and why
 Toothpick microcontroller used for the device.
 Toothpick has a good amount of ports(for accelerometer and
buttons)
 Built in support for Bluetooth protocol.
 Coded in C
 Using a C++ application on PC to control the cursor
 C++ is compiled to machine code and therefore will run
quickly
 Microsoft libraries to control cursor and serial port
Technology
 Bluetooth
 Bluetooth technology is easily accessible on modern PCs
 High speed protocol, battery life suffers as a result
 Alternative? Zigbee
 Zigbee is suited to low data rate, low power applications
 Not as easily accessible to PC users as Bluetooth
Hardware
 Block Diagram:
 Divided into functional blocks
 Accelerometer – Changes output based on movement of hands
 Voltage Dividers – Changes the reference voltage for the ADC
Software
 3 programs needed:
 Cursor Control
 Connects to device
 Controls cursor based on data received
 Automatically disconnects when data is not received consecutively
 Gesture Recognition
 Detects shape made by cursor
 Shapes made of movements in 4 directions, Up, Down, Left Right
 Executes command associated with shape. Shapes stored in gestures.dat
 Device program
 Receives control data from PC
 Sends requested information
Gesture Recognition
Algorithm
 Simple algorithm, can quickly define new
gestures for use.
 Algorithm:
 Store initial position into memory
 Check if the user moves past a boundary
(say 50 or 100 pixels – can easily change)
 Concatenate direction of movement onto
String. Will be either U, D, L, R
 Save new “initial” position into memory
 Repeat until user specifies
Mouse Control program
 Windows.h made it very easy to control
the cursor on screen.
 Small example:
ReadFile(hSerial,inBuff,3,&dwBytesRead,NULL);
 This will read from the serial port “hSerial”,
save the data into “inBuff ”, which an array
of size “3” and save the number of bytes
actually read into “dwBytesRead”
 The “NULL” argument is for special
options that weren’t needed
Final Device
Problems
 The device does not work as expected.
 The Toothpick wont read information from the ADC
 This is a result of rebuilding the circuit, original circuit worked
fine.
 Accelerometer can only give unique values over 180°
 Means mouse cannot be used in any position and thus is not
entirely suitable for project
 Possible fix would be to use an accelerometer based on different
technology
 Or use 3 accelerometers all cantered on different angles
Questions?
Download