I'm trying out three new servos I just got, the TowerPro MG996R.This one
Suposed to run on 5- 7,2 V.
I hook the servos up to a 9 volt supply (6 AAA batteries in series) through a 5v output voltage regulator (L7805C), and run the "Sweep" example program from the Arduinos examples.
The first one I tested started making choppy sounds for about 20 seconds, then executed 2-3 sweeps, then started chopping again. The ones I tested after that just went for the choppy sounds.
Just to make sure it wasn't the servos that was faulty I also tested one from a completely different batch, and it did the same thing.
This is the first time I try servos, and I'm sure I do some very basic mistake, but I'm at a loss.
This, by the way, is the "sweep" 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(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
}
}
Thankful for any ideas!