Brushless Motors turn off before reaching 40% of their speed.

im doing a quadcopter flight controller project and I have been having a problem with my motors. Im using 4 of them and when i try to turn them on, i can increase all quad motors to about 30% or so and some of the motors would turn off. im using arduino nano.

this is the battery: ​Amazon.com

the ESC: ​Amazon.com

the PDB:​Amazon.com

The motors: ​Amazon.com

all motors get the same write. which is Servo.writeMicroseconds (**somee microseconds); I also tried using a 4 in 1 ESC but that didnt work. i noticed when testing out a PDB with Leds that if i increase the speed of the motors, the PDB's(power distribution board) led gets quite dim so im guessing a possible hardware problem but im not sure.

here is the code related to the motors.

#include <Servo.h>


int Motor1Analog_1=3;
int Motor1Analog_2=9;;
int Motor1Analog_3=10;
int Motor1Analog_4=11;

setup(){
  ESC.attach(Motor1ESC , MinMicroSeconds_Motor , MaxMicroSeconds_Motor); //1000  to 2000
 ESC2.attach(Motor2ESC , MinMicroSeconds_Motor , MaxMicroSeconds_Motor);//
 ESC3.attach(Motor3ESC , MinMicroSeconds_Motor , MaxMicroSeconds_Motor);
  ESC4.attach(Motor4ESC , MinMicroSeconds_Motor , MaxMicroSeconds_Motor);
}

void loop() {
SetMotorsSpeed();
  }
  void SetMotorsSpeed(){
   

    Motor_1_Speed=map(Motor_1_Speed,1000000,2000000,1000,2000);
    Motor_2_Speed=map(Motor_2_Speed,1000000,2000000,1000,2000);
    Motor_3_Speed=map(Motor_3_Speed,1000000,2000000,1000,2000);
    Motor_4_Speed=map(Motor_4_Speed,1000000,2000000,1000,2000)

  //Serial.print("   Motor1: ");  Serial.print(Motor_1_Speed);
 // Serial.print("   Motor2: ");  Serial.print(Motor_2_Speed);
  //Serial.print("   Motor3: ");  Serial.print(Motor_3_Speed);
//  Serial.print("   Motor4: ");Serial.println(Motor_4_Speed);

   //analogWrite(Motor1Analog_1,Motor_1_Speed);
   //analogWrite(Motor1Analog_2,Motor_2_Speed);
   //analogWrite(Motor1Analog_3,Motor_3_Speed);
   //analogWrite(Motor1Analog_4,Motor_4_Speed);
   ESC.writeMicroseconds(Motor_1_Speed);
   ESC2.writeMicroseconds(Motor_2_Speed); 
   ESC3.writeMicroseconds(Motor_3_Speed); 
   ESC4.writeMicroseconds(Motor_4_Speed);  
}

and while we are at it, i tried switching to analogwrite instead of servo.write microseconds by mapping the values to 0 to 255 range. the results were pretty bad. the motors no longer sync and turn off and on seemingly at random. if anyone know the possible cause, that would be great.

PWM doesn't work because a standard PWM signal is nothing like the 50Hz 1-2ms servo signal the ESCs are expecting.

