Home > Industry Insights >Custom Drive
TECHNICAL SUPPORT

Product Support

sg90 Servo Wiring Diagram: Arduino Power Supply Tutorial, What Do The Colors Of The Three Wires Represent?

Published 2026-03-17

As a newbie, it’s the first time you get the smallservoSG90. Looking at it and three wires of different colors, are you a little confused? How do you connect this thing to the board to make it spin? Don’t worry, this is a problem that everyone will encounter. In fact, wiring is simpler than you think. There are only a few key steps. Once you understand it, you can start your small project.

What do the colors of the threeservowires represent?

When you get the SG90, the first thing you will notice is that there are three wires sticking out of it, usually in different colors. For most standard SG90s, the colors and functions of the wires are fixed: the brown wire (some are black) is the negative pole, which needs to be connected to the GND pin; the red wire is the positive pole, which needs to be connected to the 5V power supply; the orange wire (some are yellow) is the signal wire, responsible for receiving incoming instructions. Remember this color code and wiring is half done.

Although the signal line is just a wire, it is the "brain" of theservo. An electrical signal called PWM (Pulse Width Modulation) is sent through this wire to tell the chip inside the servo "I want you to turn to XX degrees". Simply put, by changing the width of an electrical pulse, for example, sending a 0.5 millisecond pulse, the servo will turn to 0 degrees; 1.5 milliseconds corresponds to 90 degrees; 2.5 milliseconds corresponds to 180 degrees. This is the secret of the steering gear's obedience.

How to solve the problem of power supply for sg90 servo

This is the easiest pit for newbies to fall into. Many people directly plug the red wire of the servo into the 5V pin, only to find that the servo does not move at all, or suddenly restarts. The reason is very simple. SG90 requires a large current when working, especially at the start-up moment, which may reach several hundred milliamps. The output capacity of the 5V voltage regulator chip on the board is limited, and it has to be supplied to the board itself. It is difficult to carry one servo, let alone two.

So how to solve it? The best solution is to provide independent power supply. You can use 4 AA batteries (total voltage 6V), or a 3.7V lithium battery, or even a specialized servo power module. Remember the wiring method: the red wire of the servo should be connected to the positive pole of the external power supply, the brown wire should be connected to both GND and the negative pole of the external power supply (this is called "common ground"), and the orange wire should be connected to the signal pin as usual. A capacitor of about 100uF is placed at both ends of the power supply to absorb the current impact when the servo is started, making the system more stable.

What should I do if I can’t understand the servo wiring diagram?

Do you feel overwhelmed when you see those wiring diagrams on the Internet with all kinds of lines and symbols? It's not that complicated. A standard wiring diagram will be drawn as a box with digital pins such as 5V, GND and D9 labeled on it. The servo is just a small box with three wires. The lines on the picture will clearly tell you: the red wire is connected to 5V (or the positive terminal of the battery), the brown wire is connected to GND, and the orange wire is connected to D9. You just need to match the points on the drawing to the actual object on the board you have.

Translating the drawings into actual operations is actually "continuous reading". On your board, there is small writing next to each pin. Find the hole that says 5V, GND, and the number 9 (or any other pin of your choice). The wires of the servo are a bit hard, and the direct plug into the female socket may not make good contact. The most convenient thing is to use a few "male to female" DuPont wires, plug one end into the board, and the other end into the servo, for a perfect connection. I really can't understand the complex drawings, so I just search for "SG90 wiring diagram" to see the photos more intuitively.

Correct steps for wiring sg90 servo

Come on, let’s practice it step by step. First, connect the USB cable to the computer and prepare the servo and several male-to-female DuPont cables. If you decide to use batteries as a stand-alone device, also have the battery box ready with the batteries inside. Check whether all the wires are connected. Don't wait until you plug them in to find out that they are broken. It will be troublesome to check.

Next is the hands-on time, taking independent power supply as an example: 1. Use Dupont wire to connect the orange wire of the servo to the digital pin 9 (remember to use the pins that support PWM, which are the ones with the ~ symbol). 2. Connect the brown wire of the servo to any GND pin. 3. Connect the negative pole (black wire) of the battery box to the other GND pin. This is the key "common ground". 4. Connect the positive terminal (red wire) of the battery box and the red wire of the servo. 5. Check to make sure there are no wires touching each other and causing a short circuit. 6. Turn on the power supply (USB) first, and then turn on the power supply of the battery box. Done!

Reasons why the sg90 servo does not rotate smoothly

If you have connected the wires and uploaded the code, but the servo either does not move or shakes like a sieve, there is probably a problem with the power supply. This is the most common reason, especially if you are lazy and don't have an independent power supply and directly plug the red wire into 5V. The symptoms are that the servo is weak, vibrating, buzzing but not turning. The solution is simple and crude, change to an independent power supply to ensure "enough food and grass".

After ruling out the power supply, let's look at the code and connections. Make sure the pins you use support PWM (3,5,6,9,10,11), and use.(9)to bind the pins correctly in the code. There is another small detail. The servo library (Servo.h) uses a refresh rate of 50Hz by default. This is the standard and does not need to be changed. If the servo is still stuck, you can gently move the servo arm manually to see if it is stuck by something, or if the gear of the servo itself is broken. Buying a new servo and trying it out is the quickest way to check.

How to choose and buy genuine sg90 servo

Most of the SG90 servos on the market are imitations. The imitation products are not unusable, but they have many problems: false torque mark, inaccurate rotation angle, easy to get hot, and even burn after a few days of use, which greatly affects the mood and progress of the project. The genuine SG90 has clear label printing, fine workmanship on the casing, and quiet and smooth rotation. For the stability of your project, it is definitely worth spending a few more dollars to buy a genuine product.

How to buy genuine products? First, look for reliable channels. Go to professional electronic components platforms such as Xinchuang or Xinhua Mall, or find an officially authorized Taobao store. Don't go to unknown shops just to save a dollar or two. Second, look at the details. Genuine products come with a full range of steering wheels and standard packaging. Third, read more user reviews, especially reviews with pictures. If you are doing product innovation, the steering gear is the execution component, and its reliability directly affects the final effect. You can go directly to the official website and look for their list of authorized dealers to make sure you buy from there.

What interesting projects have you been doing recently using the SG90 servo? Is it a robotic arm, a car, or some fun idea? Share it in the comment area. If you encounter wiring problems, please leave a message and we can solve it together! If you find the article useful, don’t forget to like and share it with more friends who need it!

Update Time:2026-03-17

Powering The Future

Contact Kpower's product specialist to recommend suitable motor or gearbox for your product.

Mail to Kpower
Submit Inquiry
WhatsApp Message
+86 0769 8399 3238
 
kpowerMap