SG90 / MG996R Servo Motor Angle & 50 Hz Pulse-Width Lab — Engineering Notes & Troubleshooting
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°!
In Arduino `Servo.h`, `myServo.write(90)` outputs a 1500 µs pulse; `myServo.writeMicroseconds(1500)` gives sub-degree precision.
- Standard 3-wire color code: Brown/Black = GND, Red = +5V (center pin so reversing the plug won't kill it!), Orange/Yellow = PWM Signal.
- A stalled MG996R metal-gear servo draws up to 2.5 Amps! Always use an external 5V–6V BEC/supply and share GND with your Arduino/ESP32/Pi.
| Symbol | Component | Real-World Engineering Tip |
|---|---|---|
| SRV1 | SG90 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!