Other than it could be a component mismatch e.g. you have a battery rated for 36A (but in the real world probably capable of about 20A if you're lucky) driving 4 x 35A ESCs (140A total)...that doesn't sound right to me. So the first thing you need to do is measure what current the motors are actually taking. Until you know that it's all just guesswork.

The code snippet you posted is pretty useless because it misses out most of the definitions e.g. where did ESC, ESC2 etc suddenly come from and what are the min and max values you're using? I could guess but I'm not going to waste my time.

Steve

slipstick:
PWM doesn't work because a standard PWM signal is nothing like the 50Hz 1-2ms servo signal the ESCs are expecting.

Other than it could be a component mismatch e.g. you have a battery rated for 36A (but in the real world probably capable of about 20A if you're lucky) driving 4 x 35A ESCs (140A total)...that doesn't sound right to me. So the first thing you need to do is measure what current the motors are actually taking. Until you know that it's all just guesswork.

The code snippet you posted is pretty useless because it misses out most of the definitions e.g. where did ESC, ESC2 etc suddenly come from and what are the min and max values you're using? I could guess but I'm not going to waste my time.

Steve

the min and max is commented next to the code itself. " 1000 to 2000". ESC is just Servo objects.

#include <Servo.h>



Servo ESC;
Servo ESC2;
Servo ESC3;
Servo ESC4;

const int Motor1ESC=3;    //5;
const int Motor2ESC=9;;   //8;
const int Motor3ESC=10;   //7;
const int Motor4ESC=11;  //6;



double Motor_1_Speed=0;
double Motor_2_Speed=0;
double Motor_3_Speed=0;
double Motor_4_Speed=0;
double MinMicroSeconds_Motor=1000;    //Max MicroSeconds write for the Servo.
double MaxMicroSeconds_Motor=2000;     //Min Micro Seconds Write for the Servo.


/// Same as Motor1ESC. we have both just for testing.
int Motor1Analog_1=3;
int Motor1Analog_2=9;;
int Motor1Analog_3=10;
int Motor1Analog_4=11;

setup(){
   pinMode(Motor1ESC,OUTPUT); 
  pinMode(Motor2ESC,OUTPUT);
  pinMode(Motor3ESC,OUTPUT);
    pinMode(Motor4ESC,OUTPUT);

  ESC.attach(Motor1ESC , MinMicroSeconds_Motor , MaxMicroSeconds_Motor); //1000  to 2000
 ESC2.attach(Motor2ESC , MinMicroSeconds_Motor , MaxMicroSeconds_Motor);//
 ESC3.attach(Motor3ESC , MinMicroSeconds_Motor , MaxMicroSeconds_Motor);
  ESC4.attach(Motor4ESC , MinMicroSeconds_Motor , MaxMicroSeconds_Motor);



}

void loop() {
SetMotorsSpeed();
  }
  void SetMotorsSpeed(){
  

 //Some unrelated Code Happens to change the Motor Speed from Zero. its unrelated because i tested the values before writing them and all are the same and range from 1000 to 2000 like expected.

    Motor_1_Speed=map(Motor_1_Speed,1000000,2000000,1000,2000);
    Motor_2_Speed=map(Motor_2_Speed,1000000,2000000,1000,2000);
    Motor_3_Speed=map(Motor_3_Speed,1000000,2000000,1000,2000);
    Motor_4_Speed=map(Motor_4_Speed,1000000,2000000,1000,2000)



                       //Serial.print("   Motor1: ");  Serial.print(Motor_1_Speed);
                      // Serial.print("   Motor2: ");  Serial.print(Motor_2_Speed);
                     //Serial.print("   Motor3: ");  Serial.print(Motor_3_Speed);
                    //  Serial.print("   Motor4: ");Serial.println(Motor_4_Speed);

                   //analogWrite(Motor1Analog_1,Motor_1_Speed);
                  //analogWrite(Motor1Analog_2,Motor_2_Speed);
                 //analogWrite(Motor1Analog_3,Motor_3_Speed);
                //analogWrite(Motor1Analog_4,Motor_4_Speed);

   ESC.writeMicroseconds(Motor_1_Speed);
   ESC2.writeMicroseconds(Motor_2_Speed);
   ESC3.writeMicroseconds(Motor_3_Speed);
   ESC4.writeMicroseconds(Motor_4_Speed); 
}

as for the battery, i picked up the battery that the motor creators suggested, 7.4v 2S. the motors are created specifically quadcopters and are sold in a pack of 4.

The motor creators suggested that 450mAh battery did they?

Do you have everything direct wired? You're not doing anything silly like trying to run all that power through a breadboard are you? The symptoms you describe sound exactly like what happens when your battery/power supply can't provide enough power or you have some high resistance connections that are limiting the current.

Where does the power for the Nano come from? Not that PDB that says it's for 3S/4S batteries NOT 2S?

Steve

slipstick:
The motor creators suggested that 450mAh battery did they?

Do you have everything direct wired? You're not doing anything silly like trying to run all that power through a breadboard are you? The symptoms you describe sound exactly like what happens when your battery/power supply can't provide enough power or you have some high resistance connections that are limiting the current.

Where does the power for the Nano come from? Not that PDB that says it's for 3S/4S batteries NOT 2S?

Steve

no mention of the suggested mah but yes, it says 7.4v 2S. everything is wired to PDB But i tested a 4 in 1 esc that takes 2S to 5S. same problem.

The capacity (mAh) (x the C-rating) determines how much current you can get from a battery. If they were using say 1800mAh and you're using one 1/4 the size that could explain a lot.

You didn't say where the power for the Nano is coming from.

Steve

arduino geet

slipstick:
The capacity (mAh) (x the C-rating) determines how much current you can get from a battery. If they were using say 1800mAh and you're using one 1/4 the size that could explain a lot.

You didn't say where the power for the Nano is coming from.

Steve

arduino gets its power from the PDB. it has a 5v output.

here is some info that i found about the motor:

Power: 50W
Max amps: 9A
Kv:8700

Battery:
80C

vortix2950:
arduino gets its power from the PDB. it has a 5v output.

Is that the same PDB as in your link? The one that says it's for 3S/4S batteries and specifically advises that it shouldn't be used with 2S batteries?

Try powering the Nano via USB and remove the cable between it and the PDB. See if that makes a difference.

Steve

slipstick:
Is that the same PDB as in your link? The one that says it's for 3S/4S batteries and specifically advises that it shouldn't be used with 2S batteries?

Try powering the Nano via USB and remove the cable between it and the PDB. See if that makes a difference.

Steve

tried it. no change. as i mentioned before, i tested the same setup using a 4 in 1 esc that takes 2S batteries. that ESC also has 7.4 output to power the arduino. same problem.

So if you can't measure the motor current and you can't try a more powerful battery, unless it's something really silly like your battery isn't fully charged, I've run out of ideas.

Good luck - Steve

slipstick:
So if you can't measure the motor current and you can't try a more powerful battery, unless it's something really silly like your battery isn't fully charged, I've run out of ideas.

Good luck - Steve

thank you for the help. i already ordered a stronger battery,ill see what happens.

Hi,
Do you have a DMM?

Tom.. :slight_smile:

TomGeorge:
Hi,
Do you have a DMM?

Tom.. :slight_smile:

yes, i do.
Also, correct me if im wrong but if the Motor is attached with 1000 min and 2000 max, than writing 2000 micro seconds would be max speed right? i switched to another battery that is weaker. 250 mAh , 20C. some motors still turn off at about 1250 microseconds write but they feel much faster than using the 450 mAh 80C battery. still not fast enough to really take off much but stronger for sure.

Setting values in attach() only affects what signal you send. It does not affect what ESC itself will react to. If the ESC wants 2400 for full speed then setting YOUR maximum to 2000 just means you never actually get full speed.

Steve