0

When I run my code, the ESC makes some noises, different on the high pulse and low pulse, then it begins to jiggle for a bit when it gets to the loop. Here is the code:

#include <Servo.h>

#define MAX_SIGNAL 2000
#define MIN_SIGNAL 1000
#define MOTOR_PIN 10

Servo motor;

void setup() {
  Serial.begin(9600);
  Serial.println("Program begin...");
  Serial.println("This program will calibrate the ESC.");

  motor.attach(MOTOR_PIN);

  // Wait for input
  while (!Serial.available());
  Serial.read();

  Serial.println("Now writing maximum output.");
  motor.writeMicroseconds(MAX_SIGNAL);
  delay(2000);

  // Send min output
  Serial.println("Sending minimum output");
  motor.writeMicroseconds(MIN_SIGNAL);
  delay(2000);

}

void loop() {  
  motor.writeMicroseconds(MAX_SIGNAL);
}
1

Your code is familiar to the process of calibrating ESC controllers and is common. As your code is correct, we have to look at the connections. How is arduino connected to the ESC controller? can you provide a diagram? Only GND and Pin 10 should be connected. Do not connect the 5V of arduino. Power up the ESC with an external source. I think ESC signal port is Hi impedance so it should be no need for any resistor. Take a look at this site: http://robots.dacloughb.com/project-2/esc-calibration-programming/

You can see in that picture ( and the picture on the link provided), only pwm pin and ground are connected to arduino. Show us your connections if things keep going wrong. Also, does your power source provides enough juice to the motor?

  • I have seen that diagram and my connection is exactly like that. I think the power is the problem. How can I tell how much power is needed? Currently I am using a common square 9V battery. – DSchana Nov 13 '15 at 13:57
  • can you provide us the model of the ESC you have? And if possible the motor model if any. That 9V may be the cause of that yes. I've searched a little more and came across this similar topic. In there they address two possible cause which can also be one of yours, the UBEC and the 9V. Take a look please, hope it helps. If motors came with some datasheet or similar, it could specify how much current it needs. – brtiberio Nov 13 '15 at 19:09
  • @DSchana this topic also describes similar problem as yours rcgroups. In the end the user also says he used a 9V with sucess but it quickly run out – brtiberio Nov 13 '15 at 19:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.