Published 2026-07-07
SEO Title: How to Wire SG90servo: 3-Pin Connection Guide for Beginners
Meta Description: Learn the correct SG90servowiring,pinout (GND, VCC, signal), and how to connect it to Arduino and Raspberry Pi. Avoid common reverse polarity mistakes.
01SG90servoWiring: A Complete Guide to 3-Pin Connection
Quick Answer
The SG90 servo connects via three wires:Brown (GND) , Red (VCC, 4.8V–6V), andOrange/Yellow (Signal). Incorrect wiring can instantly damage the servo or your controller. Always verify voltage requirements before powering up, and never connect the red wire directly to 5V from a microcontroller without a separate power source for multiple servos. This guide covers pinout identification, common wiring mistakes, and step-by-step connection for Arduino and Raspberry Pi.
Introduction
You have an SG90 micro servo in your hand, but the datasheet is missing, and the colors don't match what you remember. Brown, red, orange—or is it black, red, white? One wrong wire and the servo burns out, or worse, your controller board stops working.
This is not a rare situation. Many hobbyists and engineers face the same uncertainty when wiring a standardSG90 servofor the first time. The frustration is real: a project delay, a replaced component, a wasted hour troubleshooting.
Wiring seems trivial, but it is the most common source of failure in servo-driven projects, from robotic arms to camera gimbals. Voltage mismatch, reversed polarity, or signal interference can cause erratic movement, no response, or permanent damage.
This guide exists to eliminate that uncertainty. You will learn exactly which wire does what, how to connect the SG90 to popular microcontrollers, and what to check before applying power.
Table of Contents
1. Understanding the SG90 Servo Pinout
2. Wire Color Standards and Variations
3.Voltage and Power Requirements
4. How to Connect SG90 to Arduino
5. How to Connect SG90 to Raspberry Pi
6. Common Wiring Mistakes and How to Avoid Them
7. Questions Buyers Often Ask About SG90 Wiring
8. Choosing the Right Servo for Your Project
Understanding the SG90 Servo Pinout
The SG90 uses a standard three-wire interface. The function of each wire is fixed, but color codes can vary between manufacturers.
The Brown wire is alwaysGround (GND). This is the reference point for the entire circuit.
The Red wire isPower (VCC). The SG90 operates in a voltage range of 4.8V to 6V. At 5V, it delivers a maximum torque of approximately 1.8 kg·cm. If you supply voltage below 4.8V, the servo may not move or will stall. If you exceed 6V, you risk damaging the internal control board.
The Orange or Yellow wire isSignal. This wire receives aPWM (Pulse Width Modulation)signal to command the servo position. The pulse width typically ranges from 1ms (0 degrees) to 2ms (180 degrees), repeating every 20ms.
Why this matters:A common mistake is assuming the red wire can be driven directly from a microcontroller's 5V pin. For a single SG90, this may work temporarily. For two or more servos, the current draw often exceeds what the board can supply, causing resets or damage.
Wire Color Standards and Variations

While the standard SG90 uses Brown-Red-Orange, you may encounter other color schemes.
Always confirm with a multimeterif the colors are unfamiliar. Measure resistance between the suspected GND and the metal shaft of the servo. If continuity exists, that wire is ground.
If you are sourcing servos from different batches, test one unit before wiring the entire project. A reversed power connection can destroy the servo controller in milliseconds.
Voltage and Power Requirements
The SG90 is not designed for high-voltage or high-current applications. Understanding its power limits prevents unexpected failures.
Operating voltage:4.8V to 6V
Stall current (at 5V):Approximately 700mA to 800mA
Idle current:Around 10mA
Recommended power source:A separate 5V regulator or battery pack for multiple servos
What happens if you ignore this:When the servo stalls (for example, if a robotic arm hits an obstacle), current spikes to near-stall levels. If your controller cannot supply that current, voltage drops, and the microcontroller resets. This is often misdiagnosed as a software bug.
Our recommendation:For projects using two or moreSG90 servos, use an external 5V power supply rated at least 2A. Connect the servo power wires directly to the supply, and only connect the signal wires to the microcontroller.
How to Connect SG90 to Arduino
Connecting the SG90 to an Arduino is straightforward, but the order of connection matters for safety.
1. Identify the wires– Brown (GND), Red (VCC), Orange (Signal).
2. Connect GND– Brown wire to any GND pin on the Arduino.
3. Connect VCC– Red wire to 5V pin on the Arduino (only for a single servo and light load).
4. Connect Signal– Orange wire to a PWM-capable digital pin, eg, pin 9.
For multiple servos:Do not connect the red wires to the Arduino 5V pin. Use an external power supply. Connect all brown wires to a common ground shared with the Arduino.
Sample code logic:The servo library usesservo.attach(9)andservo.write(90)to set position. Pulse timing is handled automatically.
Warning:If the servo jitters or moves erratically, check your power supply first. In most cases, it is not a coding issue but insufficient current.
How to Connect SG90 to Raspberry Pi
The Raspberry Pi operates at 3.3V logic, while the SG90 expects a 5V signal. Direct connection can cause unreliable behavior.
Correct wiring for Raspberry Pi:
1. GND– Brown wire to any GND pin on the Pi.
2. VCC– Red wire to a 5V pin on the Pi (only for a single servo).

