Is there a reasonably easy way to change the switching frequency of the A4988 carrier to make it so that the squeal of the steppers when in a hold position is above the audible range, say 30k or so? I’m hoping to use stepper motors for a robotic microphone application, and the squeal from the motors when maintaining hold torque is problematic. Any other advice you might have to quiet the steppers down would be helpful. I’m currently using the A4988 carrier with the 1208 stepper motors.
We have the A4988 carrier set up to operate in mixed decay mode with a fixed off time of around 12 us. The on time depends on how long it takes the current to rise back up to the ITrip threshold, and the on time and off time combine to determine the current chopping frequency. There are a few things you could try to increase the PWM frequency. One would be to use a higher voltage, which should make the on time shorter. However, note that the minimum on time is 1 us, so raising the voltage raises the minimum achievable current limit. What voltage are you using now? I also recommend using the driver in full-step mode. Another option would be to change the ROSC resistor. You can find more information about this in the A4988 datasheet.
Finally, you could lower your voltage to something under 10 V and raise the current limit to well above 500 mA. In this configuration, the current will never exceed 500 mA (the maximum allowed by your motor), and there will be no current-limiting from the driver. The drawback to this approach is that microstepping will likely not work well, and your step rate and torque will be lower than they would if you used a much higher voltage.