Invensense APIs for MPU9150

By guevara , 17 March 2013

I'm trying to understand the code resources available for the MPU9150.

I have one MotionFit SDK hardware, i.e. module that includes mpu9150, pressure sensor, bluetooth, and mps430 (lets call this wireless mpu).

I also have an MPU9150 breakout (lets call it "the standalone") board from Sparkfun, which I've been using to try to get IMU functionality for my project. As I'm currently at a road block getting the standalone initialized (call to dmp_load_motion_driver_firmware() fails) I've decided to explore the wireless module.

I want to understand what code resources are available and what I need to do to get access to finally get inertial and Attitide measurements from an MPU9150.

I've browsed all of the code provided in several zip files but there's a lot of duplication and it's not clear how we are to use them. Please help with these questions:

Q1) Is it the case that ALL provided msp430 code is that which runs on the embedded msp430 on the wireless mpu, i.e. MotionFit SDK hardware?

Q2) I've seen several code sets targeting msp430 that differ between MotionFit Wireless SDK (v4.1), MotionFit SDK (motionfit with eMPL 5.1.1), and Embedded _MotionDriver (5.1). what are their purpose and where do they fit in the scheme of things?

Q3) As mentioned above, I've fallen back for now and trying to use my wireless mpu. I've seen the teapot demo--great! Wonderful!. I want to experiment with interfacing to the wireless mpu via bluetooth. The wireless mpu communicate via packets to a PC running the teapot demo. Assuming I write an app that runs on Linux and can communicate via bluetooth, what is the API definition to communicate via bluetooth?

Q3.1) Is there a C/C++ code API that I can use for this purpose? Do I really have to reverse engineer api from Python?

Q4) As it's hard to discern fact from fiction, what exactly can I expect to get from the wireless mpu and how much control do I have, i.e. update rate, fusion? For example, can I get:
o Quaternions,
o "processed" Acceleration and Angular velocities (processed=filtered, bias compensated, gravity compensated, temperature compensated one or more)
o timestamp
o "processed" pressure measurement
o "processed" Magn

BTW, my dev platform is Ubuntu 12.04, eventually the processor that will use inertial data will be LM4F120.

Thanks

stueckrath.c

12 years 12 months ago

Q1) yes, but see Q2

Q2) SDK 4.1 and 5.1 are intended only for the MotionFit Wirless HW and do not contain the source code that would be necessary to port to other platforms. They do the full motion fusion (including heading adjustment using magnetometer). They differ in some of the command options and update rates. Embedded Motion Driver 5.1 is intended to easily port to other platforms (contains source code) although the example application provided is targeted to MSP430. Embedded Motion Driver does not contain code to do heading adjustment using magnetometer data.

Q3) For bluetooth, all you need to do is setup a virtual serial port to communicate with the MotionFit HW from another device. The MotionFit will just stream out data, and your application will need to keep up and parse the data. Look at:
MotionFit_With_eMPL511_Releasesimple_appsmsp430mllite_test.c
(starting at line 406)
to see the various command options to get other data types (raw acceleration, gyroscope, magnetometer, etc) or to adjust the update rate
To use these, your program will simply need to write 'i', 'n', 'v' to the virtual serial port (one at a time, followed by the intended command letter or number) assuming you are running MotionFit 5.1 on your MotionFit HW

Q4)
Quaternions - yes, after rotating the sensor around arbitrarily for a few seconds the magnetometer will be calibrated and will adjust the heading periodically. This is somewhat jumpy: the heading fusion isn't done very well in my opinion. You can also disable the magnetometer, in which case the heading will drift slowly, but may be better for your application.
"Processed" - no. but you can get raw sensor values for all the sensors except pressure

phpbb Post ID
22749
phpbb Topic ID
15162