Quadcopter,Raspberry pi, Arduino DUE mpu6050

Hi guys,

I come here, to ask you all nice people one tricky question.But for the beginning I will describe you my project which I am working on.

My project is quadcopter, but not normal one, on board should be raspberry pi and arduino due with mpu6050. Basically everything works very well but not always. Here comes the problem. Sometimes Arduino DUE cant connect to mpu6050 over I2C. Sometimes it can and after restart of arduino DUE it again cant connect. Afterwards I have to power off arduino DUE and than power it again on. Than it works. So it looks to me some problem with registers or probably as I read it can be with pull-ups on I2C. I was trying to repair it for a month but I could not, after lot of time I am trying yo contact some person or group of people who could help me. I would be happy for all kinds of help.

Here I am posting also my code on github and some pics of quadcopter.

Little description of my project. On pc runs ground control written in C# which generates control strings and than sends them over network connection through sockets to raspberry pi, it executes them and then when necessary sends directly over serial to arduino DUE.
Arduino DUE takes care for PIDs and sensors staff.

Please I will be happy for all kind of help!

more pics

Guys I would be soooooo happy if someone would help me to solve my problem!!!! I suffer already..I have no idea how to solve it.

Its the sort of problem that requires the same hardware set-up to be able to help with,
that means its less likely anyone is in a position to help debug.

If your code isn’t already checking for every possible error condition in the MPU6050, then
add that now and log all problems. Double check all power rails and connections, put a scope
on every signal like actively looking for issues…

I connected mpu6050 completely normal

VCC => 3.3V GND => GND SCL => SCL SDA => SDA

At this time I am not using interrupts because they creates just problem, sometimes MPU6050 has sucked. IT was because of interrupts. Arduino DUE is enough fast to handle this sensor also without interrupts.

The thing is, the same happens when I use just example sketch from I2CDEVLIB for DMP. Sometimes it connects but after restart it doesn't, it means that all connections are correctly connected. My program which you can see of github works also for arduino nano or uno with no problem. So it means there has to be something with arduino DUE. But I cannot figureout what is it. I debuged all code but the point is, it looks some problem inside of i2c. I read due had some problem with i2c, maybe any idea how to fix them?

Thank you for reply!!!!! I appreciate it !

Hi guys,

I am really sad nobady else can help me, I will tell you my update what I figure out.

I used scope and it looks like sometimes the mpu6050 looks like is completely death. It has power but it doesn't receive any data and ti doesn't send anything. But it still can be some problem with arduino due.

connect AD0 pin of IMU to gnd and then check....

Did you solve your problem? i have a similar project with a due and lsm9ds0, it seems to be something weird with the due and i2c, sometimes the refreshrate of the lsm9ds0 drops to below 1hz and i have to restart it. I cant figure out what causes it. Before the last IDE update, i2c would not work att all with my due. So maybe this is something that will be fixed in an future update.