PinLab › Components › Servo motor SG90
SIG5VGND SG90 micro servo

Servo motor SG90

motor with angle control 0–180°

A small motor with a gearbox and an internal controller — instead of spinning endlessly, it goes to an exact angle and stays there. For robot arms, locks, pointers.

Open the course →

How it works

The servo expects a pulse every 20 ms (50 Hz). The pulse length sets the angle: ~0.5 ms = 0°, 1.5 ms = 90°, ~2.4 ms = 180°. Inside, a potentiometer on the shaft tells the controller where it is, and the motor turns until it gets there. The ESP32Servo library gives you servo.write(angle).

Pins and wiring

PinWhat it isWhere it connects / why
Brown (GND)Ground→ GND on the ESP32. A common GND with the ESP32 is mandatory!
Red (VCC)Power 4.8 – 6 V→ VIN (5 V). Not from 3V3 — the motor draws up to 500 mA while moving.
Orange / yellow (SIG)PWM signal→ GPIO (e.g. 13). A 3.3 V signal is enough.

Specifications

Voltage4.8 – 6 V
Current~100 mA idle, up to 650 mA under load
Torque1.8 kg·cm
Speed0.1 s / 60°
Angle0 – 180°
Signal50 Hz PWM, 500–2400 µs
LibraryESP32Servo

Tips and typical mistakes

Used in projects