Controlling Brushless Motor through ESC using Arduino

Started by Skriptkid, June 26, 2012, 05:21:05 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Skriptkid

Hey,
I have a brushless motor and ESC, which I'm trying to control using an Arduino Uno for my first quadrotor project. And I'm failing miserably, which is why I'm here. I tried connecting the Arduino to the ESC and using the Servo library, but it didn't work. I even tried sending 10 pulses of width 1ms, with an interval of 20ms, but that didn't work either. All I get are three continuous short beeps on power and then short single beeps. I'm probably not able to even arm the ESC. This is the motor I'm using(Emax CF2822): http://www.yinyanmodel.com/En/ProductView.asp?ID=58 This is the Red Brick ESC's manual(Mine's the 20Amp Aircraft one, with Ni-MH and LiPo Auto-detect. Table 1.1): http://www.hobbyking.com/hobbyking/s...2X53414X39.pdf It's meant for an RC receiver and I have no idea how I can emulate one through my Arduino. All in all, I'm totally blank. If anybody could please help, I'd be real grateful. It'd be great if I could get the Arduino code also.

Thanks a lot. :)

RotorZone

Should work with the servo library.  Try this sequence.

Send 1.9ms pulse using servo library.
Powerup ESC.
Wait 10s. This should give ESC enough time to initialize.
Send 1ms pulse.
Wait 1s.
Send 1.5ms pulse.

faisal00813

I had the same problem...
I had china made esc and motor....
My esc was armed 127 pwm signal out and motor started at around 135..

Check these values....they might be of help. :)

Skriptkid

@RotorZone Tried. No success :(. I'm using a 9v pp3 battery. Do you think that might be on of the problems? Also, this is the code I tried:

#include <Servo.h>

Servo esc;
int j;

void setup()
{
 esc.attach(9);
 esc.writeMicroseconds(1900);
 delay(10000);
 esc.writeMicroseconds(1000);
 delay(1000);
 esc.writeMicroseconds(1500);
 delay(3000);
}

void loop()
{
 for(j=0; j<180; j++)
 {
   esc.write(j);
   delay(20);
 }
 for(j=180; j>=0; j--)
 {
   esc.write(j);
   delay(20);
 }
}

@faisal00813 : I'll try that :)

RotorZone

9v battery is good for only very light loads. ESC might be going into low voltage cut off.  If you have a multimeter you can confirm that.

Hope you are powering up esc and arduino simultaneously.

Get rid of the stuff inside your loop. You can  add the sweep later once you confirm it is working

If it is still not working, post a pic showing your connections clearly.

RotorZone

If you don't have a battery pack, try with a 12v lead acid battery. You should have one around in a UPS,car or bike. Post pic of your connections before that.