ShillehTek MG90S metal gear micro servo motor with accessories and screws

ShillehTek MG90S Metal Gear Micro Servo Motor 180 Degree 9g for RC Plane | ShillehTek Product Manual

$6.99 USD In stock · Order by 3pm ET, ships today

Overview

The MG90S is a 9-gram metal-gear micro servo motor designed for precise position control between 0 and 180 degrees. Its all-metal brass and aluminum gear train resists stripping under heavier loads, making it a common alternative to the plastic-geared SG90. Verify the body, horn and bracket fit before substituting one for the other. With up to about 2.2 kg-cm of stall torque at 6V and a standard 3-wire interface, it is well suited for RC planes, robotic arms, pan-tilt camera mounts, biped robots, and small motion projects.

Like all hobby servos, the MG90S is controlled with a single PWM signal — typically a 50 Hz pulse where the pulse width (roughly 500 to 2400 microseconds) sets the target angle. That makes it directly compatible with Arduino's Servo library, MicroPython's PWM module on Raspberry Pi Pico and ESP32, and Raspberry Pi GPIO PWM via Python.

The servo accepts 4.8V to 6V on the red wire, ground on the brown wire, and the PWM signal on the orange wire. The 3.3V GPIO on Pico, ESP32, and Raspberry Pi is sufficient to drive the signal pin reliably, but you should always power the servo from a separate 5V supply rather than the board's regulator to avoid brownouts and resets under load.

Pan-tilt horn fit: The servo's supplied horns may fit its shaft while their outer shape is too large for a pan-tilt base. Some servo horns need their outer arms trimmed to fit the bracket recess. Use a horn that already matches the servo spline. See horn fit and trimming before assembly.

At a Glance

Operating Voltage
4.8V - 6V
Stall Torque
~2.2 kg-cm @ 6V
Rotation Range
0 - 180 degrees
Control Signal
50 Hz PWM
Pin Count
3 wires
Wires
+5V, GND, PWM

Specifications

Parameter Value
Operating Voltage 4.8V - 6V DC
No-Load Current ~100 - 200 mA
Stall Current ~650 - 800 mA
Stall Torque 1.8 kg-cm @ 4.8V / 2.2 kg-cm @ 6V
Rotation Range 0 - 180 degrees
Operating Speed 0.10 sec / 60 deg @ 4.8V
Control Signal 50 Hz PWM, 500 - 2400 us pulse width
Gear Material Metal (brass and aluminum)
Wire Length ~25 cm (3-pin JR/Futaba connector)
Weight ~13.4 g
Dimensions 22.8 x 12.2 x 28.5 mm
Operating Temperature -30 to +60 degrees C

Servo Horn Fit & Pan-Tilt Mounting

A servo horn is the plastic arm that couples a bracket to the servo's toothed output shaft (the spline). Check two separate fits: the horn's center socket must match the servo spline, and its outer shape must fit the bracket recess. A horn can pass one check and fail the other.

Use a horn that fits your servo. A horn supplied with a bracket may have a different socket from the horns supplied with your MG90S. If it will not seat on the spline, use the matching horn from the servo's accessory bag. Do not force it, drill or file the socket, or use the center screw to pull a mismatched horn onto the shaft.

When the horn fits the shaft but not the recess

Horn shapes vary between servo batches. Some matching MG90S horns need their outer arms shortened to sit flat in the pan-tilt base. Trimming changes the outer outline only; it cannot correct an incompatible center socket. If the center hub itself is too wide or thick, or the required screw holes would be lost, stop and contact admin@shillehtek.com for a suitable part.

  1. Check before cutting. With power disconnected, test the horn on the servo spline, then remove it and place it in the bracket recess. Identify the outer plastic that touches the recess walls.
  2. Mark the excess. Keep the center hub, toothed socket, and every screw hole needed to attach the horn to the bracket intact. There is no single cut length for every horn.
  3. Trim off the servo. Wear eye protection and support the horn securely. Use small flush cutters to remove small amounts from the marked arm ends. Keep fingers away from the cutting edges.
  4. Refit gradually. Smooth rough edges with a small file and test the horn in the recess after each cut. It should lie flat without bending or being forced. Do not thin the center hub to make it fit.
  5. Center, then assemble. Command the unloaded servo to 90° with your controller or servo tester, then disconnect power. Refit the horn in the centered orientation and use the correct short horn-retaining screw. A long mounting screw can damage the servo.

