Jump to content
I2Cdevlib Forums

Mpu6050 sampling rate and DLPF


Recommended Posts

Hi, I have a question about the sampling rate and the digital low pass filter configuration values for the mpu6050.

 

I know from the datasheet that the output rate for the acceleration is 1kHz.

 

I use the clock source from the X Gyro for reference, as default on the mpu6050.h lib from jeff rowberg.

 

Does the DLPF_CFG = 0 (260Hz ) affect my acceleration sampling rate or the acceleration output rate?

 

If so, does the output rate goes from 1kHz down to 260Hz?

 

Thanks in advance

 

Link to comment
Share on other sites

  • 3 months later...
  • 1 year later...

Same doubt here, for quite a long time. I mainly work with the accelerations. I am still a beginner in this, so it is not clear to me whether the DLPF only acts if the DMP is on. Also, I did not find any configuration where the DLPF is off, is it always on? (pg 13 of product specification does not show any value to turn DLPF off).

Better, let me ask a practical hypothetical question:

If I only extract raw acceleration values from MPU6050, would the DLPF be on by "default"? In other words, if I implement a code in Arduino to read data from MPU6050 at 1kHz, would the DLPF be previously applied to the data? I am facing problems to check this behaviour since I do not have the means to produce high frequency vibrations and test it empirically.

Link to comment
Share on other sites

  • 3 weeks later...

The DLPF of mpu6050 is not in "default on" mode while dealing with the raw values from the sensor. You have to turn it on in order to make sense of the raw values. If you look carefully at the Raw example code, mpu6050.h is added as a header file. 

In that file , you will see this section is present: 

void MPU6050::setDLPFMode(uint8_t mode) {
    I2Cdev::writeBits(devAddr, MPU6050_RA_CONFIG, MPU6050_CFG_DLPF_CFG_BIT, MPU6050_CFG_DLPF_CFG_LENGTH, mode);
}

So in your Raw example code you will turn on the dlpf by using this command just after the initialization: accelgyro.setDLPFMode(MPU6050_DLPF_BW_42);

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.

Guest
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.

Loading...
 Share

×
×
  • Create New...