Hi, I've built a home made Arduino Quadcopter and made a video log of the build. The fligt time is about 30 minutes and the motor-to-motor size is about 152".
Enjoy! https://www.youtube.com/watch?v=xUMeya-8dFQ
Thank you, all the anwsers to your questions can be found in the video + description.
But to give som quick anwsers:
Weight: 1054g
Motor kv rating: 1200
Prop diam: 10"
Battery capacity (total): 7400mAh @3s
The x, and y-angle are calculated by using the component of the gravitational force in each direction (this is measured by the accelerometer). That comes down to the expression:
x_angle=atan(x_component/sqrt(y_component^2+z_component^2))
y_angle=atan(y_component/sqrt(x_component^2+z_component^2))
The z- angle (yaw) has to be calculated by integrating the rate of change of the z-angle. This is because the acceleromter cannot measure changes to the z-angle (you need a magnetometer for this), so what you do is you integrate the z-angle velocity given by the gyro. It simply comes down to the expression:
z_angle = z_angle + z_angle_rate*dt
These angles are then plugged in to the PID-regulation (for the P and I term as described in my last post), and for the D-term you only use the angle-rate of change (deg/s).
Yes, I use a MPU6050, that is an IMU with both accelerometer and gyro.
I use data from both the accelerometer and gyro in the filter to get less noise and better accuracy in the angle-estimates.