cancel
Showing results for 
Search instead for 
Did you mean: 

Can DC motor work more smoothly by timer dithering?

Junde
Senior II

Hi guys,

I am reading the timer dithering mode in the stm32 manual however I can't understand it very well.

From my manual, the timer dither is for increasing the PWM resolution.

According to my understanding, I can give the following example:

Example: Assume I am using STM32F103(72MHz), and I config the TIM1's ARR register to 99(100-1) with prescaler to 71(72-1). The 10KHz(72MHz / 72 / 100) ware will output at that config.

Now I want to change my PWM frequency to 20Khz, what I need to do is just change ARR to 49(50-1).

With the dithering enabled, either the ARR value will change as "99-87-75-62-49" step by step, or change as "99-99-99-99-49-99-99-99-49-99-49-99-49-49-49-99-49-49-49-49-49...";

With the dithering disabled, the ARR register value will change from 99 to 49 immediately.

Am I right?

BTW, can I let the DC motor work more smoothly by timer dithering?

1 REPLY 1
InsignificantBit
ST Employee

The first example is not dithering, only the second one describes dithering.

If by "smoother" you mean with less jerk, then you need to change the PWM value slower, with a ramp.

 

Dithering is for either increasing resolution past LSB of the PWM resolution or for optimizing EMC. Neither of this seems to be related to your problem, unless you are already at the limit of the resolution of the PWM.