Photo examples: where trimming may be needed

These Adafruit photos illustrate horn trimming on a similar mini pan-tilt kit. The white horns shown are examples, not photos of our MG90S batch; compare the actual contact points on your parts rather than copying a cut size.

Adafruit comparison of four white servo horns: the two outer horns have shortened arms and the two center horns are unmodified.
Different horn outlines: the outer two have been trimmed. Photo: Bill Earl / Adafruit, components_234A0924.jpg, unchanged, CC BY-SA 3.0.
Adafruit example showing a white cross-shaped servo horn over a black pan-tilt base, with red marks indicating excess arm plastic.
Example of excess outer plastic marked for removal. Photo: Bill Earl / Adafruit, components_IMG_5230.jpg, unchanged, CC BY-SA 3.0.

Photo source and further illustrated instructions: Bill Earl's Mini Pan-Tilt Kit Assembly, Adafruit Learning System. Adafruit's example hardware may differ from yours; its guide does not certify compatibility with every MG90S version.

For the complete bracket assembly sequence, see the ShillehTek pan-tilt kit manual. After fitting the horn, test small movements around center and establish travel limits before adding a load.

Pinout Diagram

MG90S micro servo wiring diagram showing the three-wire connector with RED (+5V), BROWN (GND), and Orange (PWM signal) lines

Wiring Guide

Arduino Wiring

The MG90S works with any Arduino board that supports the Servo library. Power the servo from the Arduino 5V pin only for short bench tests with a single servo and no load — for anything beyond that, use a separate 5V supply and tie its ground to the Arduino ground.

MG90S Wire Arduino Pin Details
Red (+5V) 5V (or external 5V) Use external supply if servo stalls or causes resets
Brown (GND) GND Common ground with Arduino if using external supply
Orange (PWM) Digital Pin 9 Any PWM-capable digital pin works
Warning: Powering the MG90S from the Arduino's onboard 5V regulator can cause the board to brown out and reset, especially under load or when the servo stalls. For reliable operation, power the servo from a dedicated 5V supply (such as 4 x AA batteries or a 5V/2A adapter) and connect that supply's ground to the Arduino GND.
Tip: Add a 100 - 470 uF electrolytic capacitor across the servo's +5V and GND wires near the connector. It helps absorb the inrush current when the servo starts moving and reduces jitter on the signal line.

ESP32 Wiring

The ESP32's 3.3V GPIO is high enough to drive the MG90S signal pin reliably. Always power the servo from a separate 5V source — the ESP32's onboard regulator cannot supply enough current for a servo and will reset under load.

MG90S Wire ESP32 Pin Details
Red (+5V) External 5V supply Do NOT use ESP32 3.3V or VIN under load
Brown (GND) GND Tie external supply ground to ESP32 GND
Orange (PWM) GPIO 18 Any output-capable GPIO works (avoid GPIO 6-11)
Warning: The ESP32 can be damaged if back-EMF from the servo couples into VIN or 3.3V. Always use a separate supply for the servo and only share grounds.
Tip: The ESP32's LEDC peripheral gives you precise 16-bit PWM. Use 50 Hz frequency and a duty corresponding to a pulse width between roughly 500 us and 2400 us to sweep the full 0 - 180 degree range.

Raspberry Pi Wiring

The Raspberry Pi GPIO operates at 3.3V, which is enough to drive the MG90S signal pin. Software PWM works for one or two servos, but for jitter-free control of multiple servos, use the hardware PWM pins (GPIO 12, 13, 18, 19) or the pigpio daemon.

MG90S Wire Raspberry Pi Pin Details
Red (+5V) External 5V supply Do NOT use the Pi's 5V pin for servos under load
Brown (GND) Pin 6 (GND) Tie external 5V supply ground to Pi GND
Orange (PWM) Pin 12 (GPIO 18) Hardware PWM pin — recommended for smooth motion
Warning: The Pi's onboard 5V rail is shared with the SoC, USB, and HDMI. Drawing servo current from it can crash the Pi or corrupt the SD card. Always use an external 5V supply for the servo.
Tip: The pigpio library produces much smoother servo motion than RPi.GPIO software PWM. Install it with sudo apt install pigpio python3-pigpio, start the daemon with sudo pigpiod, and use pigpio.pi().set_servo_pulsewidth().

