Hi there, I have been searching for days to try and find the solution to my problem, but have had no such luck. I am trying to use an MPU6050 with a DMP but whenever I attempt to run the sample code, i get an error stating that the MPU connection has failed. I am running Jeff Rowberg's DMP example, and while i see plenty of people with the same issue, I have yet to find a solution. I am using an Arduino Mega 2560 and have the MPU connected to the SDA and SCL correctly, VCC to 3.3, and GND to GND. I have the AD0 to GND ( I have tried both with the AD0 pin floating and grounded, neither worked) and I have the INT pin to pin 2. When I attempt to run the code, it compiles perfectly, but when viewing the serial monitor after uploading, I get "MPU6050 connection failed". I ran the i2c connection scanner, and confirmed 0x68, and now I am out of options. (BTW, when running a standard MPU6050 code without the DMP, the MPU works perfectly and outputs to the serial monitor without issue)
This is the serial monitor output when trying to run the DMP
Initializing I2C devices...
Testing device connections...
MPU6050 connection failed
Send any character to begin DMP programming and demo:
Welcome to the forum!
The MPU-6050 was discontinued several years ago, and the chances are excellent that you have a counterfeit or reject part. If it is counterfeit, it most likely won't have a DMP.
Time to move on to a more modern sensor, obtained from a reliable source (cheap modules from Amazon, eBay, Alibaba, etc. are generally not genuine).
Thank you for your timely response!
I have gone ahead and ordered a BNO055 IMU. Do you have any knowledge of that particular one?
From what I could see, it seems to be a fairly competent one and costs a considerable amount more than the 6050.
In my and others' experience, the BNO055 does not work very well. The automatic sensor calibration is poor and unstable, and you can't shut it off. See this dated post BNO055 Possible use in +/- 1.0 deg pointing system - adafruit industries
But it is easy to use and gives an approximate 3D orientation (within 5 degrees or so), which is fine for many purposes.
If you want higher accuracy, the ICM20948 is a much better sensor. Again the DMP is poorly documented, but there is open source AHRS code that works just as well, if you take the time to calibrate the sensor properly.
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.