Motor manufactures’ data sheets provide excellent performance information about a motor’s optimum operating parameters such as voltage and current at the motor’s rated speed. Most manufacturers also provide tables and graphs that show how the motor responds to different voltages and the corresponding changes to RPM, torque, and power. However, very little information is available about how a particular motor responds to PWM signals.
We already know that PWM duty cycle can control a motor’s speed, but to understand what happens when the PWM frequency is varied, we need a way to measure the motor’s frequency response — much like that used to characterize an audio speaker (another electromagnetic device). If we have the motor’s frequency response spectrum, picking the best-performing PWM frequency is straightforward.
The PWM frequency response spectrum for the Yellow-TT motor shows the motor speed (the red line) as the PWM frequency is swept from 25Hz to 2000Hz. The throttle is held at 0.150 during the frequency sweep creating an equivalent voltage of 0.750 volts. At a PWM frequency of 25Hz, the chart shows the motor spinning at 4000 RPM. The speed reduces quickly as the frequency increases, dropping to one-half of the initial RPMs at 340Hz and completely stopping when the PWM frequency reaches 1200Hz. The chart indicates that a PWM frequency of 340Hz or lower will work nicely with low motor throttle settings.
Test the frequency you selected with the motor attached to your robot and operating with its normal power supply source. PWM frequencies of 60Hz or lower can cause mechanical vibration depending on the motor and the quality of its gearbox. Adjust the PWM frequency for the best balance of vibration and low-speed operation.
Frequency response charts for a variety of popular brushed DC motors can be found in the Motor Performance Charts section.
If you don't have a PWM frequency response chart for your motor, the simplest way to pick an optimal PWM frequency is to watch your robot motors in action at different PWM frequencies. Start at the lowest possible value (usually about 25Hz) and work up to the maximum (2100Hz). Choose the frequency that provides the best balance of torque throughout the desired speed range while balancing the motor chatter that can happen at lower frequencies.
Most small brushed DC motors will operate nicely with a PWM frequency of 50Hz to 100Hz. Projects that don't use gearbox motors, such as the StringCar racer, seem to work best at 25Hz.