Author Topic: MPU-9150 9-axis IMU, Magnetometer  (Read 15378 times)

0 Members and 1 Guest are viewing this topic.

Offline ryannTopic starter

  • Contributor
  • Posts: 13
  • Country: us
MPU-9150 9-axis IMU, Magnetometer
« on: April 16, 2013, 04:52:01 pm »
Hey everyone,

For my undergraduate senior design project, I'm working on a UAV in a blimp package. In order to maintain orientation, we're using the InvenSense MPU-9150 IMU to keep track of orientation and heading.  After reading the vague data sheet on the magnetometer, and looking at other source code, I can read the flux in all 3 axes. I believe the measurements are correct. I get about 50uT in either X or Y, and about 60uT on Z. The problem is the X and Y don't change signs, either negative, or positive, as I rotate the sensor 180°. Because of this, I have a huge dead band on my sensor. It also can get to a point where it flips signs quickly, really throwing off the heading.

The MPU-9150 uses the MPU-6050 IMU along with an AK8975 magnetometer integrated into a single package.

Since I don't have much experience with magnetic flux of the earth or magnetometers in general. Any suggestions or tips?
 

Offline ryannTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: MPU-9150 9-axis IMU, Magnetometer
« Reply #1 on: April 16, 2013, 05:00:08 pm »
Some more information...

We're using Sebastian Madgwick's IMU filter. It works very well with just the accelerometer and gyroscope, but with the magnetometer messed up, it always reverts back to the heading the magnetometer is reporting.

Of course, the magnetometer corrects gyro drift and the gyro corrects magnetometer noise.

Here's a video demo.

http://youtu.be/PUNxwl8MX50
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 2868
  • Country: us
  • Not An Expert
Re: MPU-9150 9-axis IMU, Magnetometer
« Reply #2 on: April 16, 2013, 06:49:14 pm »
One of the benefits of using parts from a real company, as opposed to open source stuff from sparkfun for instance, is you can call them up and ask technical support.  Their applications engineers might even help with your design.  That is a really cool resource that a lot of people don't take advantage of enough.  Worth a shot at least.
 

Offline ecat

  • Frequent Contributor
  • **
  • Posts: 296
  • Country: gb
Re: MPU-9150 9-axis IMU, Magnetometer
« Reply #3 on: April 16, 2013, 06:59:05 pm »
From the data sheet

Quote
Measuremnet data is stored in two’s complement and Little Endian format. Measurement range of each axis is from -4096 to +4095 in decimal


Get rid of the filter for now.
What are raw X values for the magnetometer when you rotate it? 0deg, 90deg, 180deg, 270deg. Let's say 0deg is angle that returns a raw X value of 0. Repeat the test for Y and Z.

One of the benefits of using parts from a real company, as opposed to open source stuff from sparkfun for instance, is you can call them up and ask technical support.  Their applications engineers might even help with your design.  That is a really cool resource that a lot of people don't take advantage of enough.  Worth a shot at least.

Don't get me started on SparkFun. I wasted the best part of a month on their SEN-10724 - poor design (under speced caps so quite a lot of noise) and what turned out to be a defective magnetometer with an unusable asymmetric range of +700 to -200 in X and Y :(


 

Offline ryannTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: MPU-9150 9-axis IMU, Magnetometer
« Reply #4 on: April 17, 2013, 01:20:46 am »
Okay guys.. here's the code I'm using.  It's built on ESOS (http://www.ece.msstate.edu/courses/ece3724/main_pic24/docs/_e_s_o_s.html), which is an operating system for the PIC microcontroller developed by one my professors.

Here's the code:
Code: [Select]
/*
 * File:   MPU_Test.c
 * Author: Ryan Nazaretian
 *
 * Created on April 16, 2013, 4:47 PM
 */

#include "esos.h"
#include "esos_pic24.h"
#include "MPU.h"

#define MPU_SLAVE_ADDRESS 0xD0  // 0x68 << 1 == 0xD0

#define MPU_REG_INT_PIN_CFG 0x37  // Configures the behavior of the interrupt signals at the INT pins
#define MPU_INT_PIN_CFG_I2C_BYPASS_EN 0x02  // If 1 and I2C_MST_EN = 0, the host application processor will be able to directly access the auxiliary I2C bus


#define MPU_MAG_I2C_ADDR 0x18  // 0x0C << 1 == 0x18
#define MPU_REG_MAG_WIA 0x00  // When read, should report 0x48
#define MPU_REG_MAG_CNTL 0x0A
#define MPU_MAG_SINGLE_MRMNT 0x01  //Single measurement mode

