Jump to content
I2Cdevlib Forums

Change the Accel range while using DMP

Recommended Posts

Hello and thanks in advance for the great library,

I'm planning to use the MPU6050 as the IMU of my university rocket team's 3km apogee rocket for telemetry. The problem is, it means that I would have to use the 16g range of the accelerometer. It's desirable to use the device's DMP as it's the most precise and hassle-free solution, but I didn't seem to find a way to set the device's range to 16g while using its DMP. I tried modifying the teapot example to include the line


after the device initialization and after the DMP initialization but it didn't work.


Is it possible? If no, what method would you recommend for processing the raw data? Or even, is there a better solution than the MPU6050 for my application? I've looked at the BNO055, but unfortunately that chip is too expensive for my team compared to the MPU.


I'm using an Arduino nano for development with PlatformIO (VS Code). We plan to use the ESP32 as our micro.

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 year later...

Hi there,

Another post mentions the following note from InverSense  "DMP sensor fusion works only with gyro at +-2000dps and accel +-2G"  [mllite_test.c, l. 967].

It looks like DMP has been build for the wearables market for step counting and gestures ect.  I would suggest that if this is confirmed that it be included in the DMP FAQ section.

I ran some tests and while DMP does not throw an error at other settings but the values returned did not look correct.

If you are looking at 16G measurements I would suggest pulling the raw values and doing the Math in the MCU.




Link to comment
Share on other sites

The full comment from the motion_driver_6.12\motion_driver_6.12\msp430\eMD-6.0\simple_apps\msp430\mllite_test.c file line 956

     * Known Bug -
     * DMP when enabled will sample sensor data at 200Hz and output to FIFO at the rate
     * specified in the dmp_set_fifo_rate API. The DMP will then sent an interrupt once
     * a sample has been put into the FIFO. Therefore if the dmp_set_fifo_rate is at 25Hz
     * there will be a 25Hz interrupt from the MPU device.
     * There is a known issue in which if you do not enable DMP_FEATURE_TAP
     * then the interrupts will be at 200Hz even if fifo rate
     * is set at a different rate. To avoid this issue include the DMP_FEATURE_TAP
     * DMP sensor fusion works only with gyro at +-2000dps and accel +-2G


Link to comment
Share on other sites

  • 6 months later...
  • 1 month later...
On 5/13/2022 at 8:16 PM, Kraken said:

I used:



Worked fine.

Are you also getting correct readings then? When i set full scale accelerometer range to 3 it delivers negative values. Only setting to 0 seems to provide right values.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...