you're reading...
HCI, Tech

[UI Basics] Accelerometer, gyroscope, and compass

In a smart phone, there are three sources of sensory information that seem all telling us something about orientation: accelerometer, gyroscope, and compass. But what’s the difference?

In terms of what information they give,

  • accelerometer: if you calculate the resultant force of the phone (using Newton’s second law F = ma), then minus the gravity (mg), and calculate an acceleration value ((F – mg) / m): that is the value obtained from the accelerometer (and usually it is divided by the three axes thus has three component values);
  • gyroscope: while in above we assume linear acceleration, angular acceleration can be also sensed by using a gyroscoope. The best way to think of this is: gyroscope tells how a device yaw, pitch and roll;
  • compass tells the phone’s orientation relative to that derived from the earth’s magnetic field.

In terms of how they work,

  • accelerometer: there are so many ways to make an accelerometer. For example, [4] introduces one using a crystal structure that is sensitive to acclerative forces, and as a result will causes a voltage to be generated. Basically, accelerometers are pretty much self-contained units that provide ‘primitive’ sensory information pertinent to a device;
  • gyroscope: the kind of gyroscope used in a device is usually the MEMS (MicroElectroMechanical System)
    gyroscope which uses the Coriolis effect to measure angular accelerations [2]. It is also a self-contained unit;
  • compass can be made of a magnetometer that determines the orientation influenced by the earth’s magnetic field [5]. Alternatively, one can also collaborate with the accelerometer to calculate the compass information such as the AK8973 chip used on the iPhones [3].

I believe knowing the difference between these three popular phone sensors can help us build better mobile applications.


[1] http://www.devx.com/wireless/Article/44799

[2] http://www.electroiq.com/articles/stm/2010/11/introduction-to-mems-gyroscopes.html

[3] http://mobiledeviceinsight.com/2011/12/sensors-in-smartphones/

[4] http://www.dimensionengineering.com/info/accelerometers

[5] http://spectrum.ieee.org/semiconductors/devices/a-compass-in-every-smartphone


About Xiang 'Anthony' Chen

Making an Impact in Your Life


No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Twitter Updates

%d bloggers like this: