MPU 5060

Ok, so I am using a gyroscope in order to control the movement of a stepper motor. Everything works fine for a while and does what it's suppose to until suddenly it just stops.
I wrote the values being outputted by the mpu to the Arduino monitor box and I found that the values just stop generating!!!
I have tried putting the mpu on 3.3 and 5 volts on the arduino and this did not help(The mpu is designed for 5 or 3.3 volts-it has a built in resistor).

Does anyone know what is wrong or how I could fix it, I don't see why this is happening.

In what way are you "reading" your sensor - by using any libraries ? If you are using MPU6050 library to read DMP , you;re getting FIFO overflow. Same happended to me and nothing worked. If you're using any Serial.print statements, use highest baudrate avaible. Then, if youre using library from : MPU-6050 6-axis accelerometer/gyroscope | I2C Device Library you can open the file called " MPU6050_6Axis_MotionApps20.h " , go to line no. 305 and modify last value . You'll se a comment uder this value explaining everything. This is called DMP FIFO rate . Make last number bigger and you'll get more time for other stuff in your program. I went as high as 0x63 but it didn't solve my problem so now I'm reading basic RAW values and using Kalman filtering - works perfekt for me :slight_smile:

Thank you so much, this helped great. I increased the value in the library to x09 which is sufficient for now, it takes a whole for it to stop reading now but still maintains data.

Thank you :slight_smile:

You can play with this value and see how MPU's response time is changing. To obtain this value, use the formula given in comment and convert it's result to HEX ( you can find plenty online DEC to HEX converters :slight_smile: ) .

Thanks all try adjusting the values