Controlling PWM frequency on A4988

Is it possible to fix the PWM frequency with which Pololu A4988 driver chops the current to the motor windings?
I have one motor that I’d like to use (omc-stepperonline.com/nema-1 … -p-19.html), but it makes this disturbing whining noise. Hooking up a scope to one of the windings, I can see the usual PWM cycle (jumping from 0 to 12v, which is where my supply voltage is at). However, the frequency of that PWM changes depending on the microstep phase (I’m in 1/16 mode, ROSC pin grounded). I get from 5KHz to 15KHz - and I get a headache within 10 min of being near the thing :slight_smile:

I thought the PWM frequency of chopper drivers was fixed, and the only thing that changed was the duty cycle, obviously, that’s not the case.

Another motor I have, also shows variable PWM frequency, but its higher pitch (17KHZ to 22KHZ) and not nearly as disturbing.

Hello.

The A4988 does not have a fixed PWM frequency, just a fixed off time. There are a few ways you can change the PWM frequency by changing the on time of the driver, which you can read about in this forum post.

Additionally, you might consider using our AMIS-30543 Stepper Motor Driver Carrier, which has two fixed PWM frequencies to select from. Both of those frequencies are above 20kHz.

-Jon