Espritmodel.com Telemetry Radio
Reply
Thread Tools
Old Nov 25, 2010, 03:22 PM
Registered User
Joined Sep 2010
11 Posts
Discussion
Brushless Motor+ Speed Controller+ Arduino Uno= Problems

Well I am using this code
Code:
#include <Servo.h>

Servo myservo;

int pos = 0;

void setup()
{
  myservo.attach(9);

  myservo.write(50);
   delay(5000);
}


void loop()
{
  
  myservo.write(80);

}
my motor turns for like 10 seconds and than stops and turns again, than stops and turns again... and the same and sameeee
d4n1s is offline Find More Posts by d4n1s
Reply With Quote
Sign up now
to remove ads between posts
Old Nov 25, 2010, 06:34 PM
We want... Information!
Bruce Abbott's Avatar
Hastings, New Zealand
Joined Jan 2001
5,169 Posts
The servo pulse needs to be repeated every 20mS (approximately), otherwise the ESC will think the signal is lost and shut down.

Change your setup delay from 5000 (5 seconds) to 20 (20mS) and add a for/next loop to repeat the pulse+delay sequence 1000 times.

The code in your main loop also needs to be repeated every 20mS to keep the motor running.
Bruce Abbott is offline Find More Posts by Bruce Abbott
Reply With Quote
Old Nov 26, 2010, 06:58 AM
Registered User
Joined Sep 2010
11 Posts
it doesn't set up on 20 mS I keep getting beep beep beeep beeep. The motor will also stop with a repating loop....


#include <Servo.h>

Servo myservo;

int pos = 0;

void setup()
{
myservo.attach(9);

myservo.write(50);
delay(5000);
}


void loop()
{
while(true)
{
myservo.write(70);
delay(100);
}
}
d4n1s is offline Find More Posts by d4n1s
Reply With Quote
Old Nov 26, 2010, 01:03 PM
We want... Information!
Bruce Abbott's Avatar
Hastings, New Zealand
Joined Jan 2001
5,169 Posts
Sorry, it seems I was wrong about having to repeat the pulse, as this is done automatically 'in the background' by the servo library code (I got it confused with another servo library called 'SoftwareServo' which does need to be refreshed continuously).

The only problem I can see with your code is that you are setting a very low throttle level of only 70 degrees (~1.3uS). The ESC probably needs about 130 degrees (~1.9mS) for full throttle.
Bruce Abbott is offline Find More Posts by Bruce Abbott
Reply With Quote
Reply


Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Discussion Will it fry the motor and/or speed controller? beginner4life Electric Plane Talk 16 Nov 24, 2010 09:27 AM
Discussion Speed controller with brush-less motor d4n1s Power Systems 10 Nov 23, 2010 07:04 PM
Discussion Can you use one speed controller with four brushless engines? Coasterfan86 Power Systems 12 Sep 11, 2010 07:59 AM
Sold Used Scorpion 55 Amp Brushless Speed Controller LBMiller5 Aircraft - Electric - Power Systems (FS/W) 3 Sep 09, 2010 02:17 PM
Help!!! Hacker X-20 brushless speed controller problems DrSpock Electric Plane Talk 13 Jul 18, 2005 11:26 PM