Stufin
Home Quick Cart Profile

MG90S Mini Servo Motor(180 Degree)

Buy Now

Rated Voltage

4.8-6.6V

Rated Torque

1.8 kg/cm

Rated Speed

60 degrees per second

Range of Motion

180 degrees

Operating Temperature

-20C to 60C

Weight

approximately 25 grams

Dimensions

22.8 mm x 12.2 mm x 28.5 mm

Pinout

The MG90S Mini Servo Motor has a standard 3-pin connector
VCC (Red wire)Positive power supply voltage
GND (Black wire)Ground
Signal (Yellow/White wire)PWM control signal

Pin Configuration

  • MG90S Mini Servo Motor (180 Degree) Pinout and Connection Guide
  • The MG90S Mini Servo Motor is a compact and lightweight servo motor designed for various IoT and robotics applications. It has a maximum rotation angle of 180 degrees and is widely used in robotic arms, grippers, and other mechanisms that require precise angular movement. Here's a detailed explanation of the pins and their connections:
  • Pin Structure:
  • The MG90S Mini Servo Motor has a 3-pin male JST connector. The pins are labeled as follows:
  • Pin 1: VCC (Red Wire)
  • Function: Power Supply (Positive)
  • Description: This pin should be connected to a stable power supply, typically between 4.8V to 6V. The recommended voltage is 5V.
  • Connection: Connect to the positive terminal of your power source (e.g., battery or voltage regulator output).
  • Pin 2: GND (Brown Wire)
  • Function: Ground
  • Description: This pin should be connected to the ground terminal of your power source.
  • Connection: Connect to the negative terminal of your power source (e.g., battery or voltage regulator ground).
  • Pin 3: SIG (Orange Wire)
  • Function: Signal Input
  • Description: This pin receives the control signal from your microcontroller or servo controller. The signal is typically a PWM (Pulse Width Modulation) signal.
  • Connection: Connect to the corresponding servo signal pin on your microcontroller or servo controller.
  • Connection Example:
  • Here's an example of how to connect the MG90S Mini Servo Motor to an Arduino Uno board:
  • Connect the VCC (Red Wire) pin to the 5V pin on the Arduino Uno board.
  • Connect the GND (Brown Wire) pin to the GND pin on the Arduino Uno board.
  • Connect the SIG (Orange Wire) pin to any available digital pin on the Arduino Uno board (e.g., Digital Pin 9).
  • Important Notes:
  • Make sure to use a stable power supply to avoid damage to the servo motor.
  • The servo motor should not be operated without a load or with excessive load, as this can cause damage to the motor.
  • When connecting the servo motor to a microcontroller or servo controller, ensure that the signal format and frequency are compatible with the servo motor's requirements.
  • By following these pinout and connection guidelines, you can successfully integrate the MG90S Mini Servo Motor into your IoT or robotics project.

Code Examples

MG90S Mini Servo Motor (180 Degree) Documentation
Overview
The MG90S Mini Servo Motor is a small, high-torque servo motor capable of rotating up to 180 degrees. It is commonly used in robotics, automation, and IoT projects that require precise angular control. This documentation provides an overview of the component's specifications, pinouts, and code examples to help you get started with using the MG90S Mini Servo Motor in your projects.
Specifications
Operating Voltage: 4.8V to 6.6V
 Stall Torque: 1.6 kg.cm (230 oz.in)
 Rotation Angle: 180 degrees
 Speed: 0.12 sec/60 degrees
 Weight: 9g
 Dimensions: 23 x 12 x 23 mm
Pinouts
The MG90S Mini Servo Motor has a standard 3-pin servo connector:
VCC (Red): Power supply (4.8V to 6.6V)
 GND (Brown): Ground
 Signal (Orange): Control signal (PWM)
Code Examples
### Example 1: Basic Servo Control with Arduino
This example demonstrates how to control the MG90S Mini Servo Motor using an Arduino board.
```c++
#include <Servo.h>
Servo myServo;  // create a servo object
void setup() {
  myServo.attach(9);  // attach the servo to digital pin 9
}
void loop() {
  myServo.write(0);  // set the servo to 0 degrees
  delay(1000);
  myServo.write(90);  // set the servo to 90 degrees
  delay(1000);
  myServo.write(180);  // set the servo to 180 degrees
  delay(1000);
}
```
### Example 2: Sweep Control with Raspberry Pi (Python)
This example demonstrates how to control the MG90S Mini Servo Motor using a Raspberry Pi and Python.
```python
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)  # set up GPIO 18 as an output
pwm = GPIO.PWM(18, 50)  # create a PWM object with a frequency of 50 Hz
pwm.start(0)  # start the PWM with a duty cycle of 0
while True:
    for i in range(0, 181, 10):  # sweep the servo from 0 to 180 degrees
        pwm.ChangeDutyCycle(i / 18 + 2)  # calculate the duty cycle for the current angle
        time.sleep(0.1)
    time.sleep(1)
```
### Example 3: Servo Control with ESP32 (MicroPython)
This example demonstrates how to control the MG90S Mini Servo Motor using an ESP32 board and MicroPython.
```python
import machine
import time
servo = machine.PWM(machine.Pin(18), freq=50)  # create a PWM object with a frequency of 50 Hz
while True:
    for i in range(0, 180, 10):  # sweep the servo from 0 to 180 degrees
        servo.duty(i)  # set the duty cycle for the current angle
        time.sleep(0.1)
    time.sleep(1)
```
Note: Make sure to adjust the pin numbers and PWM frequencies according to your specific board and setup. Additionally, ensure that the power supply to the servo motor is within the recommended voltage range.