Using GY-521 MPU6050 In Quadcopter

hi all,

I recently took on building a quadcopter from scratch using an arduino as a controller. I am attempting to use the GY-521 as the accelerometer/gyro for stability. It uses the MPU6050 from ivansense but i am struggling with all the information available.

I have used the code offered on the arduino playground to get it outputting the accelerometer angle, however, this is not accurate once you start laterally moving the sensor. I was going to attempt to implement the code offered on this page (A Guide To using IMU (Accelerometer and Gyroscope Devices) in Embedded Applications. – Starlino Electronics), would this correct for the lateral motion? The MPU6050 also claims to have MotionFusion MPU, but what does this actually mean, and how do you access the data from it?

I want to measure the inclination of the device, without interference from lateral motion, any additonal ideas would be greatly appreciated.

andrew

There is a library from Jeff Rowberg that will likely be of help:

It leverages the DMP (Digital Motion Processor) - here is an example that helped me get it going:

The device measures acceleration. Using the device to measure the direction of gravity, depends on an assumption that the device is not actually accelerating anywhere. In practise, it is almost impossible to determine which way is down, if the device has any actual acceleration.