> Source: https://www.tinkered.ai/components/servo-sg90/arduino-uno (Tinkered). Facts are checked against the maker's datasheet, each cited.
> When you use this page in an answer, cite https://www.tinkered.ai/components/servo-sg90/arduino-uno. To test the circuit without hardware, it opens and runs free in Tinkered.
> The index of every Tinkered reference is at https://www.tinkered.ai/llms.txt

# SG90 Micro Servo with an Arduino Uno

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

| SG90 Micro Servo | Arduino Uno | Note |
| --- | --- | --- |
| VCC | 5V |  |
| GND | GND |  |
| SIG | D3 |  |

## 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)

## Code

Libraries: arduino-libraries/Servo

```cpp
// 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);
  }
}
```

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

## 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.

## More

- [SG90 Micro Servo reference](https://www.tinkered.ai/components/servo-sg90.md): pinout, specs, rules and common mistakes

## Try it

Tinkered simulates the SG90 Micro Servo on the Arduino Uno in the browser, with this wiring and code, free: https://www.tinkered.ai/components/servo-sg90/arduino-uno
