i2cdevlib icon indicating copy to clipboard operation
i2cdevlib copied to clipboard

MPU6050A DMP init failed

Open Kanken6174 opened this issue 4 years ago • 7 comments

I have 3 MPU6050 modules, from the same vendor. But only 1 out of the 3 work with this library (this one being the genuine 6050), even though they all work when i'm pulling data directly from the register.

I am using the unmodified MPU6050DMP6 sketch of the lib, but 2 of my modules report their WHOAMI register as 0x98 instead of 0x68 as it should be. i've tried bypassing this issue by modifying the testConnection() function of the lib, but even after adding the new address as a valid one, so clearly there are more underlying issues.

The counterfeit 6050A either fail to init the DMP with code 1, or loop forever while prininting "*" in the loading bar.

Kanken6174 avatar Nov 14 '21 20:11 Kanken6174

The *** thing is the Calibration routine. Make sure your MPI is flat or just skip the calibration. Also, you can skip the test connection if it communicates it works if it doesn't It fails.

Z

ZHomeSlice avatar Nov 15 '21 00:11 ZHomeSlice

after skipping the test it fails. It seems that this library just won't work with the 6050A chips, only the 6050, even though they're supposed to be functionnally the same. (i can pull the raw values from the registers just fine, so it's not that the 6050A are completely dead, there's just something wrong with their DMP.)

Kanken6174 avatar Nov 15 '21 13:11 Kanken6174

Can you get me a link to the Registery map and datasheets? I did not know of a version of the MPU6050 that has the A designation. could it be an early Alpha chip...

could you try it with my version of the library to see if it works here? The results should be exactly the same I am just more familiar with my library. https://github.com/ZHomeSlice/Simple_MPU6050

Z

ZHomeSlice avatar Nov 17 '21 18:11 ZHomeSlice

image

This is your lib, running the Seimpl_MPU6050_Basic_Example on the 6050A (it goes on forever)

image And this is the genuine 6050 running the same code after 3 seconds

Kanken6174 avatar Nov 18 '21 15:11 Kanken6174

image Original log of the 6050, as you can see the WHOAMI address is different.

Kanken6174 avatar Nov 18 '21 15:11 Kanken6174

************ forever Calibration is failing to complete. Remove calibration routines soon setup and try again. Z

ZHomeSlice avatar Nov 19 '21 01:11 ZHomeSlice

I have found the underlying issue, the mpu6050A is actually not an invensense MPU6050, but a TDK ICM-20689, which does indeed have a WHOAMI register value of 152 and not 104 like the 6050. The library is failing because the config register isn't at the same address, unlike the data registers which are in the same place.

It's another chip entriely. Your code is not at fault here.

Kanken6174 avatar Dec 05 '21 14:12 Kanken6174