[Solved] ESC doesn't calibrate (using a custom tx/rx)

Hi there.
I'm building an RC plane with 2x brushless motors and 2x 20A ESC's, and I'm using custom tx/rx that I made myself with Arduino. The ESC's have 4 wires: 1x VCC and 1x Ground connected to the battery, 1x signal wire and 1x Ground connected to the Arduino. It's my first time building a plane, so any help would be greatly appreciated.

The problem is, when starting up the plane, the ESC's make regular beeps. When I change the throttle input (an analogWrite value in the 128-255 range), the beeping stops for a few seconds, then continues like before. I've tried like everything with the controls and still can't calibrate the ESC's.

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

Servo pitch;
Servo roll;
RF24 radio(7, 8); // CE, CSN

const byte address[6] = "00001";

struct flightdata{
  int pitch;
  int roll;
  int esc1;
  int esc2;
};

void setup() {
  pitch.attach(3);
  roll.attach(9);
  pinMode(3, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(6, OUTPUT);
  pinMode(9, OUTPUT);
  Serial.begin(9600);
  radio.begin();
  radio.openReadingPipe(0, address);
  radio.setPALevel(RF24_PA_MIN);
  radio.startListening();
}

void loop() {
  if (radio.available()) {
    flightdata controls;
    radio.read(&controls, sizeof(controls));
    pitch.write(controls.pitch);
    roll.write(controls.roll);
    analogWrite(5, controls.esc1);
    analogWrite(6, controls.esc2);
  }
}

Welcome to the forum

What do the instructions for the ESCs tell you to do to calibrate them ?

Possibly true but, since your code etc. are obviously state secrets, nobody will ever know...

That does not fit together with RX/TX.

I added the code

The instruction tell to start the plane with throttle on the transmitter set to 0, then set throttle to max, then 0 again and you're ready

Where to ?

The forum post

I'd say offhand the problem is.....you haven't read the esc's beep functions to determine just what the esc is trying to communicate.

Most have a similar startup routine, find out exactly what yours is and go from there.
From the extended beeping you mention, I'd say you have entered the program mode and it hasn't been exited.

Following is a typical esc programming beep routine.....yours is more than likely different ......
Example....... https://www.youtube.com/watch?v=_vpgvQrI0bM

I had read about the ESC's beeps. The regular beeps mean the ESC is waiting for calibration. I just couldn't calibrate it by the steps it said (I think because of the tx/rx).
I read more about ESCs on the internet and made my ESCs 'servo' objects and now I can control them by giving them 0-180 values.
Anyway, thanks for the reply!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.