Question on servo motors

I'm new to Arduino and have never used a servo before. I using code from the servo example that comes with the <Servo.h> lib. that "sweeps" the servo from 0 to 180 degrees and back to 0, so on and so forth, code seems to work fine, but my question is (as I've never worked with servos before), as the servo sweeps back and forth it seems very jumpy...not smoth as I thot it would be. Is that normal?

Incase someone needs this to help answer my question.
I'm using an analog servo. Not using any servo motor controller, just hooking the (yellow) wire to Pin 9, (red) to +5v and (black) to -5v external power supply.
Heres code incase this is the problem. (Like I said this came from servo example from <Servo.h> lib.

Thanks everyone for any help! :slight_smile:

//Servo test

#include <Servo.h>

Servo myservo;

int pos = 0;

void setup()
{
  myservo.attach(9);
}

void loop()
{
  for(pos = 0; pos < 180; pos += 1)
  {
    myservo.write(pos);
    delay(15);
  }
  for(pos = 180; pos > 1; pos -= 1)
  {
    myservo.write(pos);
    delay(15);
  }
}

Standard servos are single rail, +5, gnd and signal. Yellow/organge is signal, Black is ground, and red is +5V.

Could not tell from your post if you have the external power supply ground hooked to the ground of the arduino board and the servo ground (common ground ) but it needs to be for the proper opperation of the servo.

Ah, no I do not, I just had the ground of the servo hooked to the external paower supply ground. But I have now hooked the ground from arduino to the servo and power supply ground and it seems to fix the jitteryness. Tyvm :slight_smile: