Does being at high altitude may affect the throttle input in rise of quad?

Hello guys,
It's Rushi again. Still struggling with my copter F450. Well I am using KK 2.0 flight controller, instead I am making my own referring to online codes.

Here is the situation,

  1. I am testing my copter on "first floor of my house" around 10-15 ft off the above the ground. i.e I am trying to take off at the altitude. And my copter is not taking off at all. It's not lifting off but spins a lil. Well it spun a lot before but I managed to reduce it using PID gains.
    I am increasing throttle input up to 50-60% still no lift instead some of these motors try to increase speed and copter flipping out.
  2. Also I am testing it on flat surface, clean tile. Like no rough surface. From my lessons of aerodynamics I have a feeling that this could one of the issues.

I don't know what's wrong with the configuration.

Following is my configuration:
Frame : F450
A2212 1000KV motors
3s LiPo battery - 2200mAh
30A ESCs, well calibrated
10"x45" props

M1 - Front right - CCW
M2 - Rear right - CW
M3 - Rear left - CCW
M4 - Front left - CW

I am attaching the code here. Please any suggestions. Thank you.

YMFC-AL_Flight_controller.ino (40.3 KB)

I am not clear whether the problems you describe are happening with the KK2 board or your own system.

Silly questions, but they need to be asked :

Are the motors turning in the right directions ?
Have you got the correct props fitted to match the motor directions ?

You do not say what altitude you are at, but increasing altitude, but not just 15 feet, will reduce the efficiency of the propellers but the quad should still fly. What motors are you using ? The surface on which the quad is resting should not affect its performance to the extent that it will not lift off.

UKHeliBob:
I am not clear whether the problems you describe are happening with the KK2 board or your own system.

Silly questions, but they need to be asked :

Are the motors turning in the right directions ?
Have you got the correct props fitted to match the motor directions ?

You do not say what altitude you are at, but increasing altitude, but not just 15 feet, will reduce the efficiency of the propellers but the quad should still fly. What motors are you using ? The surface on which the quad is resting should not affect its performance to the extent that it will not lift off.

Thanks. Sorry I typed it incorrect. i am not* using KK2 board. I made Flight controller using arduino and MPU6050, wired them up.
I've verified the motors direction and props many times but will go through it once again.
I am using A2212 13T 1000KV motors btw.
Still, please correct me if wrong with the following:

propeller - 10" x 4.5"
M1 (ccw) -Front right - CCW - CCW normal prop
M2 ( cw) - Rear right - CW - pusher prop with "R" after "10x45"
M3 (ccw) - Rear left - CCW - CCW normal prop
M4 (cw ) - Front left - CW - pusher prop with "R" after "10x45"

Is this correct?

The motor directions are correct for a KK2 and every other flight controller that I have seen. As to the props, when they turn is the leading edge higher than the trailing edge on each blade ?

Did you fix the problem noted in your other thread pointed out by johnwasser ?

   esc_1 = throttle - pid_output_pitch
   esc_2 = throttle + pid_output_pitch
   esc_3 = throttle - pid_output_pitch
   esc_4 = throttle - pid_output_pitch

In fact, why did you start a new thread at all ?

UKHeliBob:
The motor directions are correct for a KK2 and every other flight controller that I have seen. As to the props, when they turn is the leading edge higher than the trailing edge on each blade ?

Did you fix the problem noted in your other thread pointed out by johnwasser ?

   esc_1 = throttle - pid_output_pitch

esc_2 = throttle + pid_output_pitch
  esc_3 = throttle - pid_output_pitch
  esc_4 = throttle - pid_output_pitch




In fact, why did you start a new thread at all ?

Yeah, well about signs ,
"esc_1 = throttle - pid_output_pitch + pid_output_roll - pid_output_yaw; //Calculate the pulse for esc 1 (front-right - CCW)
esc_2 = throttle + pid_output_pitch + pid_output_roll + pid_output_yaw; //Calculate the pulse for esc 2 (rear-right - CW)
esc_3 = throttle + pid_output_pitch - pid_output_roll - pid_output_yaw; //Calculate the pulse for esc 3 (rear-left - CCW)
esc_4 = throttle - pid_output_pitch - pid_output_roll + pid_output_yaw; //Calculate the pulse for esc 4 (front-left - CW)
"
This is the original one with pids as follows: P_roll - 1.3; I_roll - 0.04; D_roll - 15; P_yaw - 4.0; I_yaw - 0.02; D_yaw - 0. same values for pitch as for roll.

