Actuator

⚙️ MG90S Servo Motor (360° Continuous Rotation)

📌 Description

The MG90S 360° servo is a continuous rotation servo. Unlike the SG90 (which moves to exact angles between 0° and 180°), the MG90S rotates freely in either direction. The PWM signal determines:

  • Speed (how fast it spins).
  • Direction (clockwise or counter‑clockwise).

🎯 Use

In our projects, the MG90S is used to:

  • Drive robot wheels.
  • Create continuous motion (like conveyor belts).
  • Provide rotational movement where exact angles are not needed.

👉 Think of the MG90S as the robot’s wheel motor — it spins continuously instead of stopping at a fixed angle.

Module parameters

Pin name Description
Brown line GND (Power Input Negative)
Red line VCC (Power Input Cathode)
Orange line Control signal pins
  • Supply voltage: 4.8V to 6V DC
  • Standby Current: 5mA
  • Limit Angle: 210°±5%
  • Torque: 1.3 to 1.7kg/cm
  • Operating temperature: -10°C to 60°C
  • Humidity range: 60%±10%
  • Rotational speed: 0.09 to 0.10 sec/60° (4.8V)
  • Signal period: 20 ms
  • Signal High Level Time Range: 1000 to 2000 us/cycle

🖥️ Corrected Code Example

Your code is written for a 180° servo, but for a 360° servo we control speed/direction instead of angles. Here’s a better example:

import machine
import time

pwm25 = machine.PWM(machine.Pin(25))   # Servo connected to pin 25
pwm25.freq(50)                         # Standard servo frequency (50 Hz)

while True:
    pwm25.duty(40)   # Rotate clockwise at full speed
    time.sleep(1)
    pwm25.duty(77)   # Stop (neutral position)
    time.sleep(1)
    pwm25.duty(115)  # Rotate counter-clockwise at full speed
    time.sleep(1)
    pwm25.duty(77)   # Stop again
    time.sleep(1)

Step by Step

  1. pwm25 = machine.PWM(machine.Pin(25)) → Sets up PWM output on pin 25.
  2. pwm25.freq(50) → Standard servo frequency (50 Hz).
  3. pwm25.duty(40) → Spins clockwise.
  4. pwm25.duty(115) → Spins counter‑clockwise.
  5. pwm25.duty(77) → Neutral duty cycle → servo stops.
  6. Loop repeats → The servo alternates between clockwise, stop, counter‑clockwise, stop.

👉 Duty values vary depending on calibration, but typically:

  • ~40 → Full speed clockwise.
  • ~115 → Full speed counter‑clockwise.
  • ~77 → Stop.

✅ Conclusion of the Test

  • If the servo spins clockwise, stops, then spins counter‑clockwise, the program is working correctly.
  • This test shows how the robot can control continuous rotation with a servo motor.
  • Later, the MG90S could be used for robot wheels, rotating sensors, or conveyor systems.
On this page