LSM9DS0 Hookup Guide

Pages
Contributors: jimblom
Favorited Favorite 6

About the LSM9DS0

The LSM9DS0 is one of only a handful of IC's that can measure three key properties of movement -- angular velocity, acceleration, and heading -- in a single IC.

The gyroscope can measure angular velocity -- that is "how fast, and along which axis, am I rotating?" Angular velocities are measured in degrees per second -- usually abbreviated to DPS or °/s. The LSM9DS0 can measure up to ± 2000 DPS, though that scale can also be set to either 245 or 500 DPS to get a finer resolution.

An accelerometer measures acceleration, which indicates how fast velocity is changing -- "how fast am I speeding up or slowing down?" Acceleration is usually either measured in m/s2 (meters per second per second) or g's (gravities [about 9.8 m/s2]). If an object is sitting motionless it feels about 1 g of acceleration towards the ground (assuming that ground is on earth, and the object is near sea-level). The LSM9DS0 measures its acceleration in g's, and its scale can be set to either ± 2, 4, 6, 8, or 16_g_.

Finally, there's the magnetometer, which measures the power and direction of magnetic fields. Though they're not easily visible, magnetic fields exist all around us -- whether you're holding a tiny ferromagnet or feeling an attraction to Earth's magnetic field. The LSM9DS0 measures magnetic fields in units of gauss (Gs), and can set its measurement scale to either ± 2, 4, 8, or 12 Gs.

By measuring these three properties, you can gain a great deal of knowledge about an object's movement. 9DOF's have tons and tons of applications. Measuring the force and direction of Earth's magnetic field with a magnetometer, you can approximate your heading. An accelerometer in your phone can measure the direction of the force of gravity, and estimate orientation (portrait, landscape, flat, etc.). Quadcopters with built-in gyroscopes can look out for sudden rolls or pitches, and correct their momentum before things get out of hand.

9 degrees of freedom

The LSM9DS0 measures each of these movement properties in three dimensions. That means it produces nine pieces of data: acceleration in x/y/z, angular rotation in x/y/z, and magnetic force in x/y/z. On the breakout board, the z-axis runs normal to the PCB, the y-axis runs parallel to the short edge, and the x-axis is parallel to the long edge. Each axis has a positive and negative direction as well, noted by the direction of the arrow on the label.

The LSM9DS0 is, in a sense, two IC's smashed into one package -- like if you combined an L3G4200D gyro with an LSM303DLMTR accel/mag. One half of the device takes care of all-things gyroscope, and the other half manages both the accelerometer and magnetometer. In fact, a few of the control pins are dedicated to a single sensor -- there are two chip select pins (CSG for the gyro and CSXM for the accel/mag) and two serial data out pins (SDOG and SDOXM).

Choose Your Own Adventure: SPI or I2C

In addition to being able to measure a wide variety of movement vectors, the LSM9DS0 is also multi-featured on the hardware end. It supports both SPI and I2C, so you should have no difficulty finding a microcontroller that can talk to it.

SPI is generally the easier of the two to implement, but it also requires more wires -- four versus I2C's two.

Because the LSM9DS0 supports both methods of communication, some pins have to pull double-duty. The Serial Data Out pin for example, does just that for SPI mode, but if you're using the device over I2C it becomes an address selector. Chip select activates SPI mode when it's low, but if it's pulled high the device assumes I2C communication. In the section below we discuss each of the LSM9DS0's pins, pay close attention to those pins that support both interfaces.


For much more detailed information about the IC, we encourage you to check out the datasheet!