ESC stop the brushless DC motor when controlling it with Joystick.

Thread Starter

datdang

Joined Feb 21, 2023
26
Hi everyone,

I use a joystick to control brushless DC through an ESC . I use ESC-12A, Brushless DC motor 1104 -4300kV, arduino Nano. I have calibrated the brushless DC motor to control it through ESC with max and min PWM, 1000us and 2000us. When I push up the joystick slowly to increase the speed of motor, it works normally and the motor can run with max and min speed. But sometimes when I control the joystick too fast or too slow, the motor stops working and I hear three beeps from ESC. So this can cause a big problem that suddenly stop the motor if I do not control the joystick properly . Anyone can suggest any solution to solve this problem. The code posted below used to control brushless DC motor :
#include <Servo.h>

Servo ESC; // create servo object to control the ESC

int potValue; // value from the analog pin


void setup() {
Serial.begin(9600);
ESC.attach(3,1000,2000); // (pin, min pulse width, max pulse width in microseconds)
}

void loop() {
int potValue=analogRead(A0);
potValue=map(potValue,550,1023,0,180);
ESC.write(potValue); // Send the signal to the ESC
Serial.println(potValue);

}
I use pin 3 of arduino nano to generate PWM, the power supplied to ESC is from a power adapter (5V-2A).
Thank so much to help me solve out this problem.
 

LowQCab

Joined Nov 6, 2012
3,560
Building your own DIY FC ( Flight-Controller ), is not a beginner project, they are highly complex.

The biggest advantage to using a commercially available FC is the
well documented, and extremely versatile, Software that they are designed to run on.
The 2 most popular ones are "Beta-Flight" and "Inav".
I prefer "Inav".

And, they are dirt-cheap, as little as ~$15.oo .

The ESCs have their own customizable Software, ( usually "BL-Heli-32" ),
but this is not something that You should mess-around with if You are new to this Hobby.
99.9% of ESCs work perfectly, right out of the box,
there is generally no need for any adjustment,
and very little advantage to be had by making any adjustments.

The manufacturers try to make these ESCs and FC as universal as possible,
but there are unavoidable complexities that must be
understood about how they normally operate together.
.
.
.
 
Top