Guide

Accelerometer, Gyro and IMU Buying Guide

Accelerometers and gyros are becoming increasingly popular in consumer electronics, so maybe it’s time you added them to your project! Scrolling through SparkFun’s sensors category reveals a huge list of these sensors that might be perfect for your next project, if only you knew what they did, and which one best fit your project. The goal of this buying guide is to get you speaking the same language as these sensors’ datasheets and to help you select the one that is best-suited for your needs.

Accelerometers

What’s an accelerometer measure? Well, acceleration. You know…how fast something is speeding up or slowing down. You’ll see acceleration displayed either in units of meters per second squared (m/s2), or G-force (g), which is about 9.8m/s2 (the exact value depends on your elevation and the mass of the planet you’re on).

Accelerometers are used to sense both static (e.g. gravity) and dynamic (e.g. sudden starts/stops) acceleration. One of the more widely used applications for accelerometers is tilt-sensing. Because they are affected by the acceleration of gravity, an accelerometer can tell you how it’s oriented with respect to the Earth’s surface. For example, Apple’s iPhone has an accelerometer, which lets it know whether it’s being held in portrait or landscape mode. An accelerometer can also be used to sense motion. For instance, an accelerometer in Nintendo’s WiiMote can be used to sense emulated forehands and backhands of a tennis racket, or rolls of a bowling ball. Finally, an accelerometer can also be used to sense if a device is in a state of free fall. This feature is implemented in several hard drives: if a drop is sensed, the hard drive is quickly switched off to protect against data loss.

Now that you know what they do, let’s consider what characteristics you should be looking for when selecting your accelerometer:

Range

One of the characteristics that stand out the most is the accelerometer’s full-scale range – the upper and lower limits of what the accelerometer can measure. In most cases, a smaller full-scale range means a more sensitive output; so you can get a more precise reading out of an accelerometer with a low full-scale range.

You want to select a sensing range that will best fit your project, if your project will only be subjected to accelerations between +2g and -2g, a ±250g-ranged accelerometer won’t give you much, if any, precision.

We have a good assortment of accelerometers, with maximum ranges stretching from ±1g to ±250g. Most of our accelerometers are set to a hard maximum/minimum range, however some of the fancier accelerometers feature selectable full-scale ranges.

Interface

This is another one of the more important specifications. Accelerometers will have either an analog, pulse-width modulated (PWM), or digital interface.

Accelerometers with an analog output will produce a voltage that is directly proportional to the sensed acceleration. At 0g, the analog output will usually reside at about the middle of the supplied voltage (e.g. 1.65V for a 3.3V sensor). Generally this interface is the easiest to work with, as analog-to-digital converters (ADCs) are implemented in most microcontrollers.

Accelerometers with a PWM interface will produce a square wave with a fixed frequency, but the duty cycle of the pulse will vary with the sensed acceleration. These are pretty rare; we’ve only got one in our catalog.

Digital accelerometers usually feature a serial interface – be it SPI or I²C. Depending on your experience, these may be the most difficult to get integrated with your microcontroller. That said, digital accelerometers are popular because they usually have more features, and are less susceptible to noise than their analog counterparts.

Number of axes measured

This one’s very straightforward: out of the three axes possible (x, y, and z), how many can the accelerometer sense? 2- and 3-axis accelerometers are the most common these days. I’d suggest three-axis accelerometers; they’re really no more expensive than one or two, and extra information can’t hurt.

Power Usage

If your project is battery powered, you might want to consider how much power the accelerometer will consume. The required current consumption will usually be in the 100s of µA range. Some sensors also feature sleep functionality to conserve energy when the accelerometer isn’t needed.

Bonus Features – Many more recently developed accelerometers may have a few nifty features, beyond just producing acceleration data. These newer accelerometers may include features like selectable measurement ranges, sleep control, 0-g detection, and tap sensing.

Device Range Interface Axes Power Requirements Bonus Features

ADXL193

±250g Analog 1 3.5-6V, 1.5-2mA Self test

ADXL335

±3g Analog 3 1.8-3.6V, 350µA Self test

ADXL345

