0

I'm trying to connect an Arduino Micro to MPU-9150 using the MPU6050_DMP6 example. It runs for couple of seconds then the board Hangs, I sometimes see the "FIFO overflow" message. The same code runs well when i connect the MPU-9150 to Arduino UNO and Arduino Duemilanove. I tried to lower the serial baud rate but no success with that. I even tried connecting an external 12V to the Micro but it's the same.

should I lower the i2c clock (not sure how to do it)?

another interesting thing i have noticed is that with the Duemilanove i can use a longer line for the i2c (5m of cat5e), with the Uno it only works with less then 2m cables, can anyone tell why?

1

I have seen a lot of variations with the 6050. Code I know works fine for me, will not run on someone else's system. Code fixes suggested by others has zero effect for me. My understanding is the DMP code is a reverse engineered sample that the manufacturer will not release actual documentation on. So it is a gamble to begin with.

That being said, I usually reset the FIFO buffer after every read. I get an occasional over flow (1-2 per minute) with a lot of other code running at the same time, and NOT using interrupts. The resulting AHRS data is reliable and solid (UNO) at default rate (100hz). Ive lowered the AHRS rate (you have to modify data tables in a .H file) and I get the same error rate, it seems to have no effect.

As far as line lengths go, it is I2C. It is some magical combination of wire size and length, internal pull up resistors plus external ones. I have usually heard people have success adding some pull-up resistors I2C is a ground sink signal - so it doesn't care if it is 5 volts or 3.3 - only that everything on the bus be the same. Obviously you will do better at 5V on a longer line vs 3.3V. Some will argue the pull ups need to be at termination, some say it doesn't matter. I don't know anything other than the spec is very hard to understand and I have not had problems, especially the kind that require some of the elaborate schemes some people come up with (replacing caps and resistors).

Anyhow, 2 meters would seem to be pushing an Integrated circuit to Integrated circuit spec beyond what it was intended for, communication within a board. You might get it to work, but you also might rethink it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.