Loading...
Pages: [1]   Go Down
Author Topic: LS 3006 servo  (Read 778 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
  }
}
Logged

0
Online Online
Tesla Member
***
Karma: 51
Posts: 6586
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Sounds like the LS 3006 is a continous rotation servo.
Logged

Why I like my 2005 rio yellow Honda S2000 with the top down, and more!
GOOGLE ADVANCED FORUM SEARCH BELOW!  
Go to:  http://www.google.com/advanced_search?hl=en
put in key search words,
use site or domain:  http://arduino.cc/forum
or in a google search box put key words site:http://arduino.cc/forum

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Print
 
Jump to: