# The Accelerometer Mouse

Topics: RS-232, Personal computer, Computer Pages: 5 (1227 words) Published: April 10, 2011
ACCELEROMETER MOUSE
MANAV KATARIA VINU BHASKAR ABHISHEK SHARMA MIZAN ABRAHA SUPERVISOR: P.C.PANDEY airmouse.iitb [at] gmail [dot] com

Abstract [Many tasks that are performed on the computer require the use of both a keyboard on the mouse, and many people find it frustrating and awkward to have to switch back and forth between them. The air mouse can be a great solution for this.] As computers have evolved from 66MHz to the 3+GHz today, the mouse has remained relatively unchanged. There have been only two major changes to the mouse since its inception: more buttons, and interface changes (PS/2, USB, Wireless) but the core interaction method has not changed. The touch pad mouse and the stick mouse have been designed for a laptop, but have not gained momentum outside of laptops.[ And most laptop users usually carry a USB mouse with the laptop as well.] The accelerometer based mouse can be treated as the new age input device. It is more natural in its feel and provides the user with better ease of use. The user interface of applications can be changed to utilize the free hand movement possible with the device.

1. Introduction The aim behind the project is to be able to sense the movement of a user’s hand and use it to control the movement of mouse on screen. For sensing hand movement, we use an accelerometer. This would give us the acceleration sensed by the device in each axis. We use this data to find the change in movement of mouse pointer, which is then transmitted serially to the host computer using RS 232 communication. 2. High Level Design We are using accelerometer to measure the acceleration of a user's hand and integrate that acceleration into a change in position. The math behind this is very easy - using Verlet Integration, we would approximate the integral of the acceleration to the second degree. Verlet integration interpolates between to measured accelerations, using the average slope between them to derive velocity. This is sometimes called "trapezoidal integraton." Here are the equations: x(n)= x(n-1)+ v(n-1)∆t + 1/2α∆t² But gravity would affect the accelerometers for sure , this acceleration would be added into the integral, and with no negative acceleration to remove it, the change in position would grow boundlessly. Because of this, we decided to construct a tilt mouse instead. While not as impressive as a position tracking device, the tilt mouse is easy to use and almost as neat as a position tracking mouse. The math behind this scheme is very easy - measure the acceleration due to gravity on the mouse, and multiply this by some constant to scale your output to a desirable level. The Microsoft serial mouse protocol uses an 8-bit twos complement number scheme to send data to the computer, and the numbers outputted by the Atmel Mega32's analog-to-digital converter can be conveniently represented in the same number of bits. However, the numbers outputted by the accelerometer had to be altered to normalize voltage extremes to -128 and 127 and the accelerometer's neutral output to 0. In addition to scaling the output, we also used a step filter on the data to make the mouse easier to use. Our accelerometer was so sensitive that the slightest motion of one's hand would cause the device to output a nonzero acceleration. To give the user a more stable region around the zero point, we quantized all outputs below a certain level to 0, then normalized any outputs out of this cutoff range by the breadth of the cutoff range. For example, if the cutoff were abs(10), the intersection of all numbers > -10 and all numbers < 10 defined the cutoff region, and any outputs outside of this range would be normalized by +10 or -10, depending on whether the output were negative or positive, respectively.

Our design is related to two standards. We use the Microsoft serial mouse protocol and an RS232 serial connection. RS232 uses -+12V for high and low signals, respectively. RS232 idles at +12V. Our microcontroller...