Raspberry Pi Pico Wiring

Every GPIO on the Pico can output hardware PWM, so any output-capable pin works for the signal wire. As with the other 3.3V boards, the Pico's onboard 3.3V regulator cannot power a servo — use a separate 5V supply.

MG90S Wire Pico Pin Details
Red (+5V) VBUS or external 5V VBUS works only if Pico is USB-powered; external supply preferred
Brown (GND) GND Common ground with Pico
Orange (PWM) GP15 Any GPIO — Pico has hardware PWM on every pin
Warning: Do not power the MG90S from the 3V3(OUT) pin — it is regulated down from VBUS and cannot deliver servo-level current. Use VBUS (USB 5V) only when no other load is on the bus, and prefer an external supply for any sustained motion.
Tip: In MicroPython, set the PWM frequency to 50 Hz and write a 16-bit duty value. A duty of about 1638 (~2.5%) corresponds to 0 degrees, and 8192 (~12.5%) corresponds to 180 degrees. Calibrate to your specific servo for full sweep.

Code Examples

Arduino

mg90s_arduino.ino
// MG90S Servo Sweep - Arduino Example
// Signal pin: Digital 9
// Power the servo from an external 5V supply with a common ground.

#include <Servo.h>

Servo myServo;
const int servoPin = 9;

void setup() {
  Serial.begin(9600);
  // attach(pin, minPulseUs, maxPulseUs) — tune these for your servo
  myServo.attach(servoPin, 500, 2400);
  myServo.write(90);   // center
  delay(500);
}

void loop() {
  // Sweep 0 to 180 degrees
  for (int angle = 0; angle <= 180; angle++) {
    myServo.write(angle);
    delay(15);
  }

  // Sweep back 180 to 0 degrees
  for (int angle = 180; angle >= 0; angle--) {
    myServo.write(angle);
    delay(15);
  }
}

ESP32 (Arduino Core)

mg90s_esp32.ino
// MG90S Servo - ESP32 Arduino Example using LEDC PWM
// Signal pin: GPIO 18
// Power the servo from a separate 5V supply, share ground with ESP32.

const int servoPin = 18;
const int pwmChannel = 0;
const int pwmFreq = 50;        // 50 Hz for hobby servos
const int pwmResolution = 16;  // 16-bit duty

// Pulse width in microseconds at 50 Hz: 20000 us period
// Duty = (pulseUs / 20000) * 65535
int pulseToDuty(int pulseUs) {
  return (int)(((long)pulseUs * 65535L) / 20000L);
}

void writeAngle(int angle) {
  if (angle < 0) angle = 0;
  if (angle > 180) angle = 180;
  int pulseUs = map(angle, 0, 180, 500, 2400);
  ledcWrite(pwmChannel, pulseToDuty(pulseUs));
}

void setup() {
  Serial.begin(115200);
  ledcSetup(pwmChannel, pwmFreq, pwmResolution);
  ledcAttachPin(servoPin, pwmChannel);
  writeAngle(90);
  delay(500);
}

void loop() {
  for (int a = 0; a <= 180; a++) {
    writeAngle(a);
    delay(15);
  }
  for (int a = 180; a >= 0; a--) {
    writeAngle(a);
    delay(15);
  }
}

Raspberry Pi (Python)

mg90s_rpi.py
#!/usr/bin/env python3
# MG90S Servo - Raspberry Pi Example using gpiozero
# Signal pin: GPIO 18 (physical pin 12)
# Power the servo from a separate 5V supply, share ground with the Pi.
#
# For smoothest motion, run pigpiod first:
#   sudo pigpiod
# Then run this script.

from gpiozero import AngularServo
from gpiozero.pins.pigpio import PiGPIOFactory
from time import sleep

# Use pigpio backend for jitter-free PWM
factory = PiGPIOFactory()

