Hey guys, I'm at present working on a quadcopter sans a flight controller and i'm having trouble to stabilize the quad despite having a 9 DOF IMU GY-80 sensor mounted on top of it.I tried getting the values of gyro through I2C and added a low-pass filter for the pitch and roll values.
I implemented simple if loops to check the condition of pitch and roll values to control the speed of the motor using ESC by changing the pulse(PWM) value to the ESC.
The problem that i'm facing is that the quad is just not that responsive and tends to drift off to a side which in real time might lead it to crash.
The weight distribution is almost symmetrical barring the few wires that are on one side of the quad.So,i thought implementing a PID would resolve the problem that i'm struck with.
I'm confused as to how to implement the PID into the quad...
Input- GY 80
Output - PWM of 4 motors....
will the issue of lag in response be resolved if i use a PID?? Pls brief me about the nuances of using a PID in Arduino for my scenario.
Thanks a lot,
Prady.