// ST1 Register - Contains Data Ready Bit
#define MPU_REG_MAG_ST1 0x02
#define MPU_MAG_ST1_NORMAL 0x00
#define MPU_MAG_ST1_READY 0x01

// ST2 Register - Contains Data Read Error and Magnetic Sensor Overflow Data
#define MPU_REG_MAG_ST2 0x09
#define MPU_MAG_ST2_DERR 0x04
#define MPU_MAG_ST2_HOFL 0x08

// HXL to HZH - Contains Measurement Data
#define MPU_REG_MAG_HXL 0x03    //Magnetometer X-Axis Low Byte
#define MPU_REG_MAG_HXH 0x04    //Magnetometer X-Axis High Byte
#define MPU_REG_MAG_HYL 0x05    //Magnetometer Y-Axis Low Byte
#define MPU_REG_MAG_HYH 0x06    //Magnetometer Y-Axis High Byte
#define MPU_REG_MAG_HZL 0x07    //Magnetometer Z-Axis Low Byte
#define MPU_REG_MAG_HZH 0x08    //Magnetometer Z-Axis High Byte

ESOS_USER_TASK(ReadMagnetometer)
{
static UINT16 U16_MagX, U16_MagY, U16_MagZ;
static uint8 u8_WIA, u8_ST1, u8_ST2;
ESOS_TASK_BEGIN();

// Set clock to Phase Locked Loop - Gyroscop X-Axis Reference
ESOS_TASK_WAIT_ON_WRITE2I2C1(I2C_WADDR(MPU_SLAVE_ADDRESS), MPU_REG_PWR_MGMT_1, MPU_PWR_MGMT_CLKSEL_PLL_X);

// Enable I2C Bypass to talk to the AK8975 Magnetometer
ESOS_TASK_WAIT_ON_WRITE2I2C1(I2C_WADDR(MPU_SLAVE_ADDRESS), MPU_REG_INT_PIN_CFG, MPU_INT_PIN_CFG_I2C_BYPASS_EN);

// Poke the AK8975 to see its Who Am I (WIA), which should return 0x48
ESOS_TASK_WAIT_ON_WRITE1I2C1(I2C_WADDR(MPU_MAG_I2C_ADDR), MPU_REG_MAG_WIA);
ESOS_TASK_WAIT_ON_READ1I2C1(I2C_RADDR(MPU_MAG_I2C_ADDR), u8_WIA);

// Print off WIA Register Reading
ESOS_TASK_WAIT_ON_AVAILABLE_OUT_COMM();
ESOS_TASK_WAIT_ON_SEND_STRING("MPU> MAG> WIA Register: Expected 0x48, Read ");
    ESOS_TASK_WAIT_ON_SEND_UINT8_AS_HEX_STRING(u8_WIA);
ESOS_TASK_WAIT_ON_SEND_UINT8('\n');
    ESOS_TASK_SIGNAL_AVAILABLE_OUT_COMM();

while(TRUE)
{
// Tell AK8975 to take a measurement
ESOS_TASK_WAIT_ON_WRITE2I2C1(I2C_WADDR(MPU_MAG_I2C_ADDR), MPU_REG_MAG_CNTL, MPU_MAG_SINGLE_MRMNT);

// Wait for data to return
do
{
ESOS_TASK_WAIT_ON_WRITE1I2C1(I2C_WADDR(MPU_MAG_I2C_ADDR), MPU_REG_MAG_ST1);
ESOS_TASK_WAIT_ON_READ1I2C1(I2C_RADDR(MPU_MAG_I2C_ADDR), u8_ST1);
ESOS_TASK_YIELD();
} while(u8_ST1 != MPU_MAG_ST1_READY);

// Read ST2 Status
ESOS_TASK_WAIT_ON_WRITE1I2C1(I2C_WADDR(MPU_MAG_I2C_ADDR), MPU_REG_MAG_ST2);
ESOS_TASK_WAIT_ON_READ1I2C1(I2C_RADDR(MPU_MAG_I2C_ADDR), u8_ST2);

// Print ST2 Status
ESOS_TASK_WAIT_ON_AVAILABLE_OUT_COMM();
ESOS_TASK_WAIT_ON_SEND_STRING("\nMPU> MAG> Status 2: ");
ESOS_TASK_WAIT_ON_SEND_UINT8_AS_HEX_STRING(u8_ST2);
if(u8_ST2 & MPU_MAG_ST2_DERR)
ESOS_TASK_WAIT_ON_SEND_STRING("\nMPU> MAG> Data Read Error occurred.");
if(u8_ST2 & MPU_MAG_ST2_HOFL)
ESOS_TASK_WAIT_ON_SEND_STRING("\nMPU> MAG> Magnetic sensor overflow occurred.");
ESOS_TASK_WAIT_ON_SEND_UINT8('\n');
ESOS_TASK_SIGNAL_AVAILABLE_OUT_COMM();

/*********************************************************************
* Page 21/33 of Data Sheet:
* Addresses from 02H to 09H and from 10H to 12H are compliant with
* automatic increment function of serial interface respectively.
*********************************************************************/

// Set Register to HXL (First register for measurement data)
ESOS_TASK_WAIT_ON_WRITE1I2C1(I2C_WADDR(MPU_MAG_I2C_ADDR), MPU_REG_MAG_HXL);

// Read Magnetometer X-Axis
ESOS_TASK_WAIT_ON_READ2I2C1(I2C_RADDR(MPU_MAG_I2C_ADDR), U16_MagX.u8Lsb, U16_MagX.u8Msb);

// Read Magnetometer Y-Axis
ESOS_TASK_WAIT_ON_READ2I2C1(I2C_RADDR(MPU_MAG_I2C_ADDR), U16_MagY.u8Lsb, U16_MagY.u8Msb);

// Read Magnetometer Z-Axis
ESOS_TASK_WAIT_ON_READ2I2C1(I2C_RADDR(MPU_MAG_I2C_ADDR), U16_MagZ.u8Lsb, U16_MagZ.u8Msb);


// Print raw measurement data
ESOS_TASK_WAIT_ON_AVAILABLE_OUT_COMM();
ESOS_TASK_WAIT_ON_SEND_STRING("MPU> MAG> X-Axis: ");
ESOS_TASK_WAIT_ON_SEND_UINT16_AS_HEX_STRING(U16_MagX.u16);
ESOS_TASK_WAIT_ON_SEND_STRING("\nMPU> MAG> Y-Axis: ");
ESOS_TASK_WAIT_ON_SEND_UINT16_AS_HEX_STRING(U16_MagY.u16);
ESOS_TASK_WAIT_ON_SEND_STRING("\nMPU> MAG> Z-Axis: ");
ESOS_TASK_WAIT_ON_SEND_UINT16_AS_HEX_STRING(U16_MagZ.u16);
ESOS_TASK_WAIT_ON_SEND_UINT8('\n');
ESOS_TASK_SIGNAL_AVAILABLE_OUT_COMM();

// Delay 500ms
ESOS_TASK_WAIT_TICKS(500);
}

ESOS_TASK_END();
}

