Published 2026-03-23
When many friends first come into contact withservos, they always ask a classic question: How to connect twoservos and how to use them? Especially when you want to make a robotic arm, bipedal robot or gimbal, aservosimply cannot produce the desired "action feel". Don't worry, today we will put aside those complicated theories and dismantle it step by step from actual wiring, power supply, control logic to programming. You don't need to be an electronics engineer, just follow the steps and the two servos will soon be able to "obey your command".
For many people connecting two servos for the first time, the most likely problem is the power supply. When one servo is working, the current may be only one or two amps. When two servos are activated together, the instantaneous current can easily exceed 3 amps. If you take power directly from the 5V pin of the development board (for example), the servo will be weak and shake at worst, or the development board will be burned directly. The correct approach is: put the red wires (positive pole) of the two servos together and connect them to the positive pole of the external power supply; put the black or brown wire (negative pole) together and connect them to the negative pole of the external power supply, and also connect them to the GND of the development board. This is called a common ground. The signal lines are connected to the two PWM pins of the development board, such as No. 9 and No. 10.
The answer to this question depends on what servo you are using. If it is an ordinary analog servo, then each servo needs an independent PWM signal pin. A development board usually has multiple PWM ports, which is completely sufficient. But if you are using a serial bus servo, the situation is different. This type of servos is more advanced. They can be connected in series. All servos share the same data pin and control their respective rotations by sending instructions with different IDs. In this way, even if you control 10 servos, you only need to occupy one pin, making the wiring much cleaner. So you first look at the type of servo you have on hand and then decide which wiring scheme to use.
After many friends connected the wires, they found that the two servos either did not move, or one moved and the other shook, or even both of them rotated randomly. There are mostly two reasons behind this: one is insufficient power supply, and the other is signal interference. As we mentioned before about the power supply issue, you can configure a separate 7.4V or 6V voltage stabilizing module to power the servo. Do not share it with the development board. In terms of signal interference, be careful not to wrap the signal cable too tightly with the power cable, especially the high-current power cable. In addition, if two servos start and stop at the same time, and the instantaneous current impact is large, you can add a large capacitor, such as 470uF, between the positive and negative poles of the power supply to act as a buffer, and the operation will be much more stable.
If you want two servos to cooperate, the programming logic is actually very simple, which is to control the time and angle of their rotation. For example, if you want to make a "waving" action, you can first turn the No. 1 servo to 90 degrees with a delay of 200 milliseconds, then turn the No. 2 servo from 0 degrees to 180 degrees, and then reset at the same time. The focus is on the combination of "delay" and "loop". The most common mistake that beginners make is to write the delay in the code too short, causing the servo to receive new instructions before it has time to reach its position, resulting in jamming. A practical tip is: every time you send an angle command, give a servo enough physical movement time. For example, it takes 0.5 seconds for the servo to go from 0 to 180 degrees. It is best to give your delay to more than 0.6 seconds.
If you are not satisfied with simple sequential actions and want to achieve true synchronous linkage, you have to introduce the idea of "state machine". To put it simply, don't let the program stop and wait, but update the target angles of the two servos regularly. For example, if you want to control a dual-degree-of-freedom gimbal to allow the camera to smoothly track objects, the main loop will constantly modify the target angles of the two servos based on sensor data, rotating only a small step each time. In this way, it seems that the two servos are moving at the same time, and the transition is very smooth, without any "stuck feeling". This writing method can be used in many robotic arm and robot head projects.
This is the most troublesome problem in actual combat. If both servos rotate randomly, first check whether there is a common ground - many novices forget to connect the negative electrode of the servos to the GND of the development board, causing the signals to fail to form a loop. If only a certain servo is vibrating, it is most likely that the pin is in poor contact, or the servo itself is broken. There is another common situation: you write the servo angle in the code to a value that is out of the range, such as more than 180 degrees. At this time, the servo will try to move to a position it cannot reach, and start "twitching" back and forth. The solution is also very simple. Just add a judgment in the code and limit the angle value to between 0 and 180.
In fact, the connection and use of the two servos is essentially to solve the three core problems of "power supply, common ground, and signal distribution". The sense of control is particularly interesting when you personally transform the two servos from a mess of wires into a small device that can synchronize arm swings, grabs or tracking movements. Do you happen to have two servos on hand right now? What interesting gadgets would you most like to make with them? Welcome to chat about your thoughts in the comment area, and don’t forget to like and save it for reference next time.
Update Time:2026-03-23
Contact Kpower's product specialist to recommend suitable motor or gearbox for your product.