MPU-6050 how to change rate of MPU generated fused data

HI. I am running Jeffs MPU6050_DMP6 example, and it works great.

However the rate the MPU generated data is returned is 18Hz. I have looked through the invensenses examples and I see where this is set in inv_set_fifo_rate()

It says in the code that there are 3 rates the fifo can be read at 18 Hz, 50 Hz and 100 Hz.

I found the part of Jeffs code where the data for the fifo is being set, the 0x0A at the end is setting the rate divider. In the Invensense code they set it to 3 to get 50Hz.

I tried changing this but the update rate stayed at around 18Hz.

Anyone tried to change the MPU update rate? Any ideas how to do this?


You sure take a deep dive into the MPU-6050.

These pages: have a function inv_init_config(), which sets the fifo rate at 50Hz. Is that of any help ?

You could ask Jeff.

Thanks, I'll take a look.

I did contact Jeff, and he confirmed I was on the right track.

In fact I did finally get it to work. The range is limited but setting the 0x0A to 0x03 does change the sample rate to 50Hz, which is what I wanted.

Any higher than that and it all stops working.


I’m using

with libraries i2cdevlib.

I have the data of acc-gyr from mpu6050, BUT the connection with the compass hmc5883 failes.

And… the Jeffs code mpu6050 that you use, is the same of the my libraries or you have modified???

I have Arduino 2009, ide 1.0, win7 64 bit.

Sorry for my english…

sketch_magnetometro.ino (1.45 KB)

sketch_acc_gir.ino (1.53 KB)

I'm using the current version of Jeffs code..

I do not have a magnetometer and I know Jeff is currently working on getting the magnetometer fusion working in the MPU, but apparently that does not currently work.

The 6DoF (just acc and gyro) does work very well at the moment.

You could try a new sketch for testing the HMC5883. I have added links in the magnetometer section: Those sketches are very simple, but you need to update the Wire.send by Wire.write.