BLDC clicking, struggling and shaking

Hello,
this is my first post on the forum though not my first visit. I am building a quadcopter and after a heroic battle with nrf24l01 modules which just turned out to be broken I finally managed to finish a remote controller and send output from thumb joysticks to the copter itself. Thanks to everyone taking time to help with those issues.

Now it’s time for me to actually use the output from the pilot and so I tried to make my motors move. They didn’t quite like it. Please, have a look:

I am changing throttle from 1000ms to 2000ms while filming. This behaviour seems to be more severe when 2000ms is applied but it also happens with 1000ms though it’s not that bad. It shouldn’t move at all though, right? Anyway I have no control over the rotation.

I am going to use 4 BLDCs at once but I am testing only one at a time. They are all behaving like this so this is probably not a matter of a broken ESC or motor.

I am powering those motors through a distribution board though as I said they didn’t yet have a chance to work all at once.

I have tried different pins and none makes it better.

I tried setting min and max throttle by starting with maximum throttle and then going to 0. I did this by increasing throttle to 2000ms and then powering up the ESC. When I start from 2000ms there is no beeping to confirm anything happened. The behaviour on the video only occurs when I start from 1000ms.

The Arduino Mega is powered from USB now the 5V and GND pins of ESC are not connected to it.

I can’t really find any documentation other than this:

http://yinyanmodel.com/EMAX%20User%20Instruction%20for%20Simonk%20Series%20ESC.pdf

but the beeping doesn’t create any patterns or changes multiple times during testing so I wouldn’t know how to diagnose the problem anyway.

This is my circuit:

This the ESC I’m using:

SimonK 30A
PWM frequencies: 50-490HZ
Voltage: 2S-3S
Motor frequency: 16kHZ

And this is the motor Tarot MT2205Ⅱ CCW/CW 2300KV - 3-4S - 300W - 8kHz - TAROT TL400H15:

This is my code:

//#include <PWM.h>

#include <Servo.h>
#include <nRF24L01.h>
#include <RF24.h>
#include <RF24_config.h>

RF24 radio (34,36);                
const byte adres[6]="pilot";
int data[4];
bool newData=false;
int time1=0,time2=0;
int dtime=1;

Servo ESC1;                        
int counter;
int throttle=1000;





void setup() { 
Serial.begin(9600);             
radio.begin();
radio.openReadingPipe(1,adres);
radio.setPALevel(RF24_PA_MIN);
radio.startListening();

ESC1.attach(12,1000,2000);    

                               
}

void loop() {
if(radio.available())
{
radio.read(&data,sizeof(data));
newData=true;
}
calculateThrottle();
showData();

ESC1.writeMicroseconds(throttle);

}
void calculateThrottle()
{
time1=millis();
if(data[3]>600&&throttle>1000)
{
  //time1=millis();
  if(time1-time2>=dtime)
  {
    time2=time1;
  throttle--;
  }
}
else
{
  if(data[3]<400&&throttle<2000)
  {
  //time1=millis();
  if(time1-time2>=dtime)
  {
    time2=time1;
    throttle++;
  }
  }
}
}

void showData() {
    if (newData == true) {
        Serial.print("LX= ");
        Serial.print(data[0]);
        Serial.print(" LY= ");
        Serial.print(data[1]);
        Serial.print(" RX= ");
        Serial.print(data[2]);
        Serial.print(" RY= ");
        Serial.print(data[3]);
        Serial.print(" Throttle= ");
        Serial.print(throttle);
        Serial.print("      ");
        Serial.print(time1);
        Serial.println();
        newData = false;
    }
}

My typical output on COM looks like this:

LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      2026
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      2127
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      2229
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      2329
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      2430
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      2532
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      2633
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      2735
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      2836
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      2937
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      3039
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      3140
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      3243
LX= 523 LY= 516 RX= 494 RY= 464 Throttle= 1000      3344

Does anyone know what this behaviour means and how to fix it?
Does anyone have any documentation to tell what is the min and max pulse width for this ESC?
What are the consequences of using 16kHz ESC with 8kHz motor?
Is it okay to use 50Hz PWM pin to control this ESC?

Okay so I'd rather not make an idiot of myself but I've been so pissed at this so I thought I'd share the solution I eventually came up with to save someone's nerves in the future. This may seem obvious but I just didn't know that the board (Arduino Mega in my case) has to be powered through BEC from one of the ESCs I use with the engines or as my friend noted, this is more about all components having the common ground. This perfectly solved all the problems with my BLDC.

What you hear is an audio warning tone from the ESC to indicate a problem.

Your ESCs will need an arming sequence before they fire up, its a safety feature to prevent loss of fingers
due to props spinning up when the battery is connected.

If you have a servo tester you can experiment to see what works, but typically taking the throttle back to
minimum for a little while, then returning to default (1500us), may do it. Typically once armed the ESC will beep a few tones as confirmation.

Then code the sequece up in setup()

Hello MarkT and thanks for replying. I am aware of the existence of arming sequence. For my ESCs it is simply lowering the throttle below 1000us. As I said, the whole problem was about not having everything connected to the common ground. I have been arming the motors the same way before and after fixing it and that doesn't seem to have been an issue. Anyway the important lesson for me was to always connect everything to the common ground. I know that might be obvious for most of you but maybe it will help another beginner like me someday :slight_smile:

Ah yes, this is why we want people to post their circuit and code up-front, such problems are trivial to spot if all the information is presented as suggested by the "how to post" threads

I suspect quite often people who do gather all the information to post notice problems like this one for themselves while doing so!