LSM303DLH 3D Compass and Accelerometer Carrier with Voltage Regulators
The LSM303DLH combines a digital 3-axis accelerometer and 3-axis magnetometer into a single package that is ideal for making a tilt-compensated compass. The six independent readings, whose sensitivities can be set in the ranges of ±2 to ±8 g and ±1.3 to ±8.1 gauss, are available through an I²C interface. This LSM303 carrier board includes voltage regulators and a level-shifting circuit that allows operation from 2.6 to 5.5 V, and the 0.1" pin spacing makes it easy to use with standard solderless breadboards and 0.1" perfboards.
Description | Specs (7) | Pictures (5) | Resources (7) | FAQs (1) | On the blog (1) |
---|
File downloads
-
LSM303DLH datasheet (599k pdf)
Datasheet for the ST LSM303DLH 3-axis accelerometer and 3-axis magnetometer.
-
Using LSM303DLH for a tilt-compensated electronic compass (1MB pdf)
An application note by ST on how to use the LSM303DLH as a tilt-compensated compass. This application note mostly applies to the very similar LSM303DLM as well (when replacing the DLH with the DLM, the main difference to note is that the magnetometer Y and Z registers have been swapped).
-
LSM303DLH Orangutan example project (5k zip)
This sample program shows how to use an LSM303DLH 3D compass and accelerometer carrier with an Orangutan robot controller to build a tilt-compensated digital compass. The AVR Studio project is set up for an ATmega328P microcontroller, but it will work on other Orangutans with simple changes to the project configuration.
-
UM10204 I²C-bus specification and user manual (1MB pdf)
The official specification for the I²C-bus, which is maintained by NXP.
Recommended links
-
LSM303 Arduino library
This is a library for the Arduino that interfaces with our 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.
-
mbed library for the LSM303DLH
This is a library for the ARM mbed development board that interfaces with the LSM303DLH 3D compass and accelerometer carrier and provides the tilt-compensated magnetic heading. It can be easily modified to work with the newer and very similar LSM303DLHC 3D compass and accelerometer carrier by swapping the magnetometer Y and Z registers. This library was not written and is not maintained by Pololu.
-
Quick and Dirty Compass Calibration in 3d
A blog post by Michael Shimniok about calibrating the magnetometer in the LSM303DLH and visualizing magnetic distortions. This information can generally be applied to other magnetometers as well.