ESP32 MG90S Mini Servo
The MG90S is a robust micro servo motor designed for robotics and DIY projects. Operating on 4.8V to 6V, it provides up to 2.2 kg·cm torque, with a 0° to 180° range controlled via PWM signals. Weighing 13.4g, its durable metal gears and dimensions (22.8mm x 12.2mm x 31mm) make it ideal for applications requiring more torque and reliability.
Quick Links
MG90S Price
About MG90S Mini Servo
The MG90S is a metal-gear micro servo motor widely used in robotics, RC models, and DIY electronics projects. It operates on an input voltage range of 4.8V to 6V and provides a torque of up to 2.2 kg·cm at 4.8V. The servo supports an angular range of 0° to 180° and is controlled via PWM signals, where a pulse width of 1ms corresponds to 0°, 1.5ms to 90°, and 2ms to 180°. Slightly heavier than the SG90, the MG90S weighs approximately 13.4 grams and has dimensions of 22.8mm x 12.2mm x 31mm. Its durable metal gears provide improved strength and reliability, making it suitable for applications requiring more torque and robustness compared to nylon-geared servos.
MG90S Sensor Technical Sepcifications
Below you can see the MG90S Mini Servo Technical Specifications. The sensor is compatible with the ESP32, operating within a voltage range suitable for microcontrollers. For precise details about its features, specifications, and usage, refer to the sensor’s datasheet.
- Protocol: PWM
- Interface: PWM
- Torque: 2.2 kg·cm at 4.8V
- Operating Speed: 0.1 s/60° at 4.8V
- Operating Range: 0° to 180°
- Voltage: 4.8V to 6.0V
- Weight: 13.4 grams
- Gear Material: Metal
- Dimensions: 22.8mm x 12.2mm x 31mm
MG90S Sensor Pinout
Below you can see the pinout for the MG90S Mini Servo. The VCC
pin is used to supply power to the sensor, and it typically requires 3.3V or 5V (refer to the datasheet for specific voltage requirements). The GND
pin is the ground connection and must be connected to the ground of your ESP32!
- The servo's
GND
wire (brown) is used to complete the electrical circuit and must be connected to the ground of the ESP32 and/or the external power source. - The servo's
+5V
wire (red) supplies power to the servo motor and must receive 5 volts from the ESP32 or an external power source. - The servo's
DATA
wire (orange) carries the PWM signal to control the servo's position and should be connected to a PWM-capable GPIO pin on the ESP32.
MG90S Wiring with ESP32
Below you can see the wiring for the MG90S Mini Servo with the ESP32. Connect the VCC pin of the sensor to the 3.3V pin on the ESP32 or external power supply for power and the GND pin of the sensor to the GND pin of the ESP32. Depending on the communication protocol of the sensor (e.g., I2C, SPI, UART, or analog), connect the appropriate data and clock or signal pins to compatible GPIO pins on the ESP32, as shown below in the wiring diagram.
- Connect the MG90S servo's signal wire (orange) to a PWM-capable GPIO pin on the ESP32 (e.g.,
GPIO 13
). - Connect the power wire (red) to the
5V
pin on the ESP32 or an external power source. - Connect the ground wire (brown) to the ESP32's
GND
pin and ensure it's shared with the external power source if used.
Code Examples
Below you can find code examples of MG90S Mini Servo with ESP32 in different frameworks:
ESP32 MG90S Arduino IDE Code Example
You can find the ESP32 MG90S Arduino IDE code in General Servo sensor page.
ESP32 MG90S ESP-IDF Code ExampleExample in Espressif IoT Framework (ESP-IDF)
You can find the ESP32 MG90S ESP-IDF code in General Servo sensor page.
ESP32 MG90S ESPHome Code Example
You can find the ESP32 MG90S ESPHome code in General Servo sensor page.
ESP32 MG90S PlatformIO Code Example
You can find the ESP32 MG90S PlatformIO code in General Servo sensor page.
ESP32 MG90S MicroPython Code Example
You can find the ESP32 MG90S MicroPython code in General Servo sensor page.
Conclusion
We went through technical specifications of MG90S Mini Servo, its pinout, connection with ESP32 and MG90S Mini Servo code examples with Arduino IDE, ESP-IDF, ESPHome and PlatformIO.