|
|
<< BackPWM ExplainedWhy "PWM for servos" and "PWM duty-cycle output" are two fundamentally different things — despite sharing a name. Protocol PWM
Servo & ESC SignalData = pulse duration (µs) · Frequency fixed ~50Hz
Duty-Cycle PWM
DC Voltage ApproximationData = duty cycle (%) · Frequency flexible
Servo / ESC PWM
A Timed Pulse ProtocolThis is not simply a voltage level signal. It is a precise communication protocol where the receiving device — a servo, ESC, or flight controller — measures the exact duration of each incoming pulse in microseconds and acts on that value. What matters: PULSE WIDTH in µs — not duty cycle, not frequency (much).
The signal runs at a fixed frequency of roughly 50 Hz, meaning one pulse arrives every 20 milliseconds. The magic is in how long that pulse stays high:
1000µs
Full reverse / 0° position
1500µs
Neutral / center / 90°
2000µs
Full forward / 180° position
The servo or ESC contains a dedicated timer circuit that measures these pulse widths and responds accordingly. A 1500µs pulse at 50 Hz represents roughly a 7.5% duty cycle — but that number is meaningless to the servo. Only the 1500µs matters.
Duty-Cycle PWM
A Cheap Digital-to-Analog ConverterThis type of PWM is simply using rapid on/off switching to approximate an analog DC voltage. There is no protocol, no timing decoder, and no microcontroller on the receiving end measuring pulse widths. What matters: DUTY CYCLE (%) — which directly maps to an average output voltage.
The output switches between 0V and the supply voltage (e.g., 3.3V or 5V) at a high frequency. Either an RC filter or the natural capacitance/inductance of the load smooths this switching into a stable DC level. The relationship is simple:
0%
0V output
50%
½ supply voltage
100%
Full supply voltage
Frequency matters only insofar as it needs to be fast enough for the RC filter to smooth out the ripple. There's no requirement for it to be 50 Hz, and the absolute pulse width in microseconds is irrelevant.
Use Cases
When to Use Each// SERVO / ESC PWM
// DUTY-CYCLE PWM
Comparison
Side-by-Side
// WHY THE CONFUSION?Both are technically "PWM" — they both produce a square wave with variable on/off timing. But servo PWM is a communication protocol where a microcontroller actively measures pulse timing, while duty-cycle PWM is simply using switching to approximate an analog voltage level. The name is the same; the underlying mechanism and intent are completely different. They are not interchangeable. | |||||||||||||||||||||||