Servo behaves differently with external supply


I have a servo that behaves perfectly fine when connecting to 5V of the arduino with it doing a full 180 and back as programmed to do. The arduino UNO is being powered by a USB.

However this is firstly not recommended and secondly I’m planning to run this servo off a battery so I have an 18650 battery with a step up converter that converts the ~4 volts to 6 volts(the servo accepts 4.5-7.5). I then connect the grounds too as there is no resistance between the two however my servo turns clockwise only and gets stuck at the end as it continues to turn that direction. The code is below and is very simple.
Thank you for all you help

EDIT: Other servos seem to turn both ways but also “overturn” and create a sound when using the external battery source

EDIT: FIXED but I’m wondering why. It seems removing the step up converter has fixed the issue even if I change the voltage of the converter to the same of the battery directly. Anyone know why this is?

#include <Servo.h>

Servo servo;

void setup() {

void loop() {

Most likely you don't have the arduino and servo power supply grounds connected together properly. Otherwise your power supply may be suspect.


I have had similar issues with my MG996R. One thing you'll need is a common ground between your servo and the Arduino.

Is the 'ground' pin on your Arduino connected to the same ground as the external power source? Try that!

Your step-up converter needs to be able to supply enough current for the servo. You've given no details of the servo or the converter specification.