Skip to content

MAX21100 6 DoF motion sensor with hardware 9 DoF sensor fusion

Notifications You must be signed in to change notification settings

kriswiner/MAX21100

Repository files navigation

MAX21100

MAX21100 6 DoF motion sensor with hardware 9 DoF sensor fusion

This well-commented sketch runs on the Teensy 3.1 (and with small modification, the Arduino 3.3 V Pro Mini) and accesses most of the features of the MAX21100 + LIS3MDL + MS5637 including initializing and configuring the sensors, performing the self tests, calibrating the accelerometer and gyroscope, reading the data registers and properly scaling the data depending on the user specified full scale, data read rate, bandwidth, etc. The sketch runs in either bypass mode or master mode, and uses open-source Madgwick and Mahony 9 DoF sensor fusion filters to estimate absolute sensor orientation with respect to Earth's True North, as well as yielding quaternions, yaw, pitch, and roll, and other heading information as required. The sketch can also run the sensor fusion in hardware on the MAX21100 using the magnetometer data from the slaved LIS3MDL.

The sketch is intended for the breakout board for Maxim Integrated's MAX21100 6-axis gyroscope/accelerometer motion sensor coupled with ST Microelectronic's LIS3MDL magnetometer and Measurement Specialties' MS5637 altimeter/pressure sensor. The board is designed to be two boards in one: either mount it directly to the Teensy 3.1 Cortex M4 ARM microcontroller or, by connecting the solder jumpers on the back of the breakout board, mount it in a breadboard for interfacing with any convenient microcontroller such as a 3.3 V Arduino Pro Mini. The sensors are NOT 5 V tolerant so use only 3V3 power and logic; if necessary, use a logic level converter. The board is hardwired for I2C communication partly because the MS5637 pressure sensor is I2C only, and because the MAX21100 uses I2C to communicate with the magnetometer when slaved to the MAX21100.

The MAX21100 has a DSYNC pin for syncing with a camera for motion stabilization or several other functional modes as well as two configurable interrupt pins. The LIS3MDL has one data ready and one interrupt pins. All of these signals pins are broken out to pins on the board. The breakout board also comes with a jumper to select the use of the 4K7 pull-up resistors on the board (jumper has been soldered in the photograph above).

The MAX21100 supports both bypass mode, where the microcontroller can directly control and access the data registers of the slave magnetometer, and the master mode where the MAX21100 reads the magnetometer data and stores it in registers readable directly from the MAX21100. This pretty standard and is similar to the capability found in Invensense's MPU9250, which can also act as master to an external magnetometer and up to four other external devices. And like the embedded MPU9250 Digital Motion Processor (DMP), the MAX21100 has an internal sensor fusion engine (Motion Merging Engine or MME) that can return quaternions. Unlike the MPU9250, however, the MAX21100 fuses data from all three sensors- accelerometer, gyroscope, and magnetometer- in hardware without having to load a binary blob into the microcontroller memory, delivers true 9 DoF hardware sensor fusion rather than the 6 DoF hardware + 9 DoF in software the MPU9250 DMP is currently limited to, and uses a simple interface where the quaternions can be read directly from MAX21100 registers just like the accelerations or rotation rates. Easy to understand and easy to use!

About

MAX21100 6 DoF motion sensor with hardware 9 DoF sensor fusion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Other 100.0%