void user_init(void)
{
__esos_unsafe_PutString(HELLO_MSG);
esos_pic24_configI2C1(400);
esos_RegisterTask(ReadMagnetometer);
}


Here was the output:
Code: [Select]
MPU_Test.c, built on Apr 16 2013 at 19:36:05
MPU> MAG> WIA Register: Expected 0x48, Read 0x48
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFC4
MPU> MAG> Y-Axis: 0x007C
MPU> MAG> Z-Axis: 0x009E
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFC2
MPU> MAG> Y-Axis: 0x007A
MPU> MAG> Z-Axis: 0x009C
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFC4
MPU> MAG> Y-Axis: 0x007E
MPU> MAG> Z-Axis: 0x009E
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFD2
MPU> MAG> Y-Axis: 0x0074
MPU> MAG> Z-Axis: 0x009C
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFD1
MPU> MAG> Y-Axis: 0x0073
MPU> MAG> Z-Axis: 0x0097
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFDD
MPU> MAG> Y-Axis: 0x0073
MPU> MAG> Z-Axis: 0x0095
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFEA
MPU> MAG> Y-Axis: 0x0070
MPU> MAG> Z-Axis: 0x0092
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFEC
MPU> MAG> Y-Axis: 0x006C
MPU> MAG> Z-Axis: 0x0096
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFF0
MPU> MAG> Y-Axis: 0x0066
MPU> MAG> Z-Axis: 0x0092
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFF8
MPU> MAG> Y-Axis: 0x005E
MPU> MAG> Z-Axis: 0x0092
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFFD
MPU> MAG> Y-Axis: 0x0057
MPU> MAG> Z-Axis: 0x0095
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x0002
MPU> MAG> Y-Axis: 0x0054
MPU> MAG> Z-Axis: 0x0094
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x0007
MPU> MAG> Y-Axis: 0x004D
MPU> MAG> Z-Axis: 0x0095
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x0006
MPU> MAG> Y-Axis: 0x004C
MPU> MAG> Z-Axis: 0x0092
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x000B
MPU> MAG> Y-Axis: 0x0047
MPU> MAG> Z-Axis: 0x0097
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x0012
MPU> MAG> Y-Axis: 0x0038
MPU> MAG> Z-Axis: 0x0090
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x0017
MPU> MAG> Y-Axis: 0x0037
MPU> MAG> Z-Axis: 0x0091
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x0013
MPU> MAG> Y-Axis: 0x0031
MPU> MAG> Z-Axis: 0x0093
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x001B
MPU> MAG> Y-Axis: 0x0029
MPU> MAG> Z-Axis: 0x008F
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x0019
MPU> MAG> Y-Axis: 0x001D
MPU> MAG> Z-Axis: 0x0093
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x0010
MPU> MAG> Y-Axis: 0x0012
MPU> MAG> Z-Axis: 0x0094
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x0011
MPU> MAG> Y-Axis: 0x0007
MPU> MAG> Z-Axis: 0x0097
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x0008
MPU> MAG> Y-Axis: 0xFFFC
MPU> MAG> Z-Axis: 0x0098
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x0007
MPU> MAG> Y-Axis: 0xFFFD
MPU> MAG> Z-Axis: 0x0093
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFFF
MPU> MAG> Y-Axis: 0xFFF7
MPU> MAG> Z-Axis: 0x0093
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0x0002
MPU> MAG> Y-Axis: 0xFFEC
MPU> MAG> Z-Axis: 0x008E
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFF5
MPU> MAG> Y-Axis: 0xFFEF
MPU> MAG> Z-Axis: 0x0089
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFF1
MPU> MAG> Y-Axis: 0xFFE3
MPU> MAG> Z-Axis: 0x0091
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFE7
MPU> MAG> Y-Axis: 0xFFEB
MPU> MAG> Z-Axis: 0x0099
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFE2
MPU> MAG> Y-Axis: 0xFFEA
MPU> MAG> Z-Axis: 0x009C
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFD1
MPU> MAG> Y-Axis: 0xFFE7
MPU> MAG> Z-Axis: 0x009D
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFCA
MPU> MAG> Y-Axis: 0xFFE2
MPU> MAG> Z-Axis: 0x009E
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFBF
MPU> MAG> Y-Axis: 0xFFE5
MPU> MAG> Z-Axis: 0x009B
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFB1
MPU> MAG> Y-Axis: 0xFFE5
MPU> MAG> Z-Axis: 0x009F
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFAD
MPU> MAG> Y-Axis: 0xFFE9
MPU> MAG> Z-Axis: 0x00A1
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFA5
MPU> MAG> Y-Axis: 0xFFF7
MPU> MAG> Z-Axis: 0x00A1
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFF9D
MPU> MAG> Y-Axis: 0xFFFB
MPU> MAG> Z-Axis: 0x00A3
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFF9B
MPU> MAG> Y-Axis: 0x0001
MPU> MAG> Z-Axis: 0x00A9
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFF94
MPU> MAG> Y-Axis: 0x0006
MPU> MAG> Z-Axis: 0x00A2
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFF84
MPU> MAG> Y-Axis: 0x0012
MPU> MAG> Z-Axis: 0x009E
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFF87
MPU> MAG> Y-Axis: 0x0027
MPU> MAG> Z-Axis: 0x009F
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFF84
MPU> MAG> Y-Axis: 0x003A
MPU> MAG> Z-Axis: 0x009C
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFF86
MPU> MAG> Y-Axis: 0x0042
MPU> MAG> Z-Axis: 0x00A4
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFF86
MPU> MAG> Y-Axis: 0x004C
MPU> MAG> Z-Axis: 0x00A0
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFF8C
MPU> MAG> Y-Axis: 0x0054
MPU> MAG> Z-Axis: 0x009C
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFF97
MPU> MAG> Y-Axis: 0x0061
MPU> MAG> Z-Axis: 0x009D
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFA2
MPU> MAG> Y-Axis: 0x0066
MPU> MAG> Z-Axis: 0x00A0
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFA7
MPU> MAG> Y-Axis: 0x006F
MPU> MAG> Z-Axis: 0x009D
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFAF
MPU> MAG> Y-Axis: 0x0073
MPU> MAG> Z-Axis: 0x0099
MPU> MAG> Status 2: 0x00
MPU> MAG> X-Axis: 0xFFC5
MPU> MAG> Y-Axis: 0x0077
MPU> MAG> Z-Axis: 0x0097

