MPU-6050 Redux: DMP Data Fusion vs. Complementary Filter

MPU-6050 on GY521 breakout board.
MPU-6050 on GY521 breakout board.

I’ve been using the GY-521 IMU breakout board containing Invensense’s MPU-6050 IMU to compute orientation in my self-balancing scooter (the “Halfway”). I’d like to improve the scooter’s performance on hills and uneven surfaces.  I thought I’d revisit the fusion algorithm which combines gyroscope and accelerometer data to compute the scooter’s tilt angle.  The initial code for the Halfway used a complementary filter algorithm, explained in an earlier blog post.  Accelerometer data is noisy on short time scales, and gyroscope data drifts on longer timescales, so the complementary filter combines both for greater accuracy.  However, the MPU-6050 contains a digital motion processor (DMP) which can perform the data fusion on the IMU chip iteslf.

Read moreMPU-6050 Redux: DMP Data Fusion vs. Complementary Filter

The “Halfway” – A Self-Balancing Scooter

Ready to take the "Halfway" for a test drive. Bike helmet essential for safety.
Ready to test drive the “Halfway”. Bike helmet essential for safety.

This latest project is the longest and most complicated so far.  Over the last several months I’ve been working to put together a Segway-like self-balancing scooter, aka the “Halfway”.  Many people have written up and posted similar projects online.  Google “DIY self balancing scooter” to see some examples.  Other people’s work provided a lot of inspiration and help during the design and execution of the Halfway scooter.  If you’d like to see how it turned out, skip to the end of this blog post for a video of the Halfway in action.

This particular project was appealing to me because it utilized elements from my earlier blog posts, such as obtaining angle data from an IMU and integrating a Wii nunchuck with an Arduino.  I also got to learn some new skills, including welding metal, CAD with Google Sketchup and programming with PID control loops.

Read moreThe “Halfway” – A Self-Balancing Scooter