Home > Industry Insights >BLDC
TECHNICAL SUPPORT

Product Support

Tutorial On Wiring The Servo And The Motherboard: How To Connect The Ground Wire, Power Supply Signal Wire, And Do It In A Few Simple Steps

Published 2026-02-28

What's the biggest headache when playing withservos? That’s right, it’s the connection. Many times, we happily write the code, only to find that theservois motionless. After a long time of troubleshooting, it turns out that the wiring is wrong or the contact is poor. Therefore, understanding how to correctly "hand-in-hand" between theservoand the motherboard is the first and most critical step to make the work move.

How to connect the servo and the mainboard

Wiring is actually simpler than you think. There are usually three lines behind the servo, which are brown (or black), red and orange (or yellow). Be sure to remember this color code: brown represents the ground wire (GND), red is the power wire (VCC, usually 5V), and orange is the signal wire. All you have to do is connect these three wires to the corresponding pins on the motherboard. Usually, GND, 5V and digital pin numbers are clearly marked on the motherboard. You just need to connect the brown wire to GND, the red wire to 5V, and the orange wire to a digital pin (such as pin 9), and you're done physically. It's that simple, as long as the color is correct, there will be no wrong insertion.

Later, after you complete the above physical connection, you still need to make some necessary settings. For example, in the relevant control program, the pins connected to the servo need to be initialized and configured so that the control signal can be accurately sent to the servo. Depending on the specific model and usage requirements of the servo, some parameters may need to be adjusted, such as signal frequency, duty cycle, etc., to ensure that the servo can rotate at the expected angle and speed. Although these settings are not complicated, they play a vital role in the normal operation of the servo. Only after completing all these steps can the servo function as it should in your project.

Why is my servo not responding?

When the servo doesn't respond, don't immediately doubt the code. In fact, more than half of all cases are caused by connection issues.

️ First, check the power supply. Many motherboards come with a limited 5V output current. If they cannot move a large servo, the servo will not move at all. At this time, an external power supply is required, but be careful to connect the red wire of the servo, the ground wire of the motherboard and the ground wire of the external power supply together, that is, "common ground", otherwise the signal cannot be transmitted.

️ Secondly, the signal line needs to be checked. To confirm which pin on the motherboard it is plugged into, the pin number must be exactly the same as defined in the code. For example, if the code says pin 9, but you plug it into pin 10, then the servo will definitely not respond.

Which pin should the signal line be connected to?

It does matter which pin you choose, but not all pins are suitable for direct plugging into the servo. On most motherboards, not all pins can output stable PWM (pulse width modulation) signals to control the servo. Usually, the pins marked with a "~" tilde are PWM pins, such as 3, 5, 6, 9, 10, and 11. To control ordinary servos, these pins with PWM function are preferred. After connecting it, you can accurately control the rotation angle of the servo through the program. If you are not sure, you can check the pin description diagram of the motherboard you have, or directly search for "your motherboard model + pin diagram", which is very convenient.

How to connect external power supply when power supply is insufficient?

If the servo is shaking or has no power, it's probably because it's "hungry" and the power supply is insufficient. At this time, you need to give it a separate "extra meal". The specific operation is: find a suitable battery or power adapter, connect the positive electrode to the red wire of the servo, and connect the negative electrode to the brown wire of the servo and the GND (ground wire) of the motherboard. In this way, the huge current of the servo rotation is directly taken from the external power supply, no longer consuming the weak current of the motherboard, ensuring the stable operation of the motherboard. At the same time, a common ground can ensure that the signals transmitted back by the signal line have a unified voltage reference point. Just like two people making a phone call, although each uses their own power, they must be on the same signal channel.

How to connect multiple servos using breadboard

When your project requires the use of more than two servos, it will be inconvenient to simply plug them directly into the motherboard. In this case, the breadboard becomes your great helper. You can connect all the red wires of the servo in parallel to a row of positive jacks on the breadboard (with the help of a red jumper), connect all the brown wires in parallel to the negative jacks (with a black jumper), and then draw a line from the row of positive and negative poles to connect to the 5V and GND of the motherboard.

As for each orange signal line, it needs to be plugged into different digital pins 2, 3, and 4 on the motherboard. Routing the wiring in this way will not only look neat and orderly, but also ensure that each servo can stably obtain power from the motherboard (provided that there are not many servos and the current is not large), or it can obtain power from an external power supply.

How to use an expansion board to simplify servo connection

If you often do robot projects, you will find that it is quite troublesome to plug and unplug the servo cable every time. At this time, a servo drive expansion board (such as a 16-channel PWM drive board) can greatly enhance your sense of happiness. You only need to plug it into the motherboard, and then plug the three wires of the servo into the corresponding interface of the expansion board. The expansion board has its own address and tells the mainboard how to control it through I2C communication (a simple two-wire communication method). Moreover, the expansion board usually comes with its own wiring terminals, which can be directly connected to an external high-power power supply and easily drive more than a dozen servos, completely freeing the motherboard.

Okay, regarding the connection between the servo and the motherboard, the core points are actually these: identify the color of the wire, select the correct pin, and ensure sufficient power supply. I hope this article can help you avoid some detours. What is the strangest servo connection problem you have encountered when working on a project before? Welcome to share your experiences in the comment area and avoid pitfalls together! If you find it useful, don't forget to like and share it with your friends who play electronics around you.

Update Time:2026-02-28

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