Fast PWM
2. The Need for Speed
Fast PWM, as the name suggests, prioritizes speed. It’s the Usain Bolt of the PWM world. This mode is designed to achieve higher frequencies compared to Phase Correct PWM. How does it accomplish this feat? It uses a simple up-counting timer. The counter starts at zero and increments until it reaches a maximum value (determined by the timer’s configuration). When the counter value matches the duty cycle value (the “on” time), the PWM output turns on. When the counter reaches its maximum value, the output turns off, and the counter resets back to zero. Then the process repeats. Fast and efficient, right?
Think of it like a race car on a circular track. The car starts at the starting line, speeds around the track, and then instantly teleports back to the starting line to begin again. There’s no slowing down or turning around; it’s all about pure, unadulterated speed.
The advantage of this approach is that you can achieve higher PWM frequencies. Higher frequencies can be useful for applications where you want to minimize audible noise (e.g., when controlling motors) or where you need a fast response time. Higher frequencies also permit finer control of your signal. For example, if you’re modulating signal at a frequency that can be heard by a human being, the frequency might become audible to the human ears. If you increase the frequency to a level that cannot be heard by humans, the motor will appear quieter and smoother.
However, there’s a trade-off. Fast PWM can introduce more switching noise and may not be as smooth as Phase Correct PWM, especially at lower frequencies. That instantaneous reset of the counter can create a bit of a jolt. It may not be ideal for applications requiring a very smooth and linear output. But for sheer speed and efficiency, Fast PWM takes the checkered flag.