JohanIsaksson / Quadcopter

0 stars 0 forks source link

Arduino MPU6050 Height Control #1

Open erolaksoy opened 5 years ago

erolaksoy commented 5 years ago

Trying to do quadcopter with arduino. I was unable to stabilize the MPU6050. How to stabilize the floor to a height of 20 cm from the ground. I'd appreciate it if you could help me out.

4 DC MOTOR ARDUINO PRO MICRO MPU 6050

JohanIsaksson commented 5 years ago

You can estimate the attitude of the quadcopter using the accelerometer and gyroscope on the MPU6050. Have a look at the functions in kod/Explorer2/imu.cpp (especially those named MPU6050 and ComplementaryFilter) for some inspiration. For controlling the height you need additional sensors. I use the barometer MS5611 and a kalman filter to estimate the altitude. My implementation in kod/Explorer2/kalman.cpp is unfortunately too computationally expensive and can't be ran in real time on your choice of arduino. I can't run on my arduino zero either so I must try to optimize it when I get time.