Problems trying to communicate with a Digital Servo

Hi everyone, I'm trying to move 135 degrees two Savox 1283SG Coreless Digital servos in opposite directions using two push buttons as inputs. I already ran the code with two S3003 Futaba analog servos and they worked perfectly. But sadly this is not the case for the digital servos. One of them is moving well, but the other one after the first movement freezes. I tried to find out info and I read something about current draw and all that stuff, but nothing has solved the problem.

I'm attaching a picture of my circuit and the actual code.

Thanks!

This is my code:

#include <Servo.h>

#define SERVO_LEFT  3
#define SERVO_RIGHT 5
#define DOWN_BUTTON 7
#define UP_BUTTON   9

#define LEFT_OPEN 180
#define LEFT_CLOSE 45
#define RIGHT_OPEN  0
#define RIGHT_CLOSE 135
#define SLOPE .8
#define INITIAL_SERVO_POS_LEFT  LEFT_OPEN
#define INITIAL_SERVO_POS_RIGHT RIGHT_OPEN


Servo servoLeft;
Servo servoRight;

int buttonstate1;
int buttonstate2;

float angle1;
float angle2;

bool button1;
bool button2;

float delta(float start, float stop, float slope) 
{
   return start + (stop-start) * slope;
}

void setup() 
{ 
   // Initialize arduino pins
   servoLeft.attach(SERVO_LEFT);
   servoRight.attach(SERVO_RIGHT);
   pinMode(DOWN_BUTTON, INPUT);
   pinMode(UP_BUTTON, INPUT);

   // Initial servo posiotion
   angle1 = INITIAL_SERVO_POS_LEFT;
   angle2 = INITIAL_SERVO_POS_RIGHT;

   servoLeft.write(angle1);
   servoRight.write(angle2);

   // wait 1 second
   delay(1000); 
}

void loop() 
{
 // Read input
   buttonstate1 = digitalRead(DOWN_BUTTON);
   buttonstate2 = digitalRead(UP_BUTTON);

   if(buttonstate2)
   {
      button2 = true;
      button1 = false;
   }
   if(buttonstate1)
   {
      button1 = true;
      button2 = false;
   }

 // Action
   if(button2)
   {
      angle1 = round(delta(angle1, LEFT_OPEN , SLOPE));
      angle2 = round(delta(angle2, RIGHT_OPEN, SLOPE));

      servoLeft.write(angle1);
      servoRight.write(angle2);

      if(angle1 == LEFT_OPEN)
      {
         button2 = false;
      }
   }
  
   if(button1)
   {
      angle1 = round(delta(angle1, LEFT_CLOSE , SLOPE));
      angle2 = round(delta(angle2, RIGHT_CLOSE, SLOPE));

      servoLeft.write(angle1);
      servoRight.write(angle2);

      if(angle1 >= LEFT_CLOSE)
      {
         button1 = false;
      }
   }
//   delay(100); 
}

The thing about "current draw" that you seem to have ignored was probably telling you that digital servos use a lot more current than standard servos like the S3003. Particularly when they are much faster and more powerful servos.

So it is even more important to give them a separate high current power supply. 6V at about 5A might do it or even that might not be enough.

Steve

This is more what it should look like.
OK, the 9v transistor radio battery is mostly useless for anything but transistor radios, but for the servo side, it still shows things better.
ServoDiagram.jpg

Thanks everyone for replying. Right now for the prototype I'm using a 6v 1600mAh battery power source. Like slipstick said, that might not be enough. I can find another battery with a bigger amperage that could solve that problem. In the other hand I was wondering if the servo library that Arduino includes manages well the digital servos in terms of Pulse With Modulation(PWM)? Do I have to change some parameters? Is there another special servo library for Digital Servos?