3. Signal– Orange wire to a GPIO pin, eg, GPIO 18 (PWM0).
Important:The 3.3V logic high from the Pi may not reliably trigger the servo's signal detection. Alevel shifteris recommended for consistent performance. Without it, the servo may not reach full rotation or may stop mid-movement.
Power caution:The Raspberry Pi's 5V rail is limited. Drawing 700mA from a single servo can cause voltage dips that affect the Pi's stability. Use an external power supply for the servo and connect the grounds.
Software note:Use thepigpiolibrary for hardware-based PWM. The defaultRPi.GPIOsoftware PWM often produces jitter.
Common Wiring Mistakes and How to Avoid Them
These mistakes are frequent and easily preventable.
1. Reverse polarity.Connecting the red wire to GND and brown to VCC destroys the servo's control board immediately.Always double-checkbefore connecting power.
2. Insufficient power.Using a single servo with a microcontroller's 5V pin is borderline. Adding a second servo often causes failures. Use an external regulator.
3. Signal wire on non-PWM pin.On Arduino, only pins marked with~support PWM. Using a digital-only pin will not produce movement.
4. Ground not shared.When using an external power supply, if the servo's ground is not connected to the microcontroller's ground, the signal has no return path. The servo will not respond.
5. Over-torque and stall.If the servo cannot complete its commanded motion, it draws stall current. This heats the motor and can damage the internal potentiometer.
What to check before powering on:
[ ] Wire colors verified with multimeter
[ ] Power supply voltage measured (4.8V–6V)
[ ] GND shared between servo and controller
[ ] Signal pin configured for PWM output
[ ] Load does not exceed servo torque rating
Questions Buyers Often Ask About SG90 Wiring
Q: Can I use an SG90 servo with a 3.3V microcontroller?
Yes, but you should use a level shifter for the signal line. The servo's power must still be 5V. The signal from 3.3V logic may not reliably trigger the servo.
Q: What happens if I connect the SG90 to 12V?
The servo will be damaged almost immediately. The internal components are rated for a maximum of 6V. 12V will burn the control board.
Q: Can I control an SG90 without a PWM library?
It is possible by manually generating pulses in your code, but it is not recommended. Timing errors cause jitter and inconsistent position. Using a library is more reliable.
Q: How do I know if my SG90 is broken?
If the servo does not move but you feel resistance when turning the shaft manually, the internal gears may be stripped. If there is no resistance and it spins freely, the gear train is broken.
Q: Does the SG90 need a capacitor on the power line?
Adding a 100µF to 470µF electrolytic capacitor across the power and ground near the servo can reduce voltage spikes and improve stability, especially during rapid movements.
Q: Can I use the SG90 for continuous rotation?
The standard SG90 is not designed for continuous rotation. You can modify it by removing the mechanical stop, but position feedback will be lost. For continuous rotation, use a dedicated continuous rotation servo.
Q: Why does my SG90 only move a few degrees?
This usually indicates a signal issue. Check that the PWM frequency is 50Hz and the pulse width range is correct. Also verify that the power supply can deliver enough current.
Q: Can I daisy-chain multiple SG90 servos?
You can share the power and ground wires, but each servo needs its own signal wire connected to a separate PWM pin. Do not connect signal wires together.
Choosing the Right Servo for Your Project
The SG90 is suitable for lightweight applications: small robot arms, camera pan/tilt mechanisms, and model aircraft control surfaces. It is not designed for high-torque or continuous-duty industrial use.
When the SG90 is the right choice:
Your project requires a compact, low-cost servo
The load is light (under 200g)
The movement is intermittent, not continuous
You have a stable 5V power supply
When to look for alternatives:
You need higher torque or metal gears
The servo will run for extended periods
Your application requires precise feedback (use a feedback servo or encoder)
You are working in an industrial environment with higher voltage requirements
For buyers comparing options:Evaluate thetorque requirementsof your application first. If the SG90 cannot lift the load at the required speed, no amount of wiring improvements will fix it. Upgrade to a metal-gear servo like the MG90S for heavier loads.
If you are unsure about your specific application,send your project specificationsto an engineering team for review. A five-minute review can prevent weeks of troubleshooting.
Need Help Selecting the Right Servo?
Wiring the SG90 correctly is the first step. The next is ensuring the servo itself matches your application's torque, speed, and durability needs.
Atkpowerservo, we specialize in servo solutions for both prototyping and production. Whether you need standard micro servos or custom servo solutions for industrial motion control applications, our engineers can help match the right product to your load and power requirements.
Request a quoteorupload your project specificationsfor an engineering review. We can help you verify torque, voltage compatibility, and wiring integration before you order.
Update Time:2026-07-07
Contact Kpower's product specialist to recommend suitable motor or gearbox for your product.