阳光宅男吉他弹唱视频:Accelerometer and Gyro Buying Guide

来源:百度文库 编辑:九乡新闻网 时间:2024/05/02 20:13:44

Accelerometer and Gyro Buying Guide
by Jimb0 | July 12, 2010 | 16 comments Skill Level: Beginner



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 sensor's 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:

  • Full-Scale 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.

  • Bandwidth – An accelerometer's bandwidth represents how often the sensor can be read reliably. Bandwidth requirements will really depend on the application, but usually 50-100Hz will suffice.

  • 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.


    Gyroscopes

    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:

    • Full-scale 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.

    • 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.