±2, 4, 8, 16g SPI and I2C 3 2.0-3.6V, 40-145µA Selectable measuring range, free-fall detection, tap/double-tap detection, bandwidth selectable, programmable power modes

BMA180

±1, 1.5, 2, 3, 4, 8, 16g SPI and I2C 3 2-3.6V, 650-975µA Selectable ranges, programmable digital filters, interrupt features, programmable power modes, free-fall detection, tap/double-tap detection, slope detection

LIS331

±6, 12, 24g SPI and I2C 3 2.16-3.6V, 250µA Self test, ultra low-power operational modes

MMA7361

±1.5, 6g Analog 3 2.2-3.6V, 400-600µA sleep mode, signal conditioning, a 1-pole low pass filter, temperature compensation, self test, 0g-detect

MMA8452Q

±2, 4, 8g I2C 3 1.95-3.6V, 165µA Embedded interrupt functions, low power mode, High Pass Filter Data available real-time, Orientation (Portrait/Landscape) detection with set hysteresis

Gyros

Gyroscopes measure angular velocity, how fast something is spinning about an axis. If you’re trying to monitor the orientation of an object in motion, an accelerometer may not give you enough information to know exactly how it’s oriented. Unlike accelerometers gyros are not affected by gravity, so they make a great complement to each other. You’ll usually see angular velocity represented in units of rotations per minute (RPM), or degrees per second (°/s). The three axes of rotation are either referenced as x, y, and z, or roll, pitch, and yaw.

In the past, gyros have been used for space navigation, missile control, under-water guidance, and flight guidance. Now they are starting to be used alongside accelerometers for applications like motion-capture and vehicle navigation.

A lot of what was considered when selecting an accelerometer still applies to selecting the perfect gyro:

Range

Make sure the maximum angular velocity you’re expecting to measure doesn’t exceed the maximum range of the gyro. But also, in order to get the best possible sensitivity, make sure your gyro’s range isn’t much greater than what you’re expecting.

Interface

There’s actually not much diversity in this section, 95% of the gyros we have feature an analog output. There are a few that have a digital interface – either SPI or I2C.

Number of axes measured

Compared to accelerometers, gyros are a little behind the curve. Only recently have inexpensive, 3-axis gyros begun to appear on the market. Most of our gyros are either 1- or 2-axis. When selecting those, you need to pay attention to which of the three axes the gyro will measure; for example, some two axis gyros will measure pitch and roll, while others measure pitch and yaw.

Power Usage

If your project is battery powered, you might want to consider how much power the gyro will consume. The required current consumption will usually be in the 100s of µA range. Some sensors also feature sleep functionality to conserve energy when the gyro isn’t needed.

Bonus Features – Not much in this section is going to blow you away. Many gyros feature a temperature output, which is very useful when compensating for drift.

Devices

IDG500 (Retired)

±110°/s and/or ±500°/s Analog 2 (x/y) 2.7-3.3V, 7mA Temperature sensor, auto-zero, 1x and 4.5x outputs

IXZ500 (Retired)

±110°/s and/or ±500°/s Analog 2 (x/z) 2.7-3.3V, 7mA Temperature sensor, auto-zero, 1x and 4.5x outputs

LPY503AL

±30°/s (4x output) or ±120°/s Analog 2 (x/z) 2.7-3.6V, 6.8mA Self-test, power-down, 1x and 4x outputs

MLX90609-150 (Retired)

±150°/s Analog and SPI 1(z) 4.75-5.25V, 16-20mA Analog temperature output, self test

L3G4200D

±250°/s, ±500°/s or ±2000°/s SPI and I2C 3 2.4-3.6V, 6.1mA power-down and sleep mode, temperature sensor, High shock survivability

ITG-3200

±2000°/s I2C 3 2.1-3.6V, 6.5mA Programmable low pass filter, optional external clock input, interrupt outputs, temperature sensor

IMUs

Gyroscopes and accelerometers are great, but alone they don’t give you quite enough information to be able to comfortably calculate things like orientation, position, and velocity. To measure those and other variables many people combine the two sensors, to create an inertial measurement unit (IMU) which provides two to six degrees of freedom (DOF). IMUs are widely used in devices that require knowledge of their exact position, for example robotic arms, guided missiles, and tools used in the study of body motion.

