OHMYARD

DISCOVER  ·  EXPERIMENT  ·  BUILD

TRACK 7 · ESP32, PI & ARDUINO APPS27/30
NOV 27, 2026
14:20:00
SG90 9gMICRO SERVO90° · 1500 µs50 Hz FRAME (20,000 µs PERIOD)1500 µs0° = 500µs · 90° Center = 1500µs · 180° = 2500µs
Drag or WASD to pan · Q / E to rotate · Scroll to zoom

SG90 / MG996R Servo Motor Angle & 50 Hz Pulse-Width Lab — Engineering Notes & Troubleshooting

✓ Reviewed by Jason Guo (OhmYard Lab)· IEC & Datasheet Verified· Updated Nov 27, 2026
QUICK ENGINEERING ANSWER (TL;DR)

Hobby servos (SG90, MG996R) don't care about duty-cycle percentage alone — they read the EXACT high-pulse duration every 20 ms (50 Hz): ~1.0 ms (or 0.5 ms) = 0°, 1.5 ms = 90° center, and ~2.0 ms (or 2.5 ms) = 180°!

f = 50 Hz (T = 20 ms) | Pulse(µs) = 500 + (Angle ÷ 180) × 2000

In Arduino `Servo.h`, `myServo.write(90)` outputs a 1500 µs pulse; `myServo.writeMicroseconds(1500)` gives sub-degree precision.

SymbolComponentReal-World Engineering Tip
SRV1SG90 Micro Servo (180° Closed-Loop)Never force a powered servo horn by hand — it strips plastic gears instantly. Use MG90S or MG996R metal-gear servos for heavy loads.

Real-World Bench Scenario: Raspberry Pi Servo Jitter Fix: Software PWM in Python fluctuates when Linux runs background tasks — use `pigpio` or a 16-channel I2C PCA9685 PWM driver board!

Bench Challenge: Sweep Test: Slide the angle from 0° to 90° to 180° and watch the 2.5D SG90 horn rotate while the 50 Hz pulse widens from 500 µs to 2500 µs!

Frequently Asked Questions

Why does my SG90 buzz loudly when commanded to 0° or 180°?

Many budget SG90 servos have physical end-stops slightly narrower than 500–2500 µs (e.g. 600–2400 µs), causing the motor to push against the mechanical stop and draw high stall current. Constrain angles to 10°–170°!

Continue Exploring Related 2.5D Labs
26. WS2812B LED Strip →28. HC-SR04 Ultrasonic →29. Opto Relay Module →

OHMYARD · ALL 30 INTERACTIVE LABS & SIMULATORS

1. Closed Loop & Faults
/closed-loop
2. Ohm's Law & Thermal
/ohm-law
3. Series vs Parallel
/series-parallel
4. X-Ray Breadboard
/breadboard-simulator
5. LED Resistor & E24
/led-resistor-calculator
6. Voltage Divider & Load
/voltage-divider
7. Multimeter Trainer
/multimeter-simulator
8. RC & Oscilloscope
/rc-oscilloscope
9. 555 Timer Pulse Lab
/555-timer
10. Diode & Rectifier
/diode-rectifier
11. Transistor & Flyback
/transistor-switch
12. PWM Dimmer & Fan
/pwm-dimmer
13. Op-Amp Comparator
/opamp-comparator
14. H-Bridge & Shoot-Through
/h-bridge-motor
15. Buck vs LDO Power
/buck-converter
16. Digital Logic Gates
/logic-gates
17. Resistor Color Code
/resistor-color-code
18. ESP32 Pinout Guide
/esp32-pinout
19. Arduino Uno Pinout
/arduino-uno-pinout
20. Zener Voltage Clamp
/zener-diode-regulator
21. I2C Pull-Up Bus
/i2c-pullup-bus
22. Battery Life & Sleep
/battery-life-calculator
23. PCB Trace Width
/pcb-trace-width
24. Wheatstone Bridge
/wheatstone-bridge
25. Raspberry Pi GPIO
/raspberry-pi-pinout
26. WS2812B LED Strip
/ws2812b-led-strip
27. SG90 Servo PWM
/servo-pwm-control
28. HC-SR04 Ultrasonic
/ultrasonic-hcsr04
29. Opto Relay Module
/relay-optocoupler
30. 3.3V ⇄ 5V Shifter
/logic-level-shifter