Factory Calibration Procedure and Motion Driver 5.1

By cktruong , 15 August 2013

I'd like to use the Motion Driver 5.1 to accomplish a port to a non-Atmel 32-bit ARM microcontroller.

Specifically, I would like to include a factory calibration procedure which utilizes the DMP's NO MOTION TRACKER to first: (a) calibrate the gyro and accel offsets, then (b) read the offsets it has calculated and store them to eeprom for later use. This enables an application that cannot require the user to be still for the initial calibration.

Is this possible with the Motion Driver 5.1 software?

If so, can you please let me know from which registers to read these DMP-calculated calibration offsets?

Many thanks for your help,

- scott

johnkzao

12 years 6 months ago

@slibert wrote:

I'd like to use the Motion Driver 5.1 to accomplish a port to a non-Atmel 32-bit ARM microcontroller.

Specifically, I would like to include a factory calibration procedure which utilizes the DMP's NO MOTION TRACKER to first: (a) calibrate the gyro and accel offsets, then (b) read the offsets it has calculated and store them to eeprom for later use. This enables an application that cannot require the user to be still for the initial calibration.

Is this possible with the Motion Driver 5.1 software?

If so, can you please let me know from which registers to read these DMP-calculated calibration offsets?

Many thanks for your help,

- scott


I have the exact same question, any help would be very very welcome!
phpbb Post ID
23706

cktruong

12 years 6 months ago

I've heard no response from developer support on this after several weeks.

My best guess is that Invensense is planning to migrate the code currently in MotionApps directly into the MPU in a future product, and thus has a motive in not responding, since it is likely considered their Intellectual Property. I have offered to port the MotionApps code to other platforms, but was told the source code is not being made available. However I'm not complaining - the 5.1 open source code has been awesome, and I can completely understand (if I'm right in my assumptions) the product development strategy.

While I would be happy to purchase a future product with this support integrated into the DMP I can't wait. Necessity breeds innovation!

So I will be working on a solution, and would be happy to share it with others once it is worked out. If you're interested in collaborating, please contact me at scott@kauailabs.com. I have a day job, so perhaps a collaboration would be the quickest way to get us there.

My current thinking is to determine how to read the calibration values back out of the DMP after the calibration completes. Store a table of offsets, with a different row of the table for each degree Celsius of the on-board temperature sensor, and apply the new settings once the temperature changes.

Aloha,

- scott

P.S. I also have source code which ports the 5.1 driver to the Arduino (ATMEGA328P) and the STM32F4, if you' re interested in that, let me know too.

phpbb Post ID
23709

guy_mcilroy

12 years 6 months ago

Motion Driver code shows how to put the accel and gyro bias into the DMP. Dmp_set_accel_bias() and dmp_set_gyro_bias() functions can be used.

We cannot expose which specific registers those are within the DMP to include your own facory cal procedure even though all chips to go through a facory cal prior to shipping.

As you are aware we cannot comment on future product developments that have not been officially released or announced.

phpbb Post ID
23712

chiu1152

12 years 6 months ago

I am working on this, and the motion driver code in the SDK includes a great example for the GYRO bias. You basically read the GYROs, adjust for the chip orientation, and scale and write those values to the DMP memory at addresses 976-987 (see the motion driver and inv_mpu.c and get_st_biases). This is using the DMP from the motion driver code, not the mllite DMP (different addresses).

The ACCEL biases appear to be based both on the samples recorded in get_st_biases as well as the values of the registers 3-11 (see inv_gyro.c in the SDK). HTH

phpbb Post ID
23715
phpbb Topic ID
15528