I build my quadcopter by using raspberrypi, MPU-6050 and PWM generator on attiny2313. All code is my except piece (i get it from opensource project from another quadcopter) responsible for calculating engines power to stabilise self/go in right direction.
On low power engines seems to work good (when banking left - left engines increasing speed, right - slows down and so on...) but when i'm about to flight he gets crazy. At the start he banks hard to the left, after that he pulls hard to the random directions. If anyone need i can upload movie how he behavies.
Code is in attachment.
I'm so frustrated that i can even pay for help.
Sorry for my bad English
No! Not at all! When he goes left (right side lifts) then speeding up right engines will result in deeper left bank. He must counter it so decrease right engines power and increase left. It seems he doing this (on low speed engine when i hold it reaction looks good), but too sharkly i think. Which parameters in my code are responsible for the intensity of the reaction? I think resolution will be smoother, but still fast enough reaction
If you bank left and the right motors reduce power how are you going to bank left, the quad will stay level
If you tilt the quad left with no input from the transmitter the left motors will speed up to try and level the quad
That is normal , if you tilt left and put in a left stick input the right motors speed up to hold the angle of the bank
There are no standard "sticks" or "transmitter" anyway. It's very own project. He receive commands in other way, but it doesn't matter.
However, let's start from the beginning. I'm slowly powering up engines (no requests to go on any direction. Just hover. After takeoff immediately he sharply goes left. Maybe it's ok, but when bank is so sharp he is uncontrollably. I need smoother behaviour. All code responsible for counting engines power is in code above