with this code, my quad was bumping at start right at around 15-20% throttle. Then I recalibrated escs same issue.
So iterated lil bit changing the signs and finally got bit stable with this ones:
"esc_1 = throttle + pid_output_pitch + pid_output_roll - pid_output_yaw; //Calculate the pulse for esc 1 (front-right - CCW)
esc_2 = throttle + pid_output_pitch + pid_output_roll + pid_output_yaw; //Calculate the pulse for esc 2 (rear-right - CW)
esc_3 = throttle + pid_output_pitch + pid_output_roll - pid_output_yaw; //Calculate the pulse for esc 3 (rear-left - CCW)
esc_4 = throttle + pid_output_pitch + pid_output_roll + pid_output_yaw; //Calculate the pulse for esc 4 (front-left - CW)
"
with pids - P_roll - 2.1; I_roll - 0.04; D_roll - 0.3; P_yaw - 3.5; I_yaw - 0.02; D_yaw - 0. same values for pitch as for roll, I get stable system. like it doesn't yaw too much when I am trying to lift off even after 40-50% it remains quite stable BUT IT DOESN'T LIFT OFF AT ALL.

Also one more question is running in my mind. For a normal quad, what is usual throttle input to get lift off. I understand it is depends up on weight but on average after what throttle input will quad start to hover?

I get stable system. like it doesn't when I am trying to lift of even after 40-50% it remains quite stable but doesn't lift off.

I am still suspicious about which props you have mounted on which motor. They must, of course, match the motor rotation.

For a normal quad, what is usual throttle input to get lift off. I understand it is depends up on weight but on average after what throttle input will quad start to hover?

There are too many variables to be able to provide a sensible answer.

One of my 250 quads lifts off at about 1/4 throttle whilst the other lifts off at 1/2 throttle, Different motors and different props on each. The throttle input needed to lift off is irrelevant if you think about it.

rushimw:
So iterated lil bit changing the signs and finally got bit stable with this ones:

esc_1 = throttle + pid_output_pitch + pid_output_roll - pid_output_yaw; //Calculate the pulse for esc 1 (front-right - CCW)

esc_2 = throttle + pid_output_pitch + pid_output_roll + pid_output_yaw; //Calculate the pulse for esc 2 (rear-right - CW)
esc_3 = throttle + pid_output_pitch + pid_output_roll - pid_output_yaw; //Calculate the pulse for esc 3 (rear-left - CCW)
esc_4 = throttle + pid_output_pitch + pid_output_roll + pid_output_yaw; //Calculate the pulse for esc 4 (front-left - CW)

For a quadcopter in X configuration (as yours is), for each of the roll, pitch and yaw corrections, you will always add the correction to 2 motors, and subtract it from 2.
Here you are adding the roll and pitch correction to all motors.

This won't necessarily prevent your quad from lifting off but it will almost certainly prevent it from not crashing if you do manage to lift off.

EDIT: do you understand why you can't add the correction to all motors?

Maybe you need a 4s or 5s battery.

Southpark:
Maybe you need a 4s or 5s battery.

It is unlikely that that throwing more volts at the problem will solve it.

UKHeliBob:
It is unlikely that that throwing more volts at the problem will solve it.

I thought of that actually. However, I am observing it's behavior while varying pids, it is taking bit efforts to lift off. like it wants to lift off but something is dragging it down. My best guess is LiPo 3s 2200mAh battery is quite heavy. But as I read online, config is ok. F450 frame, A2212 13T 1000KV motors, 30A escs, 10x45 props. Coz it only has battery that heavy others are only arduino, mpu6050, receiver and wiring that's all.

Btw do you guys this configuration is ok or i need upgrade something in it.
Following is the observation:

p_roll I_roll D_roll P_yaw i_yaw d_yaw signs result
2.1 0.04 0.3 3.5 0.02 0 "q+ + -
q+ + +
q+ + -
q+ + +" unstable, lifts from one side
2.1 0.04 0.3 3.5 0.02 0 "q- + -
q+ + +
q- + -
q+ + +" "stable, but bad rolling"
2.1 0.04 0.3 3.5 0.02 0 "q- + -
q+ - +
q- + - Stable no lift
q+ - +"
1.5 0.04 1.5 3.5 0.02 0 "q- + -
q+ + +
q- + -
q+ + +" bad rolling and pitch
1.3 0.04 18 4 0.02 0 "q- + -
q+ + +
q- + -
q+ + +" good throttle up to 60%

ignore "q", signs are these "esc_1 = throttle + pid_output_pitch + pid_output_roll - pid_output_yaw;".

I don't know where I am wrong but circuit seems ok, coz receiver signal checks out, gyro checks out, motors spinning in right directions.

Have you got a commercial flight controller that you can test the quad with ?

UKHeliBob:
Have you got a commercial flight controller that you can test the quad with ?

No unfortunately, I am doing it on arduino and MPU6050. just want to learn coding for dynamics.