Hi everyone,
I am doing a project of quadcopter with Arduino as its controller. I have
a MPU6050,
1400Kv BLDC motors,
S500 Frame,
30A EMAX ESCs,
a 3300mah turnigy lipo battery,
with Arduino Mega 2560.
I have already written my code for it, referring the Arduino sketches available online in github. Also i am using the following libraries:
Servo (for my bldc motors),
MPU6050 ,
PID.
All these libraries were found in the Arduino playground.
I have a lot of questions to ask regarding my project.
- Why does my Arduino code stop after some time?
- My MPU6050 overflows very frequently(overflows for every 8-10 data got from the MPU).
- I am trying to tune my quadcopter for stability in single axis(pitch), but am not able to get the correct values for kp, ki, kd.
If i increase p gain slowly, the copter gets a constant oscillation(p-gain at about 0.12). But if i continue doing it, i get increasing oscillations eventually. But keeping p-gain(with constant oscillations) and increasing d-gain, the error increases and never settles.
Any help will be greatly appreciated, as i have to finish my project within 2 weeks.
Thanks in advance.
esc_pid_quad_alpha1.ino (6.04 KB)