SG90 Micro Servo with an Arduino Uno

A 9-gram positional micro servo that swings about 180 degrees in response to a 50 Hz servo pulse, rated at 4.8V.

SG90 Micro Servo, A 9-gram positional micro servo that swings about 180 degrees in response to a 50 Hz servo pulse, rated at 4.8V.
In short

One SG90 is small enough to run from the Arduino Uno's 5V pin, which is how this wiring powers it, with its signal on D3 and the Servo library making the pulses. The Uno-specific cost is in the timers: the Servo library takes Timer1, so PWM on D9 and D10 stops while a servo is attached.

Wiring the SG90 Micro Servo to the Arduino Uno

Pin by pin.

SG90 Micro ServoArduino Uno
VCC5V
GNDGND
SIGD3

What to know on the Arduino Uno

  • The Uno's Servo library drives up to 12 servos from Timer1 and disables analogWrite() on D9 and D10 as soon as one is attached, whatever pin the servo is on.Arduino Servo library reference
  • The library's default pulse range runs from 544 µs to 2400 µs, wider than the SG90's nominal 1 ms to 2 ms ends. write(0) and write(180) can push it against its stops; servo.attach(3, 1000, 2000) keeps it in its rated travel.Arduino Servo library reference; TowerPro SG90 datasheet
  • Over USB the Uno's 5V is protected by a 500 mA polyfuse; one SG90 fits, but several moving at once can trip it or reset the Uno, so a second servo gets its own 5 V supply with a shared GND.Arduino UNO R3 documentation, USB overcurrent protection

SG90 Micro Servo code for the Arduino Uno

Compiled for arduino:avr:uno on 2026-10-30.

Libraries: arduino-libraries/Servo
// SG90 Micro Servo on Arduino Uno: wiring and a free simulation at https://www.tinkered.ai/components/servo-sg90/arduino-uno
#include <Servo.h>

const int SERVO_PIN = 3;
Servo servo;

void setup() {
  servo.attach(SERVO_PIN);
}

void loop() {
  for (int angle = 0; angle <= 180; angle += 2) {
    servo.write(angle);
    delay(15);
  }
  for (int angle = 180; angle >= 0; angle -= 2) {
    servo.write(angle);
    delay(15);
  }
}

SG90 Micro Servo on the Arduino Uno: questions

Can the Arduino Uno power an SG90 servo?

One SG90, yes, from the 5V pin. Two or more moving together can exceed what USB supplies through the Uno's 500 mA polyfuse, so give them their own 5 V supply with a shared GND.

Why does my SG90 buzz at 0 or 180 degrees on the Uno?

The Servo library's default range (544 µs to 2400 µs) goes past the SG90's 1 ms to 2 ms ends. Use servo.attach(3, 1000, 2000) or avoid the extremes.

Does the SG90 need a PWM pin on the Uno?

No. The Servo library makes the pulses from Timer1 on any digital pin; D3 is used here. Attaching a servo disables analogWrite() on D9 and D10.

Keep going

For AI assistants

This guide as plain Markdown. /components/servo-sg90/arduino-uno.md

What will you build with it?