AltIMU-10 Gyro, Accelerometer, Compass, and Altimeter (L3GD20, LSM303DLHC, and LPS331AP Carrier)

Pololu item #: 1269 83 in stock

Price break Unit price (US$)
1 17.95 49.95
10 16.16 44.96

The Pololu AltIMU-10 is an inertial measurement unit (IMU) and altimeter that features the same L3GD20 gyro and LSM303DLHC accelerometer and magnetometer as the MinIMU-9 v2, and adds an LPS331AP digital barometer. An I²C interface accesses ten independent pressure, rotation, acceleration, and magnetic measurements that can be used to calculate the sensor’s altitude and absolute orientation. The board operates from 2.5 to 5.5 V and has a 0.1″ pin spacing.

Clearance: This board is being replaced by the newer AltIMU-10 v4.

 Description Specs (8) Pictures (7) Resources (18) FAQs (1) On the blog (3) 

Clearance: This board is being replaced by the newer AltIMU-10 v4, which uses newer sensors and offers several improvements over this product, including a wider maximum magnetic sensing range and better accuracy and stability from the gyroscope and barometer. The new v4 version is pin-compatible with this original AltIMU-10, but changes in I²C addresses and configuration registers might require some changes to software written for older versions (this should not be an issue if you are using our Arduino libraries). This product will be discontinued when stock runs out and is not recommended for new designs where continued part availability is important.


The Pololu AltIMU-10 is a compact (1.0″ × 0.5″) board that combines ST’s LPS331AP digital barometer, L3GD20 3-axis gyroscope, and LSM303DLHC 3-axis accelerometer and 3-axis magnetometer to form an inertial measurement unit (IMU) and altimeter; we therefore recommend careful reading of the LPS331AP datasheet (453k pdf), L3GD20 datasheet (2MB pdf), and LSM303DLHC datasheet (629k 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 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 L3GD20, LSM303, and LPS331, as shown in the product picture.

The AltIMU-10 is pin-compatible with the MinIMU-9 v2 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 v2. Any code written for the MinIMU-9 v2 should also work with the AltIMU-10.

Side-by-side comparison of the MinIMU-9 v2 with the AltIMU-10.

The LPS331AP, L3GD20, and LSM303DLHC 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 I²C/TWI interface, allowing all four sensors to be addressed individually via a single clock line and a single data line.


Visualization of AHRS orientation calculated from MinIMU-9 readings.



  • Weight without header pins: 1.0 g (0.035 oz)
  • Operating voltage: 2.5 V to 5.5 V
  • Supply current: 10 mA
  • Output format (I²C):
    • Gyro: one 16-bit reading per axis
  • Sensitivity range:

Included Components


Using the AltIMU-10



Pololu AltIMU-10 gyro, accelerometer, compass, and altimeter pinout.
Two Pololu AltIMU-10 modules in a breadboard.


PIN Description

The data ready and interrupt pins of the LPS331AP, L3GD20, and LSM303DLHC are not accessible on the AltIMU-10; if you need these outputs, consider using our LPS331AP carrier, L3GD20 carrier, and LSM303DLHC carrier boards.

Schematic Diagram

The above schematic shows the additional components the carrier board incorporates to make the LPS331AP, L3GD20, and LSM303DLHC 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 I²C communication at the same logic voltage level as VIN. This schematic is also available as a downloadable pdf: AltIMU-10 schematic (193k pdf).

I²C Communication

The LPS331AP’s barometer, the L3GD20’s gyro, and the LSM303DLHC’s accelerometer and magnetometer can be queried and configured through the I²C bus. Each of the four sensors acts as a slave device on the same I²C bus (i.e. their clock and data lines are tied together to ease communication). Additionally, level shifters on the I²C clock (SCL) and data lines (SDA) enable I²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 LPS331AP datasheet (453k pdf), the L3GD20 datasheet (2MB pdf), and the LSM303DLHC datasheet (629k pdf). More detailed information about I²C in general can be found in NXP’s I²C-bus specification (371k pdf).

The barometer, gyro, accelerometer, and magnetometer each have separate slave addresses on the I²C bus. The board pulls the SA0 pins on the gyro and barometer high. The following table shows the slave addresses of the four sensors:

Sensor Slave Address
Gyro (L3GD20) 1101011b
Accelerometer (LSM303DLHC) 0011001b
Magnetometer (LSM303DLHC) 0011110b
Barometer (LPS331AP) 1011101b

In our tests of the AltIMU-10, we were able to communicate with all three chips at clock frequencies up to 400 kHz; higher frequencies might work but were not tested. The chips themselves and carrier board do not meet some of the requirements to make the devices compliant with I²C fast mode. They are missing 50 ns spike suppression on the clock and data lines, and additional pull-ups on the clock and data lines might also be necessary to achieve compliant signal timing characteristics.

Sample Code

We have written a basic LPS331 Arduino library, L3GD20 Arduino library, and LSM303 Arduino library that make it easy to interface the AltIMU-10 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 into an attitude and heading reference system, or AHRS, with this Arduino program. It uses the data from the AltIMU-10 to calculate estimated roll, pitch, and yaw angles, and you can visualize 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, but picking out the important details can take some time. Here are some pointers for communicating with and configuring the LPS331AP, L3GD20, and LSM303DLHC that we hope will get you up and running a little bit faster:

  • The magnetometer will not update its data until all 6 data bytes have been read during a single I²C transfer. All the bytes can be read in the same transfer using the magnetometer’s automatic sub-address updating feature (this feature is enabled by default).
  • The pressure sensor has a 24-bit pressure reading. The gyro, accelerometer, and magnetometer all output readings in a 16-bit format (obtained by combining the values in two 8-bit registers for each axis), but only the gyro readings contain 16 bits of precision. The accelerometer and magnetometer readings contain a maximum of 12 bits of precision; for the accelerometer, at least the lowest 4 bits of the output values are always 0, and for the magnetometer, the highest 4 bits of the output values are always 0.
  • The LSM303DLHC combines an accelerometer and a magnetometer made by separate manufacturers into one IC, so there are fairly significant differences in their features, functionality, and interfaces. The interfaces of the LPS331AP and L3GD20 are similar to that of the accelerometer in the LSM303DLHC.

Product Comparison


Product Name Sensors Estimation Other
Pololu MinIMU-9 v2 Yes Yes Yes
Pololu AltIMU-10 Yes Yes Yes Yes

People often buy this product together with:
