controling brushless motor esc with external souce

Hello there, i want to control a brushless motor "A2212/13T" "1000KV" AND 30A esc.

I used an external source '"12v" not lipo battery.

the code that i use

#include <Servo.h>


Servo mymotor4;
 
void setup()
{
  Serial.begin(9600);
  
  mymotor4.attach(9);
 

}

void loop() //Main Loop
{
    if (Serial.available()>0) { // Pattern form: $tyyyy
        char mode=Serial.read();
        if (mode=='e') {
             Serial.print("yes ");
            mymotor4.write(150);
         
        }
        
        if (mode=='a') { 
              mymotor4.write(70); 
              Serial.println("armed motors");
        }
        
    }   
}

the problem that i can't control the speed of my motor it has a same speed when i set from mymotor4.write(90); until mymotor4.write(170); and the motor does't turn under the valu of 90.

is it due to the external source ?? should i use a lipo baterry to control the speed ??

LD0000460092.jpg

Typically, ESCs need to be armed. That involves waiting for it to beep, and then sending signals (write(something)) from 0 to 180, to discover where the ESC begins and ends responding. How have you armed/calibrated your ESC?

Do not cross post. There is a thread in Motors that other are responding to. That AC - DC adapter doesn't have nearly the current capability to run that ESC/motor combo.

edit: It appears to be another user in Motors (maybe). You two need to get together.

Hi Pauls, i don't know what do you mean by armed ?.
me i tried all the value from 0 to 180
so the value from 80 to 170 motor rotate
the value 180 and 0 from 70 motor doesn't rotate

so could you explaine me more about arming the esc ??

To arm the ESC, you must leave the throttle setting at minimum (1000us) for several seconds before it will respond to changes.

But your problem is your power supply. It won't provide enough power to run that motor.

Hi Pauls, i don't know what do you mean by armed ?.

Oh dear !

so could you explaine me more about arming the esc ??

As a safety measure to prevent brushless motors bursting into life at the wrong time, such as when RC systems are turned on, it is generally the case that the input to ESCs are required to be taken through a particular sequence of values in order to arm them. The final part of the arming sequence is usually to reduce the input to zero so that once armed the motor is stopped and ready for use.

Search for details on the Web for the arming sequence for your ESC.

Thanks and could you tell me how i control the motor have you a code ??
please

jone31:
Thanks and could you tell me how i control the motor have you a code ??
please

The first thing for you to do is to determine the arming sequence for the ESC

...and you need a lipo battery with the appropriate rating. 3S 1500ma 20C minimum.

Thanks, and there is no way to control brushless motor without the library servo.h ?

Lots of ways, but that is usually the easiest for most Arduino projects.