Burned ESC

Hi guys!

I burned my first ESC, and its killed the lipo battery too :frowning:

I want to know, what did i wrong, so i tell the story:

Used parts:

First i want to try to run full speed forward, it was succesfull… The motor run at full speed.

Then i make a change in the code:

ESC.attach(9,1000,2000); ---- changed to -----> ESC.attach(9,1000,1500);

THEN HAPPEND THE DISASTER… The ESC burned down under a few second…

Some background info:

  • I plug the Lipo into ESC, but the ESC switch in off postion(i think, in this position the ESC don’t get power from liPo) and i plug the arduino to PC trough USB cable. So the arduino get power from PC, the reciever get power from Arduino, and the ESC and the motor get power from the arduino too (it can be???)… Is this right?

  • there is an error in the program code (ch3 value) but i don’t think its cause the burning…

So please tell every mistake to learn from it…
Why it burned down??

  • Low quality chinese ESC???
  • mistake in the code???
#include <Servo.h>

int ch1;
int ch2;
int ch3;

Servo ESC;

void setup() {
  ESC.attach(9,1000,1500);

  pinMode(3, INPUT); 
  pinMode(5, INPUT);
  pinMode(6, INPUT);

  Serial.begin(9600); 

}

void loop() {

  ch1 = pulseIn(3, HIGH); 
  ch2 = pulseIn(5, HIGH); 
  ch3 = pulseIn(6, HIGH); 
  
  
  if (ch3 > 1650) {
    ch3 = map(ch3, 1001, 2000, 0, 180);
    ESC.write(ch3);
    Serial.println("Forward");
  
  }
  if ((ch3 < 1650) && (ch3 > 1350)){
    ESC.write(90);
    Serial.println("Break");
  }
  if (ch3 < 1350) {
    ch3 = map(ch3, 1001, 2000, 0, 180);
    ESC.write(ch3);
    Serial.println("Backward");
  
  }
 
  delay(100); 
}

Bummer that you burnt some components. That sucks. Usually when I burn a component, I am holding it at the time and burn myself in the process.

IF the wiring was connected correctly on both runs and
IF the motor was unloaded on both runs and
IF the throttle was low (1000)
then there is no reason for the ESC to burn out.

Killing the ESC and the battery makes me think that in addition to the simple change in code you noted (the different range for the servo object), you also introduced a short in your wiring.

A lot of this is guesswork.
Can you provide more details?
What capacity and voltage is your battery? You say 350Ah. Did you mean 350mAh?
Can you provide a wiring diagram? Pen, paper and a camera are good.

I have a few issues with your code.

You read ch3 from pin 6.
If ch3 is over 1650, you map it into a 0-180 range and write to the servo.
Then you test ch3 to see if it is between 1650 and 1350. If it originally was over 1650, you mapped it to 0-180, so it cannot be between.
Then you test ch3 to see if it is under 1350. If it was over 1650 originally, it MUST be below 1350 now since you mapped it to the 0-180 range so you map it again and write it to the servo.
Consider reading ch3 and then assigning the mapped value to a new variable and writing that new variable to the servo object. That way ch3 retains its original value for your multiple tests.

Thank you for the answer!

Yes! I know there is an error in the code, its true…

I attached an fritzing diagram…

  • 3S battery, 350mah, 11,1V 20C

Most people here prefer not using fritzing but yours shows most of the needed detail.
I assume that you have a ground from your Flysky receiver connected to the ground of the arduino.

A 320A speed control is a huge one for your small motor and small battery.

What values did your program print to the monitor when you had your first successful run?
What values did your program print to the monitor when you had your second unsuccessful run?

I assume that you have a ground from your Flysky receiver connected to the ground of the arduino.

Yes! Sorry, i forgot to draw it... And the 5V got too from the arduino...

A 320A speed control is a huge one for your small motor and small battery.

My motor isn't too small... 150W 12V 775 DC motor... Its a huge one with ~13-14A currency..

But! The burning can happen due the too small capacity battery??? (3S lipo, 350mah, 25C)

I don’t know what your code does. But it’ll be beneficial to check that your ‘if’ statement conditions covers EVERY case.

Eg. you write expressions like < 1650 etc.

So think about whether it’s important to write something like <= 1650 … in order to cover cases if by chance the value just so-happened to be 1650 … or 1350 etc.

Also ---- you have a delay(100) statement. So make sure this statement doesn’t hold up your program ----- since a ‘delay’ function - when it is running - actually stops other code from running - until that 100 milliseconds or so is finished. I think the PulseIn function is another function that holds up the program loop during execution.

The above might not be linked to the burning etc. It’s just some coding considerations.