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

Pololu item #: 1269

This product has been discontinued.

This has been replaced by a newer version (v4).

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.

 Description Specs (8) Pictures (7) Resources (18) FAQs (1) On the blog (3) 
Why are some of my magnetometer readings -4096?

When the magnetometer reads -4096, it means the sensor reading is overflowing at the current gain setting.

From section 9.2.4 of the LSM303DLH datasheet (599k pdf):

In the event the ADC reading overflows or underflows for the given channel, or if there is a math overflow during the bias measurement, this data register will contain the value -4096 in 2’s complement form. This register value clears after the next valid measurement is made.

Although this is not mentioned in the LSM303DLM or LSM303DLHC datasheets, it seems to apply for those sensors as well.

To avoid overflowing, try reducing the gain by setting the three gain-setting bits in CRB_REG_M. If you are using our Arduino library, insert this code into the setup method after compass.enableDefault(); to get the lowest gain (largest sensor input field range) possible:

  // see the description of the CRB_REG_M register in the datasheet for other values
  compass.writeMagReg(LSM303_CRB_REG_M, 0b11100000);

Alternatively, you can use the setMagGain() function to do the same thing:

  // see LSM303.h for other values
  compass.setMagGain(LSM303::magGain_81);

Related Products

MinIMU-9 v2 Gyro, Accelerometer, and Compass (L3GD20 and LSM303DLHC Carrier)
LSM303DLHC 3D Compass and Accelerometer Carrier with Voltage Regulator
L3GD20 3-Axis Gyro Carrier with Voltage Regulator
LPS331AP Pressure/Altitude Sensor Carrier with Voltage Regulator
MinIMU-9 v3 Gyro, Accelerometer, and Compass (L3GD20H and LSM303D Carrier)
UM6 r2 Ultra-Miniature Orientation Sensor
UM7-LT Orientation Sensor
L3GD20H 3-Axis Gyro Carrier with Voltage Regulator
LSM303D 3D Compass and Accelerometer Carrier with Voltage Regulator
LOCOSYS LS20031 66-Channel GPS Receiver Module (MT3339 Chipset)
Adafruit Data Logging Shield for Arduino

Related Categories

Accelerometers, Gyros, & Compasses
Sensors
Development Boards (Programmable Controllers)
Premium Jumper Wires
Wires with Pre-Crimped Terminals
Crimp Connector Housings
Solderless Breadboards
Log In
Pololu Robotics & Electronics
Shopping cart
(702) 262-6648
Same-day shipping, worldwide
Menu
Shop Blog Forum Support
My account Comments or questions? About Pololu Contact Ordering information Distributors