Show Posts
Pages: [1]
1  Using Arduino / Motors, Mechanics, and Power / Re: LS 3006 servo on: October 08, 2012, 08:21:28 am
Thanks.  I guess in my n00bness I assumed that a continuous rotation servo would still function the same way, only with the potential for continuous rotation.
2  Using Arduino / Motors, Mechanics, and Power / LS 3006 servo on: October 07, 2012, 08:44:56 pm
I'm very new to the joys of arduino, and have a question about servos.  I have an LS 3006, and a Tower Pro micro servo 9g. 

If I run the example Servo Sweep code that is included with the Arduino IDE (shown below), the 9g performs as expected, sweeping to the appropriate angle and then back again.  The LS 3006 however, makes several complete rotations before pausing and then making several more complete rotations.  I can't quite seem to get it to function within a proper angle.  If I reduce the position range shown below to anything below 180, it doesn't sweep at all, but instead does a continuous rotation.

The only thing I can think of, is the power.  I have it running through the Arduino now, so it's getting 5v, but on the spec sheet, I only see specifications for 4.8v or 6v. I'd assumed running at a voltage between the two would simply equate to a speed/torque between the two.  Could it be the cause of this problem? 

Code:
// Sweep
// by BARRAGAN <http://barraganstudio.com>
// This example code is in the public domain.


#include <Servo.h>
 
Servo myservo;  // create servo object to control a servo
                // a maximum of eight servo objects can be created
 
int pos = 0;    // variable to store the servo position
 
void setup()
{
  myservo.attach(3);  // attaches the servo on pin 9 to the servo object
}
 
 
void loop()
{
  for(pos = 0; pos < 180; pos += 1)  // goes from 0 degrees to 180 degrees
  {                                  // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for(pos = 180; pos>=1; pos-=1)     // goes from 180 degrees to 0 degrees
  {                               
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
}
Pages: [1]