Hi,
I am trying to control an ESC connected to a brushless motor with the help of Arduino.
The purpose of my program is just to familiarize myself with controlling the speed of the motor.
My esc is connected to a pwm pin and the program sends different output values using ESC.write(value); (from the Servo library);
From what I understood, the write() function can have 0-179 as an argument, 0 being full reverse throttle, 90 being stop, 179 being full FW throttle. Now when I tell the ESC to run at certain values, it does not respond at all sometimes, and it works some other times. It has a very unpredictable behavior and I am not sure which values work (yet alone if I'm doing the right thing with write() ).
Here is my code:
#include <Servo.h>
Servo esc;
void setup() {
esc.attach(9);
}
void loop() {
int throttle;
for(throttle = 90; throttle < 179; throttle++)
{
esc.write(throttle);
delay(100);
}
}
The ESC and motor is here:
http://alienpowersystem.com/shop/esc/alien-120a-2-7s-ev-mini-esc-bec/
http://alienpowersystem.com/shop/brushless-motors/alien-5065-sensored-outrunner-brushless-motor-220kv-2200w/
Thanks!
I am trying to control an ESC connected to a brushless motor with the help of Arduino.
The purpose of my program is just to familiarize myself with controlling the speed of the motor.
My esc is connected to a pwm pin and the program sends different output values using ESC.write(value); (from the Servo library);
From what I understood, the write() function can have 0-179 as an argument, 0 being full reverse throttle, 90 being stop, 179 being full FW throttle. Now when I tell the ESC to run at certain values, it does not respond at all sometimes, and it works some other times. It has a very unpredictable behavior and I am not sure which values work (yet alone if I'm doing the right thing with write() ).
Here is my code:
#include <Servo.h>
Servo esc;
void setup() {
esc.attach(9);
}
void loop() {
int throttle;
for(throttle = 90; throttle < 179; throttle++)
{
esc.write(throttle);
delay(100);
}
}
The ESC and motor is here:
http://alienpowersystem.com/shop/esc/alien-120a-2-7s-ev-mini-esc-bec/
http://alienpowersystem.com/shop/brushless-motors/alien-5065-sensored-outrunner-brushless-motor-220kv-2200w/
Thanks!