Accelerometer or gyro?

Hi all,

I'm a student, currently doing my A2 level systems and control project, a quadcopter. I'm using a leonardo, with an MPU6050 and the rest of the standard quadcopter kit. The program is the focus of the project, as I'm basically writing it from scratch, but I've hit a bit of a brick wall when it comes to applying yaw control to the system. I can read the MPU6050 fine, but I'm unsure whether to use the Z axis gyro or accelerometer. And from that also unsure of how to apply it. Any ideas? The quad will be + configuration (much easier to program). I know the likelihood of it actually working is very slim, but I'm aiming to get as far as possible. At some point in the near future I will post pictures and code (everything works on its own so now is a matter of combining!) Any help would be hugely appreciated.

Thanks, Ollie.

Yaw is always complicated... You can't calculate its value from accelerometers. From gyros, it's possible but the estimated yaw will drift over time due to gyros biais. And you can't only use the z value because the yaw derivative is a function of the gyros reading as well as the current orientation of the sensor. If you can ensure that the MPU6050 will remain horizontal with no pitch and roll, then it becomes possible to only use the z value of the gyros.

If you want a stable estimation of the yaw, you'll have to correct its value using magnetometers.

Please do not cross-post.