How To Decrease Noise on Your Stepper Motor Driver

Ahhh!!! That stepper driver’s high pitch squealing is driving me nuts! Well, it has to drive you somehow as after all it is a “driver”, right? Well, nuts should not be it. It should drive your stepper motor and be done with it. But what if by nature stepper motors are noise and it is just a matter of learning to live with it?

Chances are you are not about to buy into such a lifestyle. You have heard quiet stepper drives and you want one to! So if you are experiencing some undesirable high pitch squealing from your stepper motor driver and are in need of reducing this horrendous form of ear-torture, feel free to check out these easy steps:

The SOURCE!

Where does it come from? Why can I hear it? Shouldn’t this motor be completely silent? If it were disabled it would be silent. But when energized, it is just not possible. Especially when we are regulating the winding currents by chopping them into submission. Current chopping is the preferred method of driving steppers nowadays. It is way much more efficient than having a humonghous resistor to limit the current, occupies less space, cost less and generates less heat. It is just the way to go. But by nature, current chopping implies that we are embedding a PWM signal to turn the H Bridge ON and OFF continuously, at the same time we look at the resulting current, in an attempt to source into the stepper the current it wants to see.

Unfortunately, using a PWM to regulate the current transforms the stepper motor into a speaker. And not a good one, I must add. Nonetheless, you do have the very same elements in a stepper motor that you have in a speaker: a permanent magnet (the motor rotor), an electromagnet (the motor stator) and a modulated signal (the current chopping PWM). The modulated signal is not intended to be an audio signal, but ask the question, is it not? Have you seen these guys who use the stepper to play a tune by changing the stepping rate frequency? You can hear it! If you can play music with your stepper, is because audible frequencies will be used to actuate it. Already not helping…

But the high pitch squealing we dread so much does not come from the stepping rate frequency. Heck, the motor is not even moving and I can hear it! Oh no! That noise is coming from the motor as it holds the position. In this case, the switching frequency is the one to blame. What is your switching frequency? Is it below 20 KHz? Then you are pretty much hosed as you will most likely have an audible component. And it is said audible component based on a below 20 KHz switching frequency the one which takes us to the first solution:

Solution #1: Increase Switching Frequency

The current chopper circuitry will most likely offer you some way in which you can increase the switching frequency. For example, in the DRV8811 this is achieved by changing the R and C components at the RCx pins. These two components will change the TIME_OFF portion of the current regulation period. The smaller the TIME_OFF, the smaller the total current regulation period which is the same as the higher the frequency. Hence, you will want to decrease the R component to some value in which your frequency is considerably higher than 20 KHz. But don’t go too high! As switching frequency increases, so does increase the switching losses. In other words, heating inside the device goes up and this is by definition not good. I would suggest any frequency between 30 KHz and 50 KHz with 30 KHz the bare minimum and 50 KHz the bare maximum. I can of course be wrong, so feel free to challenge me and experiment with lower or higher frequencies and then return to these constraints if you find the audible noise is present or the device is running too hot even at small currents.

How about TIME_ON? Unfortunately there is not much you can do with this parameter unless you have access to changing the motor inductance (by using a different motor) or the motor power supply. If you can increase the voltage, TIME_ON will surely decrease, increasing your switching frequency. Do note this also increases the switching losses as they are directly proportional to power supply voltage. Yet another tradeoff… Doesn’t it sound like engineering already?

If you manage to get a motor with less inductance, the switching frequency will increase as well. Keep in mind this is why each stepper driver system needs to be “tuned” to the motor. Not necessarily on a unit per unit basis, but definitely on a part number to part number basis. If the motor inductance is different, so will its Ldi/dt be different. At the end it is this Ldi/dt which defines the TIME_ON period on the current chopping waveform.

Some devices like the DRV8821, DRV824 and DRV8825 have internally set switching frequencies and there is no adjustment. In that case, you may want to try the next option:

Solution #2: Decrease Stepper Current

