Monday, April 16, 2012

Accelerometer Development Shortcuts on Cell Phones

I've noticed that the accelerometer on modern-day smartphones can often be extremely enigmatic, especially if you are only familiar with computers and less so with physics. I am going to try to clarify some of the confusion with using the accelerometer as well as what it can do.

Basically an accelerometer measures acceleration. While this may seem quite obvious, the answer is not what people often think. Acceleration is not velocity, nor is it position. Acceleration is the change in velocity. If you look at a velocity vs time graph of an object, the slope (it's derivative) is the acceleration of that particular object.

Therefore, by using integration (the area under the curve, or the opposite of differentiation) both the velocity and the position can be found from the accelerometer data, assuming that we know what the starting velocity and starting position are (a simple way to do this is to assume both start at 0). However, due to the precisions of the sensors in cell phones, this use of the sensor may not be practical.

Also, the accelerometer can be used to measure force. Below is the force equation as shown from one of Newton's laws:

F = ma
F stands for force. m is mass. a is acceleration.

Since the mass of the cell phone is constant, we know that the force is directly proportional to the acceleration. Because we don't know the true mass of the particular device we are dealing with (some phones can weigh dramatically more/less than others) it would be a hassle to the developer and/or the user to display the force being acted on the cell phone in standardized units. However, since force and acceleration are directly related, we can use this for applications where position is not necessary, such as sensing if the phone has been dropped or shaken.

Another use of the accelerometer is (as you probably might guess) determine which way gravity (a force) is acting on the device. Since the accelerometer gives 3-axis data, we can determine which way the device is oriented and set the layout accordingly (this is now done on all modern day cell phones) It is very easy to find the orientation based upon the data from the accelerometer. Since the data is given in G's the device's orientation can be found by the axis with a value of ±1

No comments:

Post a Comment