SparkFun will be closed Nov 26th and 27th for the Thanksgiving holiday. Orders placed after 2:00pm MT on the 25th will ship out Monday the 30th.
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.
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:
|Device||Range||Interface||Axes||Power Requirements||Bonus Features|
|±250g||Analog||1||3.5-6V, 1.5-2mA||Self test|
|±3g||Analog||3||1.8-3.6V, 350µA||Self test|
|±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|
|±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|
|±6, 12, 24g||SPI and I2C||3||2.16-3.6V, 250µA||Self test, ultra low-power operational modes|
|±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|
|±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|
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:
|Device||Range||Interface||Axes||Power Requirements||Bonus Features|
|±110°/s and/or ±500°/s||Analog||2 (x/y)||2.7-3.3V, 7mA||Temperature sensor, auto-zero, 1x and 4.5x outputs|
|±110°/s and/or ±500°/s||Analog||2 (x/z)||2.7-3.3V, 7mA||Temperature sensor, auto-zero, 1x and 4.5x outputs|
|±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|
|±150°/s||Analog and SPI||1(z)||4.75-5.25V, 16-20mA||Analog temperature output, self test|
|±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|
|±2000°/s||I2C||3||2.1-3.6V, 6.5mA||Programmable low pass filter, optional external clock input, interrupt outputs, temperature sensor|
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.
|Device||Range||Interface||Axes||Power Requirements1||Bonus Features|
|Accel:±16g Gyro:±300°/s||Serial||Accel: 3 Gyro: 3||3.3-16VDC||Arduino-compatible, optional AHRS code, 3-axis magnetometer|
|Accel:±2, 4, 8, 16g Gyro:±2000°/s||I2C||Accel: 3 Gyro: 3||3.3-16VDC||3-axis magnetometer|
|Accel:±1.5, 6g Gyro:±300°/s||Serial||Accel: 3 Gyro: 3x1||3.4V to 10V, 24mA(wired) 75mA(xbee)||XBee Header on-board|
|Accel:±1.5, 2, 4, 6g Gyro:±500°/s||Individual2||
Accel: 3 Gyro: 2x2
|3.3-16VDC||Honeywell HMC1052L and HMC1051Z magnetic sensors|
|Accel:±2, 4, 8, 16g Gyro:±2000°/s||I2C||Accel: 3 Gyro: 3||3.3VDC||Two mounting holes, Tiny!|
|Accel:±2, 4, 8, 16g Gyro:±250-2000°/s||I2C||Accel: 3 Gyro: 3||3.3-16VDC||Hardware support for MotionFusion data|
|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, 3-axis magnetometer, GPS port with FTDI autoswitch|
|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|
1 Current consumption for IMUs can be tricky to nail down because of the variety of individual devices and operating modes that are available.
2 The IMU 6DOF Sensor Board was intended as a sub-assembly of the 6DOF v4. The sensor outputs aren’t combined into a single bus but are broken out individually.
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.