Decreasing the winding current also decreases the audible noise to some extent. This venue will work for both during run time as well as holding torque instances. During run time, the less current you use, the less vibration. However, it also means the less torque. So decreasing current will work up to some point. If you decrease too much, you may start loosing steps and this is a big NO NO when it comes to stepper driving. Since you are operating the motor in open loop, you must ensure the right amount of current is supplied at all times. You don’t know when load is to change, so you need to make sure all bases are covered. This is one of the biggest draw backs when employing steppers, but is not the end of the world. If you want to add close loop to the application, you could then scale current on a per torque request basis. This, however, is not a trivial endeavor and will require a level of complexity stepper users do not want to deal with. Driving the stepper motor in open loop is the reason we have stepper motors in the first place!

Decreasing current while not running, however, is pretty much the right thing to do. Again, only to some extent. Chances are you will want the holding torque to be large enough for the stepper to hold its position. Why? Because if it moves, then you have to home it again! Some applications are OK with this and they will even disable the stepper completely (NO AUDIBLE NOISE YIPEE!!). But if you are pretending to stop and then continue from where you are, it is important for the holding torque to be as large as necessary. Often time, however, the current needed to hold the torque is considerably less than the current needed to accelerate or run. Hence, changing the current in real time is a desirable trait on stepper driver modules.

On practically all stepper drivers (DRV8811, DRV8821, DRV8824, DRV8825, etc) you will have access to changing the current by modulating the analog input VREF, which can be updated on the fly. Since ITRIP is a function of RSENSE and VREF, but the RSENSE is pretty much set in stone (don’t try anything “fancy” like using multiple RSENSE’s with an analog multiplexer as this is by definition mega-nuts), changing the VREF analog voltage on the fly is the right procedure to modulate your current and stepper torque in real time. Do note that when I mention current modulation through this VREF, I do not imply the creation of microsteps. Let the DRV8811/21/24/25 handle the microsteps. If you are using a dual H Bridge device like the DRV8812 or DRV8813 then in this case the VREF would also be used to induce microsteps. But with devices resorting to an internal indexer, the microsteps are taken care of. In this case VREF is merely a sine wave wave shape current scaler.

Solution #3: Use Slow Decay Versus Fast or Mixed Decay

When possible, you will want to operate your motor on slow decay current recirculation mode, instead of fast or mixed decay. This is especially true if you are actuating your motor with full step commutation. Other than decreased noise, as the current ripple is the smallest possible, you will also obtain the most efficient usage of your H Bridge. For example, under slow decay you will get better torque response due to the fact that average current is larger with this mode than with the higher current ripple observed while on fast decay mode. Unfortunately, slow decay mode is not the always the best current decay technique. If you are microstepping, slow decay kills the sine / cosine waveshapes on those sides in which the current is decreasing in magnitude. Namely, sine wave quadrants 2 and 4. I have discussed this matter on one of my Yut Tube videos where I describe the usage of the DECAY pin:

This video will go through most of what you need to know on how to properly select the right decay mode. But as a summary, let me specify that you will most likely want to use mixed decay mode when possible. Most of the time, this is the best choice. When that is the case, you will want to tune the mixed decay rate to the motor as described on the video. If you do not have a current probe (most of us don’t as they are frigging expensive), you will want to tune it until you hear it the least. When this happens the waveshape is not the cleanest, but at least you have optimized the sound which is what we are trying to do here anyway.

Conclussions

Welcome to this universe! The universe in which you can not get all you want at the same time. Sounds annoying? But is unfortunately the truth. I hardly ever write posts in which this phenomenon can be seen as much as in this particular one. Increase the voltage to reduce the Ldi/dt, but then the switching losses go up. Increase the switching frequency so that it is above audible level, but then the switching losses go up again. Decrease the current so that the audible element is less strong, but then the motor is also less strong. There is no way to win here! Either you get some noise, or you get some useless piece of metals and magnets with the capability of moving, but that is not. At the end, what we need to do here is find the optimal set of variables for the motor and application in question. This will not be tinker toy technology. You will need to tailor the driver to the motor and the application; namely the motor inductance and the application power supply. The system needs to be tuned! And at the end, some audible noise may still remain. It is called a stepper for a reason, and in the same fashion you can hear somebody as they climb up and down the stairs, steppers will also generate some form of noise. We can decrease this to some extent, but there will always be some.

So ask you this question: What are  you looking for? Extreme quiet or a cost effective solution? You will only be able to get one or the other, hardly ever both. So like I said, welcome to this universe!

17 comments for “How To Decrease Noise on Your Stepper Motor Driver

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.