I can't get my servo motor to move

I'm trying to get my servo motor to turn but am failing. I read that servos need an external power supply, so I'm using a 1300 mah 3s battery and a voltage regulator. I have measured the voltage, it's at 4,98 V. The arduino and servo share a common GND. I'm pretty sure it's not hardware failure since I've tried 3 servo engines, 2 different arduinos and a bunch of wires.

Here's the code I'm using.

#include <Servo.h> 
int servoPin = 3; 
Servo Servo1; 

void setup() { 
   Servo1.attach(servoPin); 
   Serial.begin(115200);
}

void loop(){ 
   Servo1.write(0); 
   delay(1000); 

   Servo1.write(180); 
   delay(1000); 
}

What kind of servo is it? The metal geared servos I use, would twitch at 5ish volts but not turn.

Idahowalker:
What kind of servo is it? The metal geared servos I use, would twitch at 5ish volts but not turn.

It's a SG5010. According to it's datasheet it should work beteen 4.8-6v and specifically states that 5v works fine.

What is the current rating of your voltage regulator? That servo is likely to take over 1A on startup. Is the regulator output connected directly to the servo + and - or via a breadboard or even worse via the Arduino?

There's nothing wrong with the code so it has to be power or wiring.

Steve

slipstick:
What is the current rating of your voltage regulator? That servo is likely to take over 1A on startup. Is the regulator output connected directly to the servo + and - or via a breadboard or even worse via the Arduino?

There's nothing wrong with the code so it has to be power or wiring.

Steve

It's an LM317 and the max current seems to be 1,5A. Are you sure it'll take that much? I can find examples of people using this servo on youtube and they've only connected it to the arduino itself. The servo is indeed connected via a breadbord, the regulator is plugged into the breadbord.

Do you have a mini servo you can try without providing an external power source? Are you sure you have it wired correctly? There is a power, a ground, and a signal wire on the servo. The color may vary with different servo brands, but typically the signal is on one side of the flat connector, and the ground (typically brown) on the opposite. Power positive is in the middle and should be red. Make sure you have a common ground between the Arduino and the power source so that the signal will have a complete circuit. Do you have any other source of 5-6v dc power you can try?