hi! im from india......i just bought 12 servo motors (standard dual ball bearing) for a quadriped......i have a adruino demilanove board....the motors are supposed to be exact replacements for futaba s3003 series..........
The problem that i am encountering is that even when i use the Servo motor sweep program (built in duemialnove) the motors seem to move erratically ...........example-when connected to board and asked to sweep 0 to 180 degrees and then back it will start from watever position it is at currently ...move any random angle and doesnt come back..........
Is it due to some pulse width specification problem.........do i need a 6 v external supply and not from USB?.............plzzz helpppp
are you running the same code that you were using when you made your first post? If the only thing that is different is the power supply then that is the most likley cause of the problem.
SoftwareServo 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(9); // 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
}
}
this is the arduino code...............i added a new library softwareservo.............yeah using the same code
Well, you could try replacing SoftwareServo with the standard servo library (only works with pin 9 and pin 10), or with the MegaServo library.
The other thing I'd try would be to change the value passed to "delay" at the end of each "for" loop.to something much bigger.
If the servo moves more slowly then, your software is at least partly working.
If it just zips from one end of travel to the other, then the software is probably not working.
quadriped, software servo code has a refresh function that must be called every 20 milliseconds or so. Can you post a link to the library you are you using.