I've attached the raw data as signed numbers, and converted (without sensitivity adjustment) to micro Teslas in CSV format.

« Last Edit: April 17, 2013, 02:06:37 am by ryann »
 

Offline ecat

  • Frequent Contributor
  • **
  • Posts: 296
  • Country: gb
Re: MPU-9150 9-axis IMU, Magnetometer
« Reply #5 on: April 17, 2013, 02:14:14 am »
I'm no expert on these things btw.

Looking at your data I guess you rotated the board about the z axis.
Your min X value is -124 while your max X value is only 27.
Your min Y value is only -27 while your max Y value is 126.

Not looking good to my untrained eyes.

I was going to waffle on about circles and distortions but this guy knows his stuff, so...
http://www.sensorsmag.com/sensors/motion-velocity-displacement/compensating-tilt-hard-iron-and-soft-iron-effects-6475


Edit.
Out of interest, if you turn the magnetometer so X is pointing down and rotate about X, what are your Y, Z values. It's worth repeating the same test with Y pointing down. As the link says, you are looking for symmetries and offsets, for sure the IMU filters I've looked at all assume perfect zero offset circles. With good luck you can compensate for any distortions, with bad luck one or more axis is so far off that your compensation looses so much resolution as to make it worthless.



« Last Edit: April 17, 2013, 02:24:34 am by ecat »
 