SparkFun’s IMUs can really be broken down into two classes: simple IMU combo boards, which just mount an accelerometer and gyro onto a single PCB, and more complex units that interface a microcontroller with the sensors to produce a serial output. If you’ve glanced over the previous sections, you should know what kind of specifications to be looking for in IMUs: the number of axes (both for the accelerometer and gyro), the measuring range of the sensors, and the interface.

Devices

9 Degrees of Freedom – Razor IMU

Accel:±16g Gyro:±300°/s Serial Accel: 3 Gyro: 3 3.3-16VDC Arduino-compatible, optional AHRS code, 3-axis magnetometer

9 Degrees of Freedom – Sensor Stick

Accel:±2, 4, 8, 16g Gyro:±2000°/s I2C Accel: 3 Gyro: 3 3.3-16VDC 3-axis magnetometer

Atomic IMU 6 Degrees of Freedom – XBee Ready (Retired)

Accel:±1.5, 6g Gyro:±300°/s Serial Accel: 3 Gyro: 3×1 3.4V to 10V, 24mA(wired) 75mA(xbee) XBee Header on-board

IMU 6DOF v4 Sensor Board

Accel:±1.5, 2, 4, 6g Gyro:±500°/s Individual2
Accel: 3 Gyro: 2×2

3.3-16VDC Honeywell HMC1052L and HMC1051Z magnetic sensors

IMU Digital Combo Board – 6 Degrees of Freedom ITG3200/ADXL345

Accel:±2, 4, 8, 16g Gyro:±2000°/s I2C Accel: 3 Gyro: 3 3.3VDC Two mounting holes, Tiny!

IMU Fusion Board – ADXL345 & IMU3000

Accel:±2, 4, 8, 16g Gyro:±250-2000°/s I2C Accel: 3 Gyro: 3 3.3-16VDC Hardware support for MotionFusion data

ArduIMU+ V3

Accel:±2, 4, 8, 16g Gyro:±250, 500, 1000, 2000°/s Serial, I2C, etc. Accel: 3 Gyro: 3 6-12VDC Arduino compatible and open source, user self test, GPS port with FTDI autoswitch

MPU 6050

Accel:±2, 4, 8, 16g Gyro:±250, 500, 1000, 2000°/s I2C Accel: 3 Gyro: 3 2.3 – 3.4VDC Onboard Digital Motion Processor™ (DMP™), auxiliary I2C bus to access external magnetometers and other sensors, Digital-output temperature sensor

Glossary of Terms

Range: The range of values that a device is capable of measuring is an important factor in deciding which is appropriate for your project. Obviously a 24g accelerometer won’t do you much good for tracking body motion unless you plan on being hurled into space by the world’s largest slingshot. Likewise, if your accelerometer tops out at 1g then you won’t get much useful data on, say, a rocket launch. The range of an accelerometer is measured in g-force, or multiples of the acceleration due to gravity on Earth. The range of a gyro, which measures rotational acceleration, is given in degrees of rotation per second.

Interface: The method by which you send and receive data between a controller and a device is called the interface. There are several standards available and each has its advantages and disadvantages. Analog signals are easy to read and can be measured by most microcontrollers with very little code. Serial communication in this case refers to UART and requires a little more processing overhead but is capable of carrying more information than analog signals, Serial or I2C are common in situations where multiple axes need to be read out to a controller. I2C is a two-wire serial interface that allows several devices to share a bus and communicate with each other, it’s also a very common capability among microcontrollers.

Axes: This refers to the number of directions in which acceleration can be measured. Accelerometers measure acceleration along the specified axes whereas gyros measure acceleration about the axes.

Power Requirements: This represents the amount of power that the device will typically consume during operation, your system should be capable of sourcing at least this much current and then some to avoid erratic behavior or brown-out conditions. Many devices also have low-power or power-saving modes in which they’ll consume considerably less power. We’ve also listed the rated voltage of the device for your convenience.

Bonus Features: Every device manufacturer has their own ideas about what ‘bells and whistles’ should be added to a gyro or an accelerometer. This column is where we list those extra features that set each device apart from the rest.