The Pololu MinIMU-9 v3 is an inertial measurement unit (IMU) that packs an L3GD20H 3-axis gyro and an LSM303D 3-axis accelerometer and 3-axis magnetometer onto a tiny 0.8″ × 0.5″ board. An I²C interface accesses nine independent rotation, acceleration, and magnetic measurements that can be used to calculate the sensor’s absolute orientation. The MinIMU-9 v3 board includes a voltage regulator and a level-shifting circuit that allows operation from 2.5 to 5.5 V, and the 0.1″ pin spacing makes it easy to use with standard solderless breadboards and 0.1″ perfboards.
The Pololu MinIMU-9 v3 is a compact (0.8″ × 0.5″) board that combines ST’s L3GD20H 3-axis gyroscope and LSM303D 3-axis accelerometer and 3-axis magnetometer to form an inertial measurement unit (IMU); we therefore recommend careful reading of the 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 MinIMU-9 v3 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 and LSM303D, as shown in the product picture.
Compared to the previous MinIMU-9 v2, the v3 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 MinIMUs to be on the same I²C bus. The MinIMU-9 v3 is pin-compatible with the MinIMU-9 v2, 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).
The MinIMU-9 v3 is pin-compatible with the AltIMU-10 v4, which offers the same functionality augmented by a digital barometer that can be used to obtain pressure and altitude measurements. The AltIMU includes a second mounting hole and is 0.2″ longer than the MinIMU. Any code written for the MinIMU-9 v3 should also work with the AltIMU-10 v4.
The L3GD20H and LSM303D have many configurable options, including dynamically selectable sensitivities for the gyro, accelerometer, and magnetometer. Each sensor also has a choice of output data rates. The two ICs can be accessed through a shared I²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 MinIMUs connected on the same I²C bus (For additional information, see the I²C Communication section below).
The nine independent rotation, acceleration, and magnetic readings (sometimes called 9DOF) provide all the data needed to make an attitude and heading reference system (AHRS). With an appropriate algorithm, a microcontroller or computer can use the data to calculate the orientation of the MinIMU 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.)
The carrier board includes a low-dropout linear voltage regulator that provides the 3.3 V required by the 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 I²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.
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).
Using the MinIMU-9 v3
A minimum of four connections are necessary to use the MinIMU-9 v3: 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 I²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.)
The CS, DEN, data ready, and interrupt pins of the L3GD20H and LSM303D are not accessible on the MinIMU-9 v3. 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 our L3GD20H carrier and LSM303D carrier boards.
The above schematic shows the additional components the carrier board incorporates to make the 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 I²C communication at the same logic voltage level as VIN. This schematic is also available as a downloadable pdf: MinIMU-9 v3 schematic (190k pdf).
The L3GD20H’s gyro and the LSM303D’s accelerometer and magnetometer can be queried and configured through the I²C bus. Each of the three 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 L3GD20H datasheet (3MB pdf) and the LSM303D datasheet (1MB pdf). More detailed information about I²C in general can be found in NXP’s I²C-bus specification (371k pdf).
The L3GD20H and LSM303D each have separate slave addresses on the I²C bus. The board connects SA0 pins of the two 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 MinIMUs (or an AltIMU v3 and a MinIMU v3) connected on the same I²C bus. The following table shows the slave addresses of the sensors:
Both chips on the MinIMU-9 v3 are compliant with fast mode (400 kHz) I²C standards as well as with the normal mode.
We have written a basic L3GD20 Arduino library and LSM303 Arduino library that make it easy to interface the MinIMU-9 v3 with an Arduino or Arduino-compatible board like an A-Star. They also make it simple to configure the sensors and read the raw gyro, accelerometer, and magnetometer data.
For a demonstration of what you can do with this data, you can turn an Arduino connected to a MinIMU-9 v3 into an attitude and heading reference system, or AHRS, with this Arduino program. It uses the data from the MinIMU-9 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.
The datasheets provide all the information you need to use the sensors on the MinIMU-9 v3, but picking out the important details can take some time. Here are some pointers for communicating with and configuring the L3GD20H and LSM303D that we hope will get you up and running a little bit faster:
We carry several inertial measurement and orientation sensors. The table below compares their capabilities: