RC India
Welcome Guest, please login or register.
 
Pages: [1]   Go Down
0 Members and 1 Guest are viewing this topic. Topic Tools Topic Tools 
Read
« on: August 11, 2019, 09:40:39 PM »
Suvnkr
Heli Lover
Active Member
**

Reputation Power: 1 
Suvnkr has no influence.
Offline Offline

City: kolkata
State: West Bengal
RC Skills: Beginner
Posts: 1
Join Date: Aug, 2019




Hello guys,
     Hope y'all doing well. I am building a quadcopter. Since I am new to the programming and circuitry I am following YMFC-AL and his programs. It is quite easy to understand. But anyway I came across this serious problem with the bumped start.

According to Brokking's procedure, my all tests, calibrations go well.
like the receiver, signals check out, gyro checks out. Furthermore while ESC's calibration, they calibrate successfully. Also after calibration, with "ESC calibration" program inside Arduino all motors run at equal speed when I gradually increase throttle. Until this everything works just fine.

But after uploading flight controller program, it gets worse right at the beginning.
1) I connect the battery upon which everything calibrates, and it waits for receiver signal to start.
2) When I start it (Throttle low and yaw left then throttle center and yaw center) all motors start at the same speed except one motor at pin 6 (PORTD |= B11110000) keeps on increasing to double the speed of other motors even if the throttle is at low and results into bumping of the copter. I lost one propeller due to that.
Here is the copter startup piece of code for reference:

//For starting the motors: throttle low and yaw left (step 1).
 if(receiver_input_channel_3 < 1050 && receiver_input_channel_4 < 1050)start = 1;
 //When yaw stick is back in the center position start the motors (step 2).
 if(start == 1 && receiver_input_channel_3 < 1050 && receiver_input_channel_4 > 1450){
   start = 2;
'
'
'
throttle = receiver_input_channel_3;                                      //We need the throttle signal as a base signal.

 if (start == 2){                                                          //The motors are started.
   if (throttle > 1400) throttle = 1400;                                   //We need some room to keep full control at full throttle.
   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)

   if (battery_voltage < 1240 && battery_voltage > 800){                   //Is the battery connected?
     esc_1 += esc_1 * ((1240 - battery_voltage)/(float)3500);              //Compensate the esc-1 pulse for voltage drop.
     esc_2 += esc_2 * ((1240 - battery_voltage)/(float)3500);              //Compensate the esc-2 pulse for voltage drop.
     esc_3 += esc_3 * ((1240 - battery_voltage)/(float)3500);              //Compensate the esc-3 pulse for voltage drop.
     esc_4 += esc_4 * ((1240 - battery_voltage)/(float)3500);              //Compensate the esc-4 pulse for voltage drop.
   }

   if (esc_1 < 1100) esc_1 = 1100;                                         //Keep the motors running.
   if (esc_2 < 1100) esc_2 = 1100;                                         //Keep the motors running.
   if (esc_3 < 1100) esc_3 = 1100;                                         //Keep the motors running.
   if (esc_4 < 1100) esc_4 = 1100;                                         //Keep the motors running.

   if(esc_1 > 2000)esc_1 = 2000;                                           //Limit the esc-1 pulse to 2000us.
   if(esc_2 > 2000)esc_2 = 2000;                                           //Limit the esc-2 pulse to 2000us.
   if(esc_3 > 2000)esc_3 = 2000;                                           //Limit the esc-3 pulse to 2000us.
   if(esc_4 > 2000)esc_4 = 2000;                                           //Limit the esc-4 pulse to 2000us. 
 }

 else{
   esc_1 = 1000;                                                           //If start is not 2 keep a 1000us pulse for ess-1.
   esc_2 = 1000;                                                           //If start is not 2 keep a 1000us pulse for ess-2.
   esc_3 = 1000;                                                           //If start is not 2 keep a 1000us pulse for ess-3.
   esc_4 = 1000;                                                           //If start is not 2 keep a 1000us pulse for ess-4.
 }

About my setup, I am using SimonK ESCs.

I know this is a very long-ass passage, and I apologize for that but I am trying to put here my scenario. I even got many cuts on hands and face due to propellers (10x45).

Please suggest to me what's going on here. Is it the program or escs or something else.

I am attaching every bit of code I used in this project...please look through it suggests what can I do.

Thanks in advance.

* YMFC-AL_setup.pdf (83.34 KB - downloaded 167 times.)
This post has 2 more images(s)/attachment(s). Please login or register to view them.
Logged
 

Pages: [1]   Go Up
Jump to:  

Related Topics
Subject Started by Replies Views Last post
My First Quadcopter start - are specs okay or pros suggest any change? « 1 2  All »
Beginners Zone
angad305 48 20584 Last post January 05, 2016, 06:57:15 AM
by Darshan for multirotors
Cx20 quadcopter crashed and damaged body
Multirotors
krupashree 8 3673 Last post April 21, 2016, 11:38:25 AM
by Rathi
Cox 0.049 sure start propeller and fuel tank needed.
Fuel and Engines
v2 eagle 0 3144 Last post February 24, 2017, 11:07:10 AM
by v2 eagle
Quadcopter PID Tuning - Where to start ?
Multirotors
anilkunchalaece 11 3698 Last post March 17, 2019, 06:10:16 PM
by SKY KALAI
10 * 4.5 Quadcopter Propeller (CW,CCW)
For Sale
Shradhanjali das 0 332 Last post April 19, 2021, 04:24:59 PM
by Shradhanjali das