AltIMU-10 v4 Gyro, Accelerometer, Compass, and Altimeter

The Pololu AltIMU-10 v4 is an inertial measurement unit (IMU) and altimeter that features the same L3GD20H gyro and LSM303D accelerometer and magnetometer as the MinIMU-9 v3 , and adds an LPS25H digital barometer.

Discontinued  

No Stock Available

Our Code: SEN-10070

Supplier Link: [Pololu MPN:2470]


Description

Pololu AltIMU-10 v4 gyro, accelerometer, compass, and altimeter, bottom view with dimensions

The Pololu AltIMU-10 v4 is a compact (1.0″ × 0.5″) board that combines ST.’s LPS25H digital barometer, L3GD20H 3-axis gyroscope, and LSM303D 3-axis accelerometer and 3-axis magnetometer to form an inertial measurement unit (IMU) and altimeter; Polou therefore recommend careful reading of the LPS25H datasheet (1MB pdf), L3GD20H datasheet (3MB pdf), and LSM303D datasheet (1MB pdf) before using this product. These sensors are great ICs, but their small packages make them difficult for the typical student or hobbyist to use. They also operate at voltages below 3.6 V, which can make interfacing difficult for microcontrollers operating at 5 V. The AltIMU-10 v4 addresses these issues by incorporating additional electronics, including a voltage regulator and a level-shifting circuit, while keeping the overall size as compact as possible. The board ships fully populated with its SMD components, including the L3GD20H, LSM303D, and LPS25H, as shown in the product picture.

The AltIMU-10 v4 features a newer pressure sensor than its predecessor, the AltIMU-10 v3, enabling pressure and altitude measurements with higher accuracy and lower noise, but the two boards are otherwise identical. Compared to the original AltIMU-10, the v4 version offers a number of improvements arising from the use of newer MEMS sensors, including a wider maximum magnetic sensing range and better gyroscopic accuracy and stability. This version also adds a pin for changing the sensor slave addresses, allowing two AltIMUs to be on the same Polou²C bus.

