I got a SG92R (from Adafruit) and I am trying to use it with my Arduino Uno R3, and it did not work. This is the guide I followed. I cannot seem to find any information on the SG92Rs.

P.S. This is my first post

What kind of problem did you encounter?
I think it works with the sample you described.
(There is a few concern that the operating current of the servo may be bit insufficient...)

Please provide the situation in question and your code and circuit.

Nothing happened, and I even tried printing something in the serial at the point before it was supposed to spin and it got through. So I am assuming that the code works.

Bad tutorial. Powering a servo from the Arduino 5V pin is always a bad idea. How is the Arduino itself powered?

Try it with separate power to the servo, something like 4 x AA batteries preferably NiMH rechargeables.


The Arduino was powered over USB (would it be better to power the Arduino over 9v alkaline battery to the dc jack?) and I tried to use a bread-board power supply from Elegoo (which I powered over a 9v alkaline battery over the dc jack), but I probably used it wrong. I don't have any NiMH rechargeable batteries or a 4 aa battery holder. I do I 2(+) 2 aa battery holders, should I try to connect those using alkaline batteries (and would I connect it in parallel or series)?

Those little rectangular 9V motors are useless for anything involving servos or other motors. They simply don't have enough power.

USB power for the Arduino is fine. 2 X 2AA holders in series will make 6V which is good for the servo. Connect battery + to servo + and battery - to servo - also to Arduino GND. If that doesn't work then mostly likely you either have the wiring wrong or a bad servo.

You say you have modified the Sweep code to print values to Serial. Please post your modified code here or go back to the standard Sweep code (it's really easy for errors to creep in).


#include <Servo.h>

Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0; // variable to store the servo position

void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object

void loop() {
for (pos = 0; pos <= 90; pos += 1) { // goes from 0 degrees to 90 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position
for (pos = 90; pos >= 0; pos -= 1) { // goes from 90 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable ‘pos’
delay(15); // waits 15ms for the servo to reach the position

Sorry about that bad tutorial - nothing to do with us on the forum I'm afraid.

You need a supply capable of a solid 1A or more for the smallest servos, and never
share it with the Arduino 5V rail. Larger and "high-torque" servos need even more current
(which is seldom mentioned in the datasheets for cheap servos - they are hopelessly
poorly documented usually).

Servos are normally designed for 6V to 7.2V, not 5V, so I'd try 4x AA alkaline pack or 5x AA NiMH
pack to power a servo.

Hobby servos are ultra-cheap components with poor quality control - its entirely possible the odd
dud gets sold.

Seomthing like 95% of servo issues we see here are inadequate power to the servo(s).

I used this reference and it works fine
#include <Servo_Hardware_PWM.h> INSTEAD OF Servo.h