Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Component Documentation

How to Use Servomotor SG90: Examples, Pinouts, and Specs

Image of Servomotor SG90
Cirkit Designer LogoDesign with Servomotor SG90 in Cirkit Designer

Introduction

The SG90 is a compact and lightweight servomotor widely used in the field of robotics and remote-controlled (RC) applications. Its popularity stems from its affordability and its ability to provide precise control of angular position. The SG90 is particularly well-suited for projects that require a simple and efficient method to control motion, such as small robotic arms, RC airplanes, and hobbyist projects.

Explore Projects Built with Servomotor SG90

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Wemos D1 Mini Controlled Quad Servomotor Interface
Image of sister: A project utilizing Servomotor SG90 in a practical application
This circuit consists of a Wemos D1 Mini microcontroller connected to four SG90 servomotors. Each servomotor is controlled by a separate digital output pin (D5, D6, D7, D8) from the Wemos D1 Mini. The servomotors share a common power supply from the 5V pin and a common ground with the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino UNO Controlled Servo Motor with Precise Angle Control
Image of Servo_Controll_Using_Arduino: A project utilizing Servomotor SG90 in a practical application
This circuit uses an Arduino UNO to control a Tower Pro SG90 servo motor. The Arduino provides power and ground to the servo, and sends control signals via digital pin D9 to rotate the servo between 90 and 180 degrees in a loop.
Cirkit Designer LogoOpen Project in Cirkit Designer
Arduino Sensor Shield Controlled Servo Motors
Image of robotarm_sensorshield: A project utilizing Servomotor SG90 in a practical application
This circuit utilizes an Arduino Sensor Shield v5.0 to interface with two types of servo motors: an SG90 servo motor and two MG996R servo motors. The SG90 is connected to pin 6 of the shield for PWM control, power (5V), and ground. Each MG996R servo motor is similarly connected to pins 4 and 5 of the shield for PWM control, power, and ground, allowing for independent control of the servo motors via the Arduino platform.
Cirkit Designer LogoOpen Project in Cirkit Designer
ESP8266 NodeMCU Controlled SG90 Servo Motor
Image of servo with esp8266: A project utilizing Servomotor SG90 in a practical application
This circuit connects an ESP8266 NodeMCU microcontroller to an SG90 servo motor. The NodeMCU's D4 pin controls the servo motor via PWM signal, while both the NodeMCU and servo motor share a common ground and the servo is powered directly from the NodeMCU's VIN pin. The circuit is designed to allow the microcontroller to control the position of the servo motor.
Cirkit Designer LogoOpen Project in Cirkit Designer

Explore Projects Built with Servomotor SG90

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 sister: A project utilizing Servomotor SG90 in a practical application
Wemos D1 Mini Controlled Quad Servomotor Interface
This circuit consists of a Wemos D1 Mini microcontroller connected to four SG90 servomotors. Each servomotor is controlled by a separate digital output pin (D5, D6, D7, D8) from the Wemos D1 Mini. The servomotors share a common power supply from the 5V pin and a common ground with the microcontroller.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of Servo_Controll_Using_Arduino: A project utilizing Servomotor SG90 in a practical application
Arduino UNO Controlled Servo Motor with Precise Angle Control
This circuit uses an Arduino UNO to control a Tower Pro SG90 servo motor. The Arduino provides power and ground to the servo, and sends control signals via digital pin D9 to rotate the servo between 90 and 180 degrees in a loop.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of robotarm_sensorshield: A project utilizing Servomotor SG90 in a practical application
Arduino Sensor Shield Controlled Servo Motors
This circuit utilizes an Arduino Sensor Shield v5.0 to interface with two types of servo motors: an SG90 servo motor and two MG996R servo motors. The SG90 is connected to pin 6 of the shield for PWM control, power (5V), and ground. Each MG996R servo motor is similarly connected to pins 4 and 5 of the shield for PWM control, power, and ground, allowing for independent control of the servo motors via the Arduino platform.
Cirkit Designer LogoOpen Project in Cirkit Designer
Image of servo with esp8266: A project utilizing Servomotor SG90 in a practical application
ESP8266 NodeMCU Controlled SG90 Servo Motor
This circuit connects an ESP8266 NodeMCU microcontroller to an SG90 servo motor. The NodeMCU's D4 pin controls the servo motor via PWM signal, while both the NodeMCU and servo motor share a common ground and the servo is powered directly from the NodeMCU's VIN pin. The circuit is designed to allow the microcontroller to control the position of the servo motor.
Cirkit Designer LogoOpen Project in Cirkit Designer

