Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use Servo MG90S: Examples, Pinouts, and Specs

Image of Servo MG90SDesign with Servo MG90S in Cirkit Designer

Introduction

The MG90S is a small, lightweight servo motor commonly used in robotics and hobby projects. It features a metal gear for improved durability and provides precise control of angular position, making it ideal for applications requiring movement and positioning. This servo motor is widely appreciated for its reliability, compact size, and ease of use, making it a popular choice for beginners and professionals alike.

Explore Projects Built with Servo MG90S

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of ESP8266 NodeMCU-Based Sensor Monitoring System: A project utilizing Servo MG90S in a practical application
ESP8266 NodeMCU-Based Sensor Monitoring System

This circuit is designed around an ESP8266 NodeMCU microcontroller, which interfaces with a variety of sensors and a servo motor. It includes a PIR motion sensor to detect movement, a sound sensor for audio detection, and a water level sensor for monitoring liquid levels. The MG90S servo motor is controlled by the microcontroller, and the entire system is powered by a battery pack.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

The MG90S servo motor is designed to deliver high performance in a compact form factor. Below are its key technical details:

Parameter Specification
Operating Voltage 4.8V to 6.0V
Stall Torque 1.8 kg·cm (4.8V), 2.2 kg·cm (6.0V)
Operating Speed 0.1 sec/60° (4.8V), 0.08 sec/60° (6.0V)
Gear Type Metal
Weight 13.4 g
Dimensions 22.8 × 12.2 × 28.5 mm
Control Signal PWM (Pulse Width Modulation)
PWM Pulse Range 500 µs to 2500 µs
Rotation Angle 0° to 180°
Connector Type 3-pin female header (Dupont style)

Pin Configuration

The MG90S servo motor has a 3-wire connector with the following pinout:

Wire Color Function Description
Brown Ground (GND) Connect to the ground of the power supply
Red Power (VCC) Connect to a 4.8V–6.0V power source
Orange Signal (PWM) Connect to the PWM signal from a microcontroller

Usage Instructions

The MG90S servo motor is straightforward to use and can be controlled using a microcontroller like an Arduino. Below are the steps to use it in a circuit:

Circuit Connection

  1. Power Supply: Connect the red wire to a 5V power source and the brown wire to ground (GND). Ensure the power supply can provide sufficient current (at least 1A) to avoid voltage drops.
  2. Signal Connection: Connect the orange wire to a PWM-capable pin on your microcontroller (e.g., pin 9 on an Arduino UNO).
  3. Bypass Capacitor: Place a 100 µF capacitor across the power supply terminals to stabilize the voltage and reduce noise.

Arduino Example Code

Below is an example of how to control the MG90S servo motor using an Arduino UNO:

#include <Servo.h> // Include the Servo library

Servo myServo; // Create a Servo object to control the MG90S

void setup() {
  myServo.attach(9); // Attach the servo to pin 9 on the Arduino
}

void loop() {
  myServo.write(0); // Move the servo to 0 degrees
  delay(1000); // Wait for 1 second

  myServo.write(90); // Move the servo to 90 degrees
  delay(1000); // Wait for 1 second

  myServo.write(180); // Move the servo to 180 degrees
  delay(1000); // Wait for 1 second
}

Important Considerations

Troubleshooting and FAQs

Common Issues

  1. Servo Not Moving

    • Cause: Incorrect wiring or insufficient power supply.
    • Solution: Double-check the wiring and ensure the power supply provides at least 1A of current.
  2. Servo Jittering

    • Cause: Electrical noise or unstable power supply.
    • Solution: Add a bypass capacitor (e.g., 100 µF) across the power supply terminals.
  3. Servo Overheating

    • Cause: Excessive mechanical load or prolonged operation at high torque.
    • Solution: Reduce the load or allow the servo to cool down periodically.
  4. Limited Rotation

    • Cause: The MG90S is a positional servo with a range of 0° to 180°.
    • Solution: Ensure your PWM signal is within the specified range (500 µs to 2500 µs).

FAQs

Q: Can the MG90S rotate continuously?
A: No, the MG90S is a positional servo with a limited rotation range of 0° to 180°. For continuous rotation, consider using a continuous rotation servo.

Q: Can I control multiple MG90S servos with one Arduino?
A: Yes, you can control multiple servos using different PWM-capable pins. However, ensure your power supply can handle the combined current draw of all servos.

Q: What happens if I exceed the torque rating?
A: Exceeding the torque rating can cause the servo to stall, overheat, or become damaged. Always operate within the specified limits.

Q: Can I use the MG90S with a Raspberry Pi?
A: Yes, the MG90S can be controlled using the Raspberry Pi's GPIO pins with a PWM signal. However, you may need a dedicated PWM driver for precise control.