Jerking of servos

Hi there,

I have 4 servos which is connected to arduino digital pin 9-12.
I am using 5V 1A wall adaptor to power servos.
When i connect two servo i can't see any jerks but as soon as i insert the third servo, they all starts jerking.
the servos are not under any load. Any idea what is happening?

Any idea what is happening?

Yes, you're not showing us the whole picture.

Yes, you're not showing us the whole picture.

I want to control 4 servo with 8 push button, 2 for each to control direction of servos.
Here is the code which i tried.

#include <Servo.h>

Servo myservo1;
Servo myservo2;
Servo myservo3;
Servo myservo4;
int button7=0;
int button6=0;
int button4=0;
int button5=0;
int button2=0;
int button3=0;
int pos1=180;
int pos2=180;
int pos3=0;
int pos4 = 90;

void setup()
{
pinMode(2, INPUT);
pinMode(3, INPUT);
pinMode(4, INPUT);
pinMode(5, INPUT);
pinMode(7, INPUT);
pinMode(6, INPUT);
myservo1.attach(9);
myservo2.attach(10);
myservo3.attach(11);
myservo4.attach(12);
myservo4.write(pos4);
myservo3.write(pos3);
myservo2.write(pos2);
myservo1.write(pos1);
}

void loop()
{
button2=digitalRead(2);
button3=digitalRead(3);
button4=digitalRead(4);
button5=digitalRead(5);
button7=digitalRead(7);
button6=digitalRead(6);

  delay(15);
  
  
  if(button7==1 && button6==0)
  {
  pos1=constrain(pos1,0,180);
  myservo1.write(pos1);
  pos1++;
  }
  
  if(button7==0 && button6==1)
  {
  pos1=constrain(pos1,0,180);
  myservo1.write(pos1);
  pos1--;
  }
  
  if(button5==1 && button4==0)
  {
  pos2=constrain(pos2,0,180);
  myservo2.write(pos2);
  pos2++;
  }
  
  if(button5==0 && button4==1)
  {
  pos2=constrain(pos2,0,180);
  myservo2.write(pos2);
  pos2--;
  }
  
  if(button3==1 && button2==0)
  {
  pos3=constrain(pos3,0,180);
  myservo3.write(pos3);
  pos3++;
  }
  
  if(button3==0 && button2==1)
  {
  pos3=constrain(pos3,0,180);
  myservo3.write(pos3);
  pos3--;
  }
}

for testing purpose i only attach the servos to arduino board to see if they are holding their respective position as set in the code
(pos1,pos2,pos3,pos4). when i attached only two servos they holding their position fine but as soon as i connect more than 2 servos they starts jerking.
using 5V 1A wall adaptor to power servos & grounds are common.

What model of servo are they? How much power do they need? In the absence of other detail, I'll guess that your power supply is inadequate.

What model of servo are they? How much power do they need? In the absence of other detail, I'll guess that your power supply is inadequate.

Servo Specs:

Operating Voltage : 4.8-6.0V

PWM Input Range : Pulse Cycle 20±2ms, Positive Pulse 1~2ms

STD Direction : Counter Clockwise / Pulse Traveling 1500 to 1900µsec

Stall Torque : 6 kg-cm (82.6 oz/in) at 4.8V, 7.1 Kg-cm (97.3 oz/in) at 6V

Operating Speed : 0.18 sec/ 60° at 4.8V, 0.16 sec/ 60° at 6V at no load

Weight : 40g (1.41 oz)

Size : 41.320.338.748.510

Plug Available : FUT, JR

Special Feature : Heavy Duty Plastic Gears, Economy Servo

I'd go with inadequate power supply too.