Common Applications and Use Cases

  • Robotic arms and grippers
  • RC airplanes, helicopters, and cars
  • Camera pan/tilt systems
  • Positioning of sensors or antennas
  • Educational projects and prototyping

Technical Specifications

Key Technical Details

  • Voltage: 4.8V to 6.0V
  • Current: 750mA (no load at 4.8V)
  • Stall Torque: 1.5 kg-cm at 4.8V, 1.8 kg-cm at 6V
  • Operating Speed: 0.12 sec/60° at 4.8V, 0.10 sec/60° at 6V
  • Temperature Range: -30°C to +60°C
  • Weight: 9g
  • Dimensions: 22.2 x 11.8 x 31 mm (LxWxH)

Pin Configuration and Descriptions

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

Usage Instructions

How to Use the Component in a Circuit

  1. Power Supply: Connect the red wire to a power supply that is within the servomotor's voltage range (4.8V to 6.0V).
  2. Ground: Connect the brown wire to the ground of your power supply and microcontroller.
  3. Control Signal: Connect the orange wire to a PWM-capable pin on your microcontroller.

Important Considerations and Best Practices

  • Ensure that the power supply can handle the current requirements of the servomotor, especially under load.
  • Avoid stalling the servomotor for extended periods, as this can lead to overheating and damage.
  • Use a decoupling capacitor (e.g., 100µF) between VCC and GND near the motor to stabilize the power supply.
  • When controlling multiple servomotors, consider using an external power supply to prevent overloading the microcontroller's voltage regulator.

Example Code for Arduino UNO

#include <Servo.h>

Servo myservo;  // create servo object to control the SG90

void setup() {
  myservo.attach(9); // attaches the servo on pin 9 to the servo object
}

void loop() {
  myservo.write(90);  // sets the servo to mid-position (90 degrees)
  delay(1000);        // waits for a second
  myservo.write(0);   // moves the servo to position 0 degrees
  delay(1000);        // waits for a second
  myservo.write(180); // moves the servo to position 180 degrees
  delay(1000);        // waits for a second
}

Troubleshooting and FAQs

Common Issues Users Might Face

  • Servomotor does not move: Check the power supply and connections. Ensure the control signal is correctly connected to a PWM pin.
  • Erratic movement or jitter: This can be caused by an inadequate power supply or electrical noise. Use a decoupling capacitor and ensure the power supply is stable.
  • Overheating: If the servomotor is stalling or under a heavy load, it may overheat. Reduce the load or duty cycle to allow it to cool.

Solutions and Tips for Troubleshooting

  • Always verify the wiring and connections before powering up the system.
  • Test the servomotor with a simple sweep code to ensure it operates smoothly across its range.
  • If using multiple servomotors, distribute the power load and consider using a separate power supply.

FAQs

Q: Can I control the SG90 servomotor with a Raspberry Pi? A: Yes, the SG90 can be controlled with a Raspberry Pi, but you will need to generate PWM signals, which can be done using the GPIO pins and appropriate software libraries.

Q: How precise is the SG90 servomotor? A: The SG90 typically has a resolution of around 5 degrees, but this can vary slightly depending on the specific model and operating conditions.

Q: What is the lifespan of the SG90 servomotor? A: The lifespan depends on the usage conditions, such as load, frequency of operation, and environmental factors. Under normal conditions, the SG90 can last for several years of intermittent use.