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

How to Use SG90 Servo Motr: Examples, Pinouts, and Specs

Image of SG90 Servo MotrDesign with SG90 Servo Motr in Cirkit Designer

Introduction

The SG90 Servo Motor by AC (Manufacturer Part ID: Servo Motor) is a small, lightweight, and cost-effective servo motor widely used in robotics, RC vehicles, and hobby electronics projects. It is capable of precise angular movement, making it ideal for applications requiring controlled motion. The SG90 operates using Pulse Width Modulation (PWM) signals, allowing users to set the motor's position with high accuracy.

Explore Projects Built with SG90 Servo Motr

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 Itsy Bitsy M0 Express Controlled Multi-Servo System: A project utilizing SG90 Servo Motr in a practical application
Itsy Bitsy M0 Express Controlled Multi-Servo System

This circuit consists of an Itsy Bitsy M0 Express microcontroller connected to eight Tower Pro SG90 servos. Each servo is controlled by a different digital or analog output pin on the microcontroller. A single power supply provides +5V and GND to all servos, and the microcontroller is configured with some of its pins interconnected for potential programming or operational purposes.

Open Project in Cirkit Designer
Image of Arduino UNO Controlled Servo Motor Sequence: A project utilizing SG90 Servo Motr in a practical application
Arduino UNO Controlled Servo Motor Sequence

This circuit consists of an Arduino UNO microcontroller connected to a Tower Pro SG90 servo motor. The Arduino provides power (5V and GND) to the servo and controls its position via digital pin D7. The embedded code on the Arduino cycles the servo through a range of positions with delays between each movement.

Open Project in Cirkit Designer

Common Applications

Technical Specifications

The SG90 Servo Motor is designed for low-power applications and offers reliable performance in compact setups. 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.12 s/60° (4.8V) / 0.10 s/60° (6.0V)
Control Signal PWM (Pulse Width Modulation)
PWM Pulse Range 500 µs to 2400 µs
Angle Range 0° to 180°
Weight 9 grams
Dimensions 22.2 x 11.8 x 31 mm
Gear Type Plastic

Pin Configuration

The SG90 Servo Motor has a 3-pin connector for interfacing with a microcontroller or power source. The pinout is as follows:

Pin Wire Color Description
1 Brown Ground (GND)
2 Red Power Supply (VCC)
3 Orange PWM Signal Input

Usage Instructions

The SG90 Servo Motor is simple to use and can be controlled with any microcontroller capable of generating PWM signals, such as an Arduino UNO. Below are the steps to use the SG90 in a circuit:

Connecting the SG90 Servo Motor

  1. Power Supply: Connect the red wire to a 5V power source (e.g., Arduino's 5V pin).
  2. Ground: Connect the brown wire to the ground (GND) of the circuit.
  3. PWM Signal: Connect the orange wire to a PWM-capable pin on the microcontroller (e.g., Pin 9 on Arduino UNO).

Arduino UNO Example Code

The following code demonstrates how to control the SG90 Servo Motor using an Arduino UNO:

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

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

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

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

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

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

Important Considerations

Troubleshooting and FAQs

Common Issues and Solutions

  1. Servo Not Moving

    • Cause: Incorrect wiring or insufficient power supply.
    • Solution: Double-check the connections and ensure the power supply provides at least 4.8V.
  2. Erratic Movement

    • Cause: Noise in the PWM signal or insufficient current.
    • Solution: Use a decoupling capacitor near the servo's power pins and ensure the power source is stable.
  3. Limited Range of Motion

    • Cause: PWM signal out of range.
    • Solution: Ensure the PWM pulse width is between 500 µs and 2400 µs.
  4. Overheating

    • Cause: Prolonged stall condition or excessive load.
    • Solution: Reduce the load and avoid stalling the servo for extended periods.

FAQs

Q: Can I power the SG90 directly from an Arduino UNO?
A: Yes, but it is recommended to use an external power source if multiple servos are used or if the servo operates under heavy load.

Q: What is the maximum angle the SG90 can rotate?
A: The SG90 can rotate between 0° and 180°.

Q: Can the SG90 be used for continuous rotation?
A: No, the SG90 is a positional servo and is not designed for continuous rotation. For continuous rotation, consider using a modified servo or a dedicated continuous rotation servo.

Q: How do I calibrate the servo's neutral position?
A: Use the myServo.write(90); command to set the servo to its neutral position (90°) and adjust the physical mounting if necessary.

By following this documentation, you can effectively integrate the SG90 Servo Motor into your projects and troubleshoot common issues with ease.