…but the MPU6050 is still playing up

The MPU6050 is the gyro + accel sensor. I have a new version (same chip, different breakout board) which should mean it’s better pinned to the breadboard.

ProtoPi + MPU6050 Breadboard

ProtoPi with new MPU6050 + RPIO PWM

I’ve incorporated the code change to make sure the DLPF (digital low pass filter) takes effect…

and actually, the results are looking a lot better, except for this…

Vertical acceleration and speed

Vertical acceleration and integrated speed

So the prototype (ProtoPi) was sitting on the desktop, going nowhere. The accelerometer looks very good – the acceleration (navy blue) is integrating to a flat line vertical speed (pink), which means the sensors are nicely balanced. Except of course when one of those whopping spikes appears which throw the vertical speed integration way out (meaning that the drone thought it started travelling at 0 cm/s vertically, then dropped at 20cm/s before descending further to 80cm/s. If this was a live run, the PIDs would try to counteract these dodgy readings, powering up the motors and slapping the drone head-firstĀ into the ceiling!!!

I have to assume these are garbage reads from the MPU6050, even though the code now has interrupt handling to only read the data when it’s ready and waiting.

So I’m throwing this out to the world at large for suggestions…please, I beg you!

4 thoughts on “…but the MPU6050 is still playing up

  1. Hi, I’m really interested in your project, especially in the noise reduction of the MPU6050 chip.
    Would it be possible to have the code? I’m working on an autonomous robot, and I’m struggling to get gyro reads on Python with this chip.

    Thanks and good work,

    • Hi Francesco,

      I’m planning to put the code up on github once it’s working – hopefully in the next day or two depending on the weather. I’ll probably also post it here on the blog.



Leave a Reply to Francesco Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.