servo = AngularServo(
    18,
    min_angle=0,
    max_angle=180,
    min_pulse_width=0.0005,   # 500 us
    max_pulse_width=0.0024,   # 2400 us
    pin_factory=factory,
)

try:
    while True:
        for angle in range(0, 181, 2):
            servo.angle = angle
            sleep(0.015)
        for angle in range(180, -1, -2):
            servo.angle = angle
            sleep(0.015)
except KeyboardInterrupt:
    print("Stopped by user")
finally:
    servo.detach()

Raspberry Pi Pico (MicroPython)

mg90s_pico.py
# MG90S Servo - Pico MicroPython Example
# Signal pin: GP15
# Power the servo from a separate 5V supply, share ground with Pico.

from machine import Pin, PWM
from time import sleep

servo = PWM(Pin(15))
servo.freq(50)  # 50 Hz for hobby servos

# 16-bit duty mapping for 500 - 2400 us pulse on a 20000 us period
MIN_DUTY = 1638   # ~500 us  -> 0 degrees
MAX_DUTY = 7864   # ~2400 us -> 180 degrees

def write_angle(angle):
    if angle < 0:
        angle = 0
    if angle > 180:
        angle = 180
    duty = MIN_DUTY + int((MAX_DUTY - MIN_DUTY) * angle / 180)
    servo.duty_u16(duty)

try:
    while True:
        for a in range(0, 181, 2):
            write_angle(a)
            sleep(0.015)
        for a in range(180, -1, -2):
            write_angle(a)
            sleep(0.015)
except KeyboardInterrupt:
    print("Stopped by user")
    servo.deinit()

Frequently Asked Questions

What do the three wire colors on the MG90S mean?
Red is +5V power, Brown is ground (GND), and Orange is the PWM control signal. The connector is a standard 3-pin JR/Futaba header that plugs directly into most servo drivers and breakout boards.
Can I power the MG90S from my Arduino, Pico, or ESP32 directly?
Only for very brief, no-load tests. The servo can draw 600 - 800 mA when starting or stalling, which exceeds what most onboard regulators can supply. The board will brown out, reset, or behave erratically. Always use an external 5V supply (4 x AA batteries, a 5V/2A adapter, or a buck converter from a battery pack) and tie its ground to the board's ground.
Do I need a level shifter for the signal pin on a 3.3V board?
No. The MG90S signal input is high-impedance and triggers reliably on a 3.3V logic-high pulse. Pico, ESP32, and Raspberry Pi GPIO can drive the orange wire directly without any level shifter or transistor.
My servo jitters or hums when it should be still — how do I fix it?
Jitter usually comes from one of three causes: software PWM (use hardware PWM or pigpio on the Pi), a noisy power supply (add a 100 - 470 uF capacitor across the servo's +5V and GND), or a pulse width that lands just past the mechanical end-stop (calibrate your min/max pulse to fit your specific servo, often 600 - 2300 us instead of 500 - 2400 us).
How do I rotate beyond 180 degrees or run continuously?
You cannot. The MG90S has an internal potentiometer and end-stops that limit travel to 0 - 180 degrees. To get continuous rotation you would need a different "continuous rotation" servo, or a regular DC gear motor with a driver. Forcing the MG90S past its end-stops will strip even the metal gears over time.
What library should I use?
Arduino: the built-in Servo.h library. ESP32 Arduino: either the ESP32Servo library or the LEDC PWM peripheral directly. Raspberry Pi: gpiozero with the PiGPIOFactory backend (after installing and starting pigpiod) for smooth motion. Pico MicroPython: the built-in machine.PWM module is sufficient.
Is the MG90S a drop-in replacement for the SG90?
It is a similar micro-servo body class, but do not assume every SG90 horn or bracket is a direct fit. Check body clearance, mounting tabs, the horn's center socket and the bracket recess on your actual parts. Use a horn that matches your MG90S spline; its outer arms may need trimming for a pan-tilt base, as shown in the mounting instructions. It uses a standard 3-wire servo interface, but verify power requirements and calibrate travel limits for your assembly.

Related Tutorials

Datasheets & downloads

Reference documents for the MG90S Metal Gear 9g Micro Servo Motor 180° for RC Plane. This manual covers wiring and code; the documents below carry the full electrical specifications.