SG90 servo
A small geared motor with position control: the PWM pulse (50 Hz) sets the angle, from 0° to 180°. The arm turns at a real speed, it does not jump. Power it with 5 V (VIN) and a GND shared with the board.
Pinout
| Pin | Connect to | Note |
|---|---|---|
| brown | GND | the same GND as the ESP32 |
| red | VIN (5 V from the USB) | on 3V3 the board may restart |
| orange | GPIO (PWM at 50 Hz) | pulse ~0.5 ms = 0°, ~2.4 ms = 180° |
FastMindLocal AI assistant
The AI that remembers your life and lives on your computer
- Long-term memory with the source of every answer
- Works offline: your data stays on your PC
- Reads PDFs, slides, photos and meeting recordings
Essential plan free forever
MicroPython example
from machine import Pin, PWM
import time
servo = PWM(Pin(18), freq=50)
def angulo(graus):
pulso_us = 500 + graus * (2400 - 500) // 180
servo.duty_ns(pulso_us * 1000)
for g in (0, 90, 180):
angulo(g)
time.sleep(1)
Specifications
| Item | Value | Source |
|---|---|---|
| Signal | PWM 50 Hz (20 ms period); pulse ~0.5–2.4 ms ≈ 0–180° | Typical datasheet values — Under review: measure the extremes of the lab servo |
| Speed | ~0.1 s per 60° at 4.8 V | Typical datasheet values |
| Power supply | 4.8–5 V (VIN from the USB) | Typical datasheet values |
Values marked "Under review" will still be checked against the parts in the lab.