Go Down

Topic: Brushless motor controled (arduino, ESC) only makes 3 delayed turns & gets stuck (Read 178 times) previous topic - next topic

KeanuQ

I would like to control a brushless motor with an ESC with my arduino. But I'm failing terribly. When I execute this code, the motor does that: Video Stream, Video Download
What am I doing wrong?
Thank you in advance for any help, KeanuQ

vinceherman

Describe what you expect it to do, what it actually does (although the video has that covered) and how the two differ.

Post your code.  Use code tags.
Post a wiring diagram.  Pencil, paper and a camera do nicely.  Include proper detail like pin numbers.

KeanuQ

Thanks for the answer. The motor should turn steadily at constant speed (2000).
Here is the code:

Code: [Select]
#include <Servo.h>

Servo m1;

void setup() {
  m1.attach(6);
  m1.writeMicroseconds(1000);
  delay(3000);
}
void loop() {
  m1.writeMicroseconds(2000);
  delay(100);
}


and the schematic: Stream Picture, Download Picture

slipstick

The first thing I'd do is make some better connections, maybe do some soldering. Trying to power a motor/ESC through croc clips is asking for trouble. They are notorious for making unreliable high resistance connections.

Steve

vinceherman

Which ESC are you using?  Some ESCs require an arming sequence.

KeanuQ

Thank you so much! It was really because of the bad connections. Now the motor is turning very well.

Go Up