小编
Published2025-10-15
Understanding the Basics of the SG90 Servo Motor and Its Pinout
If you're venturing into robotics, automation, or simple DIY electronics, the SG90 servo motor is often one of the first components you encounter. Renowned for its compact size, affordability, and reliability, the SG90 has become a staple for hobbyists and professionals alike. But to harness its full potential, you need a clear understanding of its pinout—the arrangement and functions of its connecting pins.
What Is an SG90 Servo Motor?
Before delving into the pinout details, let’s briefly explore what the SG90 is. It's a small, lightweight, micro servo motor designed for precise positional control. Typically used in small robotic arms, drone gimbals, or automated sensors, the SG90 offers a rotation range of approximately 180 degrees, making it versatile for many applications. Its popularity stems from its ease of use, low cost, and compatibility with common microcontrollers like Arduino, Raspberry Pi (via GPIO), and other development boards.
The basic features include:
Voltage: Usually operates between 4.8V and 6V. Torque: About 1.2 kg·cm at 4.8V. Size: Compact, approximately 22.8 mm long. Weight: Around 9 grams.
The servo works by receiving PWM (Pulse Width Modulation) signals, which tell it to rotate to specific angles. To connect it properly, understanding the pinout is crucial.
The Typical Pinout of the SG90
The SG90 servo motor usually comes with three colored wires:
Red: Power (Vcc) Brown or Black: Ground (GND) Orange or Yellow: Signal (PWM control)
Though these color codes are quite standardized, they can sometimes vary slightly depending on manufacturer or batch. Therefore, always verify with your specific servo’s datasheet or testing prior to deployment.
Pin Configuration Details
Let’s analyze each pin closely:
1. Power (Vcc): This pin supplies the necessary voltage for the servo’s internal motor and circuitry. For most SG90s, this is 5V, though some variations can support slightly higher voltages. Connecting this pin to a proper power source ensures the servo functions correctly.
2. Ground (GND): The ground pin completes the circuit. It should be connected to the negative terminal of your power source or ground line of your microcontroller or development board.
3. Signal (PWM): This pin receives the PWM signals that dictate the servo’s position. The signal is a series of pulses, typically ranging from 1 millisecond (full one side) to 2 milliseconds (full other side), repeated every 20 milliseconds.
Wiring the SG90: Step-by-Step
Proper wiring is vital for safe operation and longevity of the servo. Here’s a simplified wiring guide:
Connect the Red Vcc to your power supply 5V terminal. Connect the Black or Brown GND to the common ground with your microcontroller (Arduino, Raspberry Pi, etc.). Connect the Orange or Yellow Signal to a PWM-capable pin on your microcontroller (e.g., Arduino Pin 9).
Always double-check the orientation and ensure that the power source can supply enough current, especially if you’re powering multiple servos simultaneously.
Power Supply Considerations
Powering servos can sometimes be tricky, especially when multiple units are involved. The SG90 is low power, but it can draw bursts of current—up to 700 mA during stall conditions, even if nominal draw is around 100–250 mA. Overloading your power supply can lead to resets or erratic behavior in your microcontroller.
Using a dedicated power supply for the servos, rather than powering them solely from the microcontroller, is advisable. This prevents voltage drops that could cause the microcontroller to reset or malfunction.
The Role of PWM in Controlling the Servo
PWM signals are central to controlling the servo's position. The pulse width determines the angle:
1 ms pulse width usually corresponds to 0° 1.5 ms corresponds to roughly 90° 2 ms corresponds to 180°
The frequency of these pulses is typically 50Hz (20ms period). By varying the pulse width within this range, you can precisely control the servo’s position.
This covers the fundamental understanding of the pinout, wiring, and control signals involved with the SG90 servo motor. In the next part, we’ll delve into practical application tips, troubleshooting, and advanced configurations to optimize your projects for maximum efficiency.
Stay tuned for Part 2, where we’ll explore calibration, common issues, and innovative ways to incorporate the SG90 into your creative projects.
Established in 2005, Kpower has been dedicated to a professional compact motion unit manufacturer, headquartered in Dongguan, Guangdong Province, China.
Update:2025-10-15
Contact Kpower's product specialist to recommend suitable motor or gearbox for your product.