Offline ryannTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: MPU-9150 9-axis IMU, Magnetometer
« Reply #6 on: April 17, 2013, 02:55:43 am »
I've attached the X and Y axis. Would the offset calibrations be something that we can rely on for every run, or would we need to recalibrate for each run?

Totally didn't see the link.  I'll get back after I read/think through it.
« Last Edit: April 17, 2013, 02:58:55 am by ryann »
 

Offline ecat

  • Frequent Contributor
  • **
  • Posts: 296
  • Country: gb
Re: MPU-9150 9-axis IMU, Magnetometer
« Reply #7 on: April 17, 2013, 03:19:42 am »
tehe re: link :)

Check out this two part link too and let the SW do the work:
http://sailboatinstruments.blogspot.co.uk/2011/08/improved-magnetometer-calibration.html

I'm sure I have some different offset compensation SW somewhere but the above looks good.

A quick look at your data gives the impression that the X, Y and Z values have a similar pattern, you're not working next door to the LHC are you? Big loud speakers? Try a different room or a different corner of the same room.



 

Offline ryannTopic starter

  • Contributor
  • Posts: 13
  • Country: us
Re: MPU-9150 9-axis IMU, Magnetometer
« Reply #8 on: April 17, 2013, 03:21:09 am »
I saw the plots of what calibrated data looks like.  I plotted our current data on a LabVIEW XY graph.

Honestly, plotted out like this, it doesn't look too bad.  Using offsets will help immensely.  I'll check out that second link as well.

X-Y Plot:


X-Z Plot:


Y-Z Plot:
« Last Edit: April 17, 2013, 03:24:49 am by ryann »
 

Offline ecat

  • Frequent Contributor
  • **
  • Posts: 296
  • Country: gb
Re: MPU-9150 9-axis IMU, Magnetometer
« Reply #9 on: April 17, 2013, 03:36:21 am »
Yep, two perfect circles and something that reminds me of an ex-girlfriend - that's what you get for dating amoeba. Looks good.
 

Offline i_like_sparks

  • Contributor
  • Posts: 28
Re: MPU-9150 9-axis IMU, Magnetometer
« Reply #10 on: October 08, 2013, 12:48:16 am »
Reviving this thread as I'm currently working on something similar. I got the MPU-9150 to work with all the bells and whistles (FIFO, magnetometer) but I'm a bit underwhelmed by the accuracy of the magnetometer and was wondering what your experiences were.

The magnetometer readings are quite noisy, I'd say the average noise level is around +/- 4-5 degrees. Also there is a systematic error, when I turn the unit by exactly 90 degrees the delta in the readings is 70-100 degrees, depending on the previous orientation. This is after calibration and tilt compensation.

So the total accuracy is less than 10 degrees, which seems very high. I was wondering if anyone had similar experiences?
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf