# Small brushed DC motor speed falls off above a certain PWM frequency?

I'm using the kind of small brushed DC motor shown below. My MCU controls the motor using PWM via a DRV8833 motor driver, also shown below.

If I set the PWM frequency very low, e.g. 10 Hz, the motor clearly judders on and off. So for a smooth motion, it would seem obvious to set the frequency as high as possible.

However, above 100 Hz something odd starts to happen: the speed of rotation actually starts to drop off. I'm confused - I can vary the duty and frequency values independently and it was my understanding the duty value affects the speed while the frequency should just affect the "smoothness" (i.e. the judder) that I see at low frequencies.

What's going on here? I tried Googling and the only thing I found was a DesignSpark article where they say:

One explanation may be that the very narrow pulses of a high-frequency signal are just not long enough to ‘kick’ the rotor into action.

This doesn't sound terribly convincing. Is this really the explanation for the behavior that I'm seeing?

When experimenting to find the optimum frequency, I kept the duty value at about 25%. I'm using a 3.3V ESP32 connected via two PWM pins to the A_IN1 and A_IN2 pins of the DRV8833 chip (i.e. pins 15 and 16). I'm using a library where the PWM duty value is a 10-bit value that can vary between 0 and 1023 - I keep it fixed at 255 for A_IN1 and 0 for A_IN2.

At 10 Hz and a duty cycle of 25%, I believe that the judder that I see is the result of the frequency being low enough that the starting and stopping of the motor is visible to the human eye (with the low duty cycle meaning that the motor does not have enough momentum to carry it through the off phases).

• Please edit your question to add (a) the mark/space ratios you are using and therefore (b) the minimum mark pulse periods. That's when you see these problems and the min you can deliver. The DRV8833 has an output enable/disable time so very narrow pulses will not make it to the motor. Also edit in if your PWM drives the motor (a) HIGH and LOW or (b) HIGH and HI-Z. It should be (b). For frequency, please look at electronics.stackexchange.com/questions/242293/… Jul 8, 2020 at 15:04
• Apologies for the late reply (I work at a startup and the last while was kind of busy). I've added two additional paragraphs, with more details, to my question. I'm an electronics hobbyist so some of your terms are new to me. As I understand, mark/space ratio means the same as duty cycle. But I'm not sure what you mean by the "the minimum mark pulse periods?" Jul 19, 2020 at 14:52
• Similarly, while I understand HI-Z means high impedance, I'm not sure what it means in terms of the library I use to control the A_IN1 and A_IN2 pins of the DRV8833. With this library, I can just set a frequency value and a duty value - the frequency can be between 0 Hz and ~80 KHz and the duty value can be between 0 and 1023. Jul 19, 2020 at 14:53

Thanks for teaching me an English word new to me.

Judder A spasmodic shaking. (like Jitter & Shudder combined)

No-load RPM is voltage-controlled (i.e. avg. Vdc = %PWM) and Torque is current-controlled and visa-versa for accleration or braking.

The coil commutation converts the DC into AC to provide continuous torque in one direction but depends on magnet positions relative to the coils.

The magnetic commutation frequency and the PWM commutation frequency act with a nonlinear mixing effect on Torque. The effect is a modulation of rotational torque. Each frequency has harmonics from the discontinuity and the result is Intermodulation or Aliasing Effect.

I would expect maximum Judder Effects when the PWM and frequency approach synchronous cutoff/on of alternate phases with each PWM cycle and then torque smoothing yet weakening above this PWM rate.

There will be some flying effect with increasing speed or rotational inertia and smoothing effect with increasing PWM, but it also increases the impedance of the motor from PWM with X(f)= 2πfL, yet L is also changing with rotor angle from magnet strength.

Thus when PWM f gets too high, it becomes current-limited for torque and when the alias frequencies of harmonics get too low, the torque gets more jerky as it changes speed and thus spastically "judders" more. I noticed this before as well on BLDC fan motors and opted to go with linear Vdc controlled cooling due to the erratic noise.

• Thanks for the detailed answer. You've focused more on the juddering. Could you perhaps expand the bit where you say "it also increases the impedance of the motor from PWM with X(f)= 2πfL, yet L is also changing with rotor angle from magnet strength. Thus when PWM f gets too high, it becomes current-limited for torque"? This was the bit that really interested me - that the speed fell off as I increased the frequency above 100 Hz. Perhaps you could explain the equation and its consequences in more hobbyist digestible language? Jul 22, 2020 at 17:27
• When you increase the coil impedance either by RPM or PWM frequency, then the torque (= average current) reduces inversely by the denominator I(f) = V(f) / Z(f) but at f=0 or DC , the DCR resistance gives the max torque aka. locked rotor torque. So you choose a frequency to give low noise yet smooth torque. There is a formula related to f(PWM) and L/DCR=Tau but I hope you get the idea Jul 22, 2020 at 18:22
• Using rated voltage, the locked rotor current can be 100x the no-torque load max RPM current depending on efficiency. Jul 22, 2020 at 18:29

At low PWM frequency, the inductance of the motor coils can saturate, leading to a current limited only by the resistance of the motor. The current then stops completely during the off phase. This current is very high compared to...

At high pwm frequency, the coil does not saturate, and the current increases in the on phase, decreased in the off phase but at no point should become zero.

Higher frequency is correct here, low tens of khz probably correct, depending on the motor.

If you can put a current probe on the motor wires to an oscilloscope, you'll see this effect clearly

The lack of spinning at lower pwm duties at high frequency is because a certain current is needed to overcome the cogging you can feel if you manually twist the motor. At low frequency pwm, the motor is essentially completely on for a short period, which may be a long enough short period to overcome the cogging. At high frequency pwm, the current never rises high enough to generate the torque.