Home > Industry Insights >Custom Drive
TECHNICAL SUPPORT

Product Support

Steering Gear Duty Cycle Calculation Formula: Easily Control PWM Signal In A Few Simple Steps

Published 2026-03-16

What is the most troublesome problem when playing withservos? That's right, I just can't figure out how to calculate the duty cycle. Seeing theservonot moving or turning randomly makes me feel anxious. In fact, once you understand the calculation formula, this matter is much simpler.

What signals are needed for steering gear control?

The steering gear is quite special. It does not turn when given a voltage like ordinary motors. It needs a signal called PWM to tell it "which position to turn to." This signal is like blinking an eye. The rhythm of opening and closing determines the movement of theservo. To put it simply, what the servo looks at is the duration of the high level in this signal, which is technically called the pulse width.

The pulse width signal period is usually 20 milliseconds, which is 50 blinks per second. In this cycle, how long the high level is occupied corresponds to how many degrees the servo rotates. For example, for common servos, a pulse width of 0.5 milliseconds corresponds to 0 degrees, 1.5 milliseconds corresponds to 90 degrees, and 2.5 milliseconds corresponds to 180 degrees. Once you understand this correspondence, you will have a basis for calculating the duty cycle.

How to calculate the servo duty cycle accurately?

The formula for calculating the duty cycle is actually very simple: duty cycle = high level time ÷ cycle time × 100%. Take the example just now, if you want the servo to rotate to 90 degrees, the high-level time is 1.5 milliseconds, and the period is 20 milliseconds, then the duty cycle = 1.5 ÷ 20 × 100% = 7.5%. It's that simple, just do the math.

But please note that the parameters of some servos may be different. For example, in some servos, 0 degrees corresponds to 0.3 milliseconds, and 180 degrees corresponds to 2.3 milliseconds. At this time, you must first understand the specifications of the servo, find the corresponding pulse width range, and then use the same formula to calculate. The formula itself is not difficult, the key is that the data must be accurate.

Are the duty cycles of different servos the same?

This is a good question, and the answer is: not necessarily the same. Most of the common servos on the market use a 20 millisecond period and a pulse width range of 0.5 to 2.5 milliseconds. But there are many exceptions, especially those with digital servos or special-purpose servos, whose parameters may be different. For example, some micro-servos have a cycle time of only 10 milliseconds.

️ So when you get a new servo, the first thing you should do is check its data sheet. See what signal period it requires and what the pulse width range is. Don't take the standard values for granted, otherwise the servo will either not move or make a rattling sound when it reaches the extreme position, and it will easily burn out over time. Different servos are like different people, with different tastes, so you have to take the right medicine.

How does the steering gear angle correspond to the duty cycle?

There is a linear relationship between angle and duty cycle, which means they change proportionally. For example, a servo 0 to 180 degrees corresponds to 0.5 to 2.5 milliseconds, and 90 degrees is exactly in the middle, which is 1.5 milliseconds. The duty cycle also corresponds linearly. If you want the servo to rotate to 45 degrees, you can first calculate the pulse width corresponding to 45 degrees.

The specific algorithm is: pulse width = minimum pulse width + (target angle ÷ maximum angle) × (maximum pulse width - minimum pulse width). For example, 0.5 + (45 ÷ 180) × (2.5 - 0.5) = 0.5 + 0.25 × 2 = 1.0 milliseconds. Then use this pulse width to calculate the duty cycle: 1.0 ÷ 20 × 100% = 5%. This way you can precisely control the servo to move to any position you want.

What are the common mistakes in calculating the servo duty cycle?

The most common mistake is to mix up units and values. For example, treat milliseconds as microseconds, or vice versa. Some novices saw 1500μs written in the data sheet and thought it was 1.5 milliseconds. The result was that the duty cycle was 1000 times larger. Of course the servo was not normal. There is also a mistake in the period, thinking that all servos are 20 milliseconds.

Another common mistake is to ignore the deadband range of the servo. Some servos have a dead zone near the limit position. If you give a pulse width corresponding to 0 degrees, it may not move. It needs to be slightly increased before it moves. Also, the center position of the servo may not be exactly 1.5 milliseconds, and there will be a slight deviation. These details must be paid attention to during actual debugging. Theoretical calculations alone are not enough, and fine-tuning must be combined with actual testing.

How to verify the servo duty cycle is correct or incorrect

After calculating the duty cycle, it's a good idea to verify it. The simplest method is to first use the program to output the calculated PWM signal, and then observe whether the rotation angle of the servo is as expected. For example, it is calculated that 90 degrees corresponds to 7.5% duty cycle. After output, check whether the servo is turned to the middle position. If it is, it means the calculation is correct.

️ For more accurate verification, you can use an oscilloscope to measure the PWM signal and directly see how many milliseconds the high level time is. Many current digital oscilloscopes have automatic measurement functions and can directly read the pulse width and duty cycle. If you often play with servos, it will be much more convenient to have a cheap oscilloscope. Verify that there are no problems before officially using it in the product. Only in this way can you ensure that your innovation project is stable.

Have you ever encountered inaccurate steering control? How was it resolved at that time? Welcome to share your experience in the comment area. If you find it useful, don’t forget to like and save it so that more friends who play servos can see this article.

Update Time:2026-03-16

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