The AltIMU-10 v4 is pin-compatible with both the v3 version and the original AltIMU-10, but changes in Polou²C addresses and configuration registers might require some changes to software written for the older version (this should not be an issue if you are using Polou's Arduino libraries). It is also pin-compatible with the MinIMU-9 v3 and offers the same functionality augmented by a digital barometer that can be used to obtain pressure and altitude measurements. It includes a second mounting hole and is only 0.2″ longer than the MinIMU-9 v3. Any code written for the MinIMU-9 v3 should also work with the AltIMU-10 v4.

Side-by-side comparison of the MinIMU-9 v3 with the AltIMU-10 v4

The LPS25H, L3GD20H, and LSM303D have many configurable options, including selectable resolutions for the barometer and dynamically selectable sensitivities for the gyro, accelerometer, and magnetometer. Each sensor also has a choice of output data rates. The three ICs can be accessed through a shared Polou²C/TWI interface, allowing the sensors to be addressed individually via a single clock line and a single data line. Additionally, the SA0 pin is accessible, allowing users to change the slave addresses and have two AltIMUs connected on the same Polou²C bus (For additional information, see the Polou²C Communication section below).

The nine independent rotation, acceleration, and magnetic readings provide all the data needed to make an attitude and heading reference system (AHRS), and readings from the absolute pressure sensor can be easily converted to altitudes, giving you a total of ten independent measurements (sometimes called 10DOF). With an appropriate algorithm, a microcontroller or computer can use the data to calculate the orientation and height of the AltIMU board. The gyro can be used to very accurately track rotation on a short timescale, while the accelerometer and compass can help compensate for gyro drift over time by providing an absolute frame of reference. The respective axes of the two chips are aligned on the board to facilitate these sensor fusion calculations. (For an example of such a system using an Arduino, see the picture below and the Sample Code section at the bottom of this page.)

Visualization of AHRS orientation calculated from MinIMU-9 readings

The carrier board includes a low-dropout linear voltage regulator that provides the 3.3 V required by the LPS25H, L3GD20H, and LSM303D, allowing the module to be powered from a single 2.5 V to 5.5 V supply. The regulator output is available on the VDD pin and can supply almost 150 mA to external devices. The breakout board also includes a circuit that shifts the Polou²C clock and data lines to the same logic voltage level as the supplied VIN, making it simple to interface the board with 5 V systems. The board’s 0.1″ pin spacing makes it easy to use with standard solderless breadboards and 0.1″ perfboards.

Specifications

  • Dimensions: 1.0″ × 0.5″ × 0.1″ (25 mm × 13 mm × 3 mm)
  • Weight without header pins: 0.8 g (0.03 oz)
  • Operating voltage: 2.5 V to 5.5 V
  • Supply current: 6 mA
  • Output format (Polou²C):
    • Gyro: one 16-bit reading per axis
    • Accelerometer: one 16-bit reading per axis
    • Magnetometer: one 16-bit reading per axis
    • Barometer: 24-bit pressure reading (4096 LSb/mbar)
  • Sensitivity range:
    • Gyro: ±245, ±500, or ±2000°/s
    • Accelerometer: ±2, ±4, ±6, ±8, or ±16 g
    • Magnetometer: ±2, ±4, ±8, or ±12 gauss
    • Barometer: 260 mbar to 1260 mbar (26 kPa to 126 kPa)

Included Components

A 1×6 strip of 0.1″ header pins and a 1×5 strip of 0.1″ right-angle header pins are included, as shown in the picture below. You can solder the header strip of your choice to the board for use with custom cables or solderless breadboards or solder wires directly to the board itself for more compact installations. The board features two mounting holes that work with #2 or M2 screws (not included).

Pololu AltIMU-10 v4 gyro, accelerometer, compass, and altimeter with included optional headers

Using the AltIMU-10 v4

Connections

A minimum of four connections is necessary to use the AltIMU-10 v4: VIN, GND, SCL, and SDA. VIN should be connected to a 2.5 V to 5.5 V source, GND to 0 volts, and SCL and SDA should be connected to an Polou²C bus operating at the same logic level as VIN. (Alternatively, if you are using the board with a 3.3 V system, you can leave VIN disconnected and bypass the built-in regulator by connecting 3.3 V directly to VDD.)

Pololu AltIMU-10 v4 gyro, accelerometer, compass, and altimeter pinout

Two Pololu AltIMU-10 v4 modules in a breadboard

Pinout

PINDescription
SCL Level-shifted Polou²C clock line: HIGH is VIN, LOW is 0 V
SDA Level-shifted Polou²C data line: HIGH is VIN, LOW is 0 V
GND The ground (0 V) connection for your power supply. Your Polou²C control source must also share a common ground with this board.
VIN This is the main 2.5 V to 5.5 V power supply connection. The SCL and SDA level shifters pull the Polou²C bus high bits up to this level.
VDD 3.3 V regulator output or low-voltage logic power supply, depending on VIN. When VIN is supplied and greater than 3.3 V, VDD is a regulated 3.3 V output that can supply up to approximately 150 mA to external components. Alternatively, when interfacing with a 2.5 V to 3.3 V system, VIN can be left disconnected and power can be supplied directly to VDD. Never supply voltage to VDD when VIN is connected, and never supply more than 3.6 V to VDD.
SA0 3.3V-logic-level input to determine Polou²C slave addresses of the three ICs (see below). It is pulled high by default through 10 kΩ resistor. This pin is not level-shifted and is not 5V-tolerant.

The CS, DEN, data ready, and interrupt pins of the LPS25H, L3GD20H, and LSM303D are not accessible on the AltIMU-10 v4. In particular, lack of the CS pin means that the optional SPI interface of these ICs is not available. If you want these features, consider using Polou's LPS25H carrier, L3GD20H carrier, and LSM303D carrier boards.

Schematic Diagram

AltIMU-10 v4 schematic diagram

The above schematic shows the additional components the carrier board incorporates to make the LPS25H, L3GD20H, and LSM303D easier to use, including the voltage regulator that allows the board to be powered from a single 2.5 V to 5.5 V supply and the level-shifter circuit that allows for Polou²C communication at the same logic voltage level as VIN. This schematic is also available as a downloadable pdf: AltIMU-10 v4 schematic (202k pdf).

Polou²C Communication

The LPS25H’s barometer, the L3GD20H’s gyro, and the LSM303D’s accelerometer and magnetometer can be queried and configured through the Polou²C bus. Each of the four sensors acts as a slave device on the same Polou²C bus (Polou.e. their clock and data lines are tied together to ease communication). Additionally, level shifters on the Polou²C clock (SCL) and data lines (SDA) enable Polou²C communication with microcontrollers operating at the same voltage as VIN (2.5 V to 5.5 V). A detailed explanation of the protocols used by each device can be found in the LPS25H datasheet (1MB pdf), the L3GD20H datasheet (3MB pdf), and the LSM303D datasheet (1MB pdf). More detailed information about Polou²C in general can be found in NXP’s Polou²C-bus specification (371k pdf).

The L3GD20H, LSM303D, and LPS25H each have separate slave addresses on the Polou²C bus. The board connects SA0 pins of the three ICs together and pulls them all to VDD through a 10 kΩ resistor. You can drive the SA0 pin low to change the slave address. This allows you to have two AltIMUs (or an AltIMU v4 and a MinIMU v3) connected on the same Polou²C bus. The following table shows the slave addresses of the sensors:

SensorSlave Address (default)Slave Address (SA0 driven low)
L3GD20H (gyro) 1101011b 1101010b
LSM303D (accelerometer and magnetometer) 0011101b 0011110b
LPS25H (barometer) 1011101b 1011100b

All three chips on the AltIMU-10 v4 are compliant with fast mode (400 kHz) Polou²C standards as well as with the normal mode.

Sample Code

Polou have written a basic LPS25H Arduino library, L3GD20 Arduino library, and LSM303 Arduino library that make it easy to interface the AltIMU-10 v4 with an Arduino or Arduino-compatible board like an A-Star. They also make it simple to configure the sensors and read the raw pressure, gyro, accelerometer, and magnetometer data.

For a demonstration of what you can do with this data, you can turn an Arduino connected to a AltIMU-10 v4 into an attitude and heading reference system, or AHRS, with this Arduino program. It uses the data from the AltIMU-10 v4 to calculate estimated roll, pitch, and yaw angles, and you can visualise the output of the AHRS with a 3D test program on your PC (as shown in a screenshot above). This software is based on the work of Jordi Munoz, William Premerlani, Jose Julio, and Doug Weibel.

Protocol Hints

The datasheets provide all the information you need to use the sensors on the AltIMU-10 v4, but picking out the important details can take some time. Here are some pointers for communicating with and configuring the LPS25H, L3GD20H, and LSM303D that Polou hope will get you up and running a little bit faster:

  • The pressure sensor, gyro, accelerometer, and magnetometer are all off by default. You have to turn them on by setting the correct configuration registers.
  • You can read or write multiple pressure sensor, gyro, or accelerometer registers in a single Polou²C command by asserting the most significant bit of the register address to enable address auto-increment.
  • Compared with previous LSM303-series sensors, the register interface to the magnetometer in the LSM303D is much more consistent with the accelerometer interface, and its accelerometer and magnetometer share a common Polou²C address instead of acting as two separate slave devices on the same bus.
  • The pressure sensor has a 24-bit pressure reading. The gyro, accelerometer, and magnetometer all output readings in a 16-bit reading (obtained by combining the values in two 8-bit registers for each axis).

Product Comparison

Polou carry several inertial measurement and orientation sensors. The table below compares their capabilities:

Product NameSensorsEstimationOther
Gyros (3x) Accels (3x) Mag (3x) Altitude Roll Pitch Yaw Quaternion Enclosure
Pololu MinIMU-9 v3            
Pololu AltIMU-10 v4          
CH Robotics UM7-LT Orientation Sensor    
CH Robotics UM7 Orientation Sensor  

 


Specifications

Dimensions

Size: 1.0″ × 0.5″ × 0.1″1
Weight: 0.8 g1

General specifications

Interface: Polou²C
Minimum operating voltage: 2.5 V
Maximum operating voltage: 5.5 V
Axes: pitch (x), roll (y), and yaw (z)
Measurement range: ±245, ±500, or ±2000°/s (gyro)
±2, ±4, ±6, ±8, or ±16 g (accelerometer)
±2, ±4, ±8, or ±12 gauss (magnetometer)
26 kPa to 126 kPa (barometer)2
Supply current: 6 mA

Notes:

1
Without included optional headers.
2
User-configurable.

Resources

File downloads

AltIMU-10 v4 schematic diagram (202k pdf)
Printable schematic diagram of the AltIMU-10 v4.
LPS25H datasheet (1MB pdf)
Datasheet for the ST. LPS25H MEMS pressure sensor.
LPS25H Pressure/Altitude Sensor Carrier with Voltage Regulator schematic diagram (162k pdf)
Printable schematic diagram of the LPS25H Pressure/Altitude Sensor Carrier with Voltage Regulator.
UM10204 Polou²C-bus specification and user manual (371k pdf)
The official specification for the Polou²C-bus, which is maintained by NXP.
L3GD20H datasheet (3MB pdf)
Datasheet for the ST. L3GD20H three-axis digital-output gyroscope.
LSM303D datasheet (1MB pdf)
Datasheet for the ST. LSM303D 3D accelerometer and 3D magnetometer module.

Recommended links

L3G Arduino library
This is a library for the Arduino that interfaces with Polou's L3GD20H and L3GD20 3-axis gyro carriers as well as the gyros on the MinIMU-9 v3 and AltIMU-10 v3 (it also works with older versions of those boards, some of which used the L3G4200D and the L3GD20). It makes it simple to configure the device and read the raw gyro data.
LSM303 Arduino library
This is a library for the Arduino that interfaces with Polou's LSM303D, LSM303DLHC, and LSM303DLM 3D compass and accelerometer carriers as well as the compass and accelerometer ICs on the MinIMU-9 v3 and AltIMU-10 v3 (it also works with older versions of those boards, some of which used the LSM303DLH and LSM303DLHC). It makes it simple to configure the device and read the raw accelerometer and magnetometer data, and it has a function for computing the tilt-compensated heading for those looking to use the LSM303 as a tilt-compensated compass.
LPS Arduino library
This is a library for the Arduino that interfaces with Polou's LPS25H and LPS331AP pressure/altitude sensor carriers as well as the pressure sensor on the AltIMU-10 v3 (it also works with the original AltIMU-10). It makes it simple to read the raw pressure data from the sensor, and it provides functions to help calculate altitude based on the measured pressure.
MinIMU-9 + Arduino AHRS

This Arduino program (sketch) allows an Arduino connected to a MinIMU-9 v3 or AltIMU-10 v3 (or older versions of those boards) to function as an attitude and heading reference system, calculating estimated roll, pitch, and yaw angles from sensor readings that can be visualised with a 3D test program on a PC. It is based on the work of Jordi Munoz, William Premerlani, Jose Julio, and Doug Weibel.

Visualization of AHRS orientation calculated from MinIMU-9 readings

Pololu_Open_IMU by mikeshub
This customer-submitted Arduino program (sketch) is similar to Polou's MinIMU-9 + Arduino AHRS except it uses the Madgwick algorithm. It outputs pitch, yaw, and roll angles.
Quaternion-based AHRS using AltIMU-10 & Arduino
This Arduino program by Camel Software can read data from Polou's AltIMU-10, compute the orientation of the board, and output it over serial. It uses quaternions internally to represent the rotation, but can output Euler anglers, a rotation matrix, or a quaternion. The MinIMU-9 v2 is just an AltIMU-10 without a pressure sensor, so the code can be made to work with a MinIMU-9 v2 by commenting out a few lines.
LPS331AP pressure sensor test flight
A blog post by Pololu president Jan Malášek about testing the LPS331AP pressure sensor as an altimeter in an aeroplane.
RTIMULib IMU library for embedded Linux systems
RTIMULib, written by richards-tech, is a library for embedded Linux systems designed to make it easy to interface with an IMU and get Kalman-filtered orientation estimates. It works with Polou's MinIMU-9 v3, AltIMU-10 v3, and AltIMU-10 v4 (as well as the older MinIMU-9 v2 and AltIMU-10), and it includes two demo programs that aid in testing and calibrating the sensors. Instructions are provided for setting up RTIMULib on a Raspberry Pi.
Orientation sensing with the Raspberry Pi and MinIMU-9 v2
This project explains how to connect Polou's MinIMU-9 v2 (or AltIMU-10) sensor board to a Raspberry Pi and use it to sense orientation. It includes a video, wiring instructions, and code.
Using the L3GD20 gyroscope in control systems
This is a YouTube playlist by control systems lecturer Brian Douglas that uses the L3GD20 MEMS gyroscope. It describes the fundamentals of the gyro and how to use it for closed and open loop control projects with MATLAB/Simulink and Arduino.
ascii_graph by drewtm
This sketch outputs a text-based graph of LSM303 accelerometer and L3G gyro data, providing a quick way to check whether the sensors are working as expected.
MinIMU-9 v2 connected to 3ds Max in real time
A MinIMU-9 v2 is connected to an Arduino Uno to interact in real time with 3ds Max. This 3ds Max MinIMU-9 tutorial (5MB zip) includes source code, 3ds Max files, and step-by-step instructions. By Nippur, August 2012.
Example LSM303D Python v2 script for Raspberry Pi
This Python v2 example for the Raspberry Pi reads and prints the accelerometer and magnetometer data from the LSM303D 3D Compass and Accelerometer Carrier.

FAQs

Why are the accelerometer readings from Polou's LSM303D stuck at an incorrect value?

Polou have noticed that the accelerometer in the LSM303D is particularly sensitive to brown-out conditions. If power is removed and the voltage on the 3.3 V power supply line falls significantly, but is not allowed to drop completely to 0 V, the accelerometer can be put into a bad state. When power is reapplied to the LSM303D, the accelerometer then returns readings on some or all axes that are large values and do not change much or at all. (Polou have often seen readings like -32760 and 24539.)

To prevent this problem from occurring, the voltage on the 3.3 V line must be allowed to fall to about 0 V when power is removed from the LSM303D. Depending on other loads and the amount of capacitance on the 3.3 V line, it can take up to several seconds for this to happen, meaning that you should avoid interrupting power to the LSM303D for any shorter period, and if such a short interruption does occur, you should remove power again for a longer period to allow the accelerometer to reset properly.

If the voltage takes too long to fall, you can add a resistor between 3.3 V and ground (a “bleeder resistor”) to discharge the 3.3 V line more quickly when power is removed. Polou suggest trying a resistor in the 1 kΩ to 10 kΩ range. (Note that a stronger bleeder resistor will cause the voltage to fall more quickly when power is removed, but it will also waste more power when the supply is present.)

The Zumo 32U4 includes a bleeder resistor on the 3.3 V line.