Problem Driving Servo Motor.....plzz helppp

heyy....
i just bought a servo motor...connections go like..
1>middle red wire...+5v
2>brown...GND
3>orange...pin 9

code..

//Program by Jeremy Blum
//www.jeremyblum.com
//Controls a Servo Motor

//Include Servo Library
#include <Servo.h>

//Define Pins
int servoPin = 9;

//Create Servo Object
Servo jeremysServo;

void setup()
{
 
  //Attaches the Servo to our object
  jeremysServo.attach(servoPin);
}

void loop()
{

  //We can Turn a Servo to 180 degrees
  for (int i = 0; i <=180; i=i+20)
  {
    jeremysServo.write(i);
    delay(1000);
  }
  
}

only movement is say 5-10 deg.......when i connect power...
i hav tried powering it with ext supply(3 fresh aa 1.5 v batteries...9v even)...as well as arduino...
pwat to do??????

connected GND of ext power and arduino together

What particular servo do you have?

vts-08b
operating voltage---4.8-6V
current...0.23A(running)

Sounds like a power issue then. 3 AA's don't provide the minimum voltage you need and if that 9V was from a pp9, they are notorious (check other threads) for being worthless for providing sufficient current to drive a servo.