Why is my DC motor whining at a lower PWM frequency?

Why is my DC motor whining at a lower PWM frequency?

Nathan Bong
Nathan Bong
PA Engineer

Supplying PWM signals to the DC motor of an actuator is a common method for adjusting travel speed, however, some cases may result in acoustic noise through motor whining. At some point during the testing phase of your project, you may have noticed your same DC motor may generate motor whining at varying loudness when you connect it to different speed controller devices. This may be due to the different PWM frequencies that were set in each speed controller or Arduino program. In this article, we will cover the pros and cons of adjusting PWM frequency and how it affects motor whining.

We offer a wide range of electric linear actuators for any application – click to browse! 

 

Common and Frequently Asked Questions

DC motors

 

Below is an overview of the common and frequently asked questions we get to help briefly cover the basics of duty cycle, PWM, and what changes to PWM frequency have what effects on DC motors.

 

  • What is Duty Cycle?

Duty cycle is the ratio of on-time to off-time, usually expressed as a percentage. This means if your actuator extends and retracts for 20 seconds, and then spends another 40 seconds at rest before the process repeats, the “duty cycle” would be expressed as 33%. The time taken for one “full cycle” in this example will be 60 seconds.

Duty Cycle = On time / (On time + Off Time)

 

  • What does PWM mean?

Pulse width modulation (PWM) is a technique commonly used in motor operation where electric signals are switching between 0% and 100% of the supply voltage being applied to the motor, similar to on and off from duty cycle. This allows for the ability to control the average value of voltage being applied to a motor to adjust the motor speed. Controlling the duty cycle allows for the ability to control the average voltage value to adjust the motor speed.

Duty Cycle * Voltage from source = Average voltage value

 

  • What is PWM frequency and how does it affect DC motor performance?

The PWM frequency represents how fast a PWM cycle is completed by your motor control device. It is not uncommon for DC motors to experience a whining noise when the motor controller being used was set to lower PWM frequencies.

 

  • Is it possible to eliminate motor whine entirely, or is some degree of noise to be expected?

This can vary as manufacturers will usually have some built tolerance that causes a range of different motor noises and characteristics. Certain motor designs may have rotors that result in some motor whine regardless of what PWM frequency was used. Setting the PWM frequency as high as practical for DC motors that were in good condition tends to help with motor whine reduction (This will be covered in more detail later).

 

  • Can adjusting the PWM frequency to reduce motor whine have any negative effects on the motor or the overall system performance?

An increase in the PWM frequency results in an increase in the power loss on the H-bridge used with your Arduino microcontroller and may cause the motor driver board to overheat. Users will need a method of cooling down their H-bridge or motor driver to prevent the components from getting damaged.

Start programming with Arduino microcontrollers and bring your next project to life!

What Causes DC Motors to Whine?

formula

 

We will be covering the motor’s acoustic noise which is audible to the human ear and not electrical noise. The equivalent circuit of a running DC motor is seen above. Due to back electromotive force (EMF), voltage in the opposite direction to current flow will result from the motor’s coils moving relative to a magnetic field. At rest or low speeds, the brushed DC motor equivalent circuit has little to no back EMF and is like that of a first-order RL circuit seen below.

The formula

 

The motor whining noise we hear is caused by the torque ripple that was generated from current (i) ripple. We also know that the upper cutoff frequency for an RL low pass filter has the formula seen below:

Frequency cutoff = 1 / (2π𝜏)

 

Where:

𝜏 = L / R

L = inductance (H)

R = Resistance (Ω)

𝜏 = time constant (seconds)

The theoretically ideal PWM frequency will depend on the inductance and resistance of a motor circuit but is expected to be greater than or equal to 5 times that of the cutoff frequency. This higher range of PWM frequency will allow the current running through the DC motor to reach 99.3% (close to 100%) of the maximum current value to avoid current ripple and reduce motor whining.

Formula

 

H-Bridge Power Loss and Heat Dissipation

A switch transition

 

As a switch transitions from on and off, the voltage and current are nonzero and result in power being dissipated by the switches. An H-bridge has both voltage and current present as they are switching, so a higher switching frequency from increasing PWM frequency means more heat and power dissipated. Installing heat sinks or fans onto motor driver boards that do not already come included with these cooling devices is recommended to avoid damage and ensure proper operation.

MegaMoto

 

Our LC-81 MegaMoto GT H-bridge Arduino Shield has a built-in cooling fan and heatsinks to further reduce overheating, making it ideal for high loads of current. For actuators with lower current draw requirements, we also offer the LC-80 MegaMoto Plus H-bridge for Arduino. Both H-bridge can be used with Arduino microcontrollers and have PWM Frequency ratings that go up to 20kHz for DC voltage.

Explore our range of pre-made control modules and speed controllers!

How to Reduce DC Motor Whine by Adjusting PWM Frequency with Arduino?

Arduino

 

The speed of a counter’s clock determines the output signal’s PWM frequency. For our most popular Arduino Uno, the system clock will be divided by a prescaler value to result in the counter's clock. CS02, CS01, and CS00 are the three least significant bits of the Timer/Counter registers which store the prescaler’s 3-bit value.

Set or clear these three least significant bits in the relevant TCCRnB register found in the void setup() segment of your Arduino code. By altering the timer prescalers through coding, the PWM frequency can be adjusted as seen in this reference video.

Arduino PWM Tutorial #1 - How to Change PWM Frequency:

 

The average human will usually hear sounds between 20 Hz and 20,000 Hz.

Frequency = cycle/time

1 Hz = 1 cycle/second

20 Hz = 1 cycle / (Time)

20 Hz * (Time) = 1 cycle

Time = 1 cycle/ 20 Hz

Time = 0.05 seconds

Time = 50 ms

For a PWM frequency of 20 Hz, one cycle will happen over a period of 50 milliseconds as seen below.

Frequency

 

At frequencies above 20 kHz, each cycle becomes shorter than an average human’s reaction time and will result in most individuals not being able to hear any motor whining. The PWM frequency range of 16kHz to 20kHz will generally solve most issues of DC motor whining. This range can be used as a starting point for testing before making gradual adjustments to fine-tune for PWM frequency optimization specifically for your motor behavior and characteristics.

Frequency = cycle/time

20 kHz = 1 cycle / (Time)

20000 Hz * (Time) = 1 cycle

Time = 1 cycle/ 20000 Hz

Time = 0.00005 seconds

Time = 50 µs

For a PWM frequency of 20 kHz, one cycle will happen over a period of 50 microseconds as seen below.

 

 Duty cycle

 

Combine Arduino microcontrollers with motor drivers and relays for even more control options!

IN SUMMARY  

Adjusting PWM frequency can help to minimize the unwanted sound of motor whining, however, we need to be aware of the pros and cons of doing so. It is important to find the suitable PWM frequency that has the best balance of motor driver power loss, heat dissipation, and motor whining which works for you.

We hope you found this as informative and interesting as we did, especially if you were looking to know more about DC motor whining at lower PWM frequency. If you have any queries or wish to discuss our products further, please do not hesitate in reaching out to us! We are experts in what we do and will be happy to assist in any way we can.

 

sales@progressiveautomations.com | 1-800-676-6123