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!
Hi Avyan,
I’m using an 15K resistor for R (C=1000pF, consequently Toff=15 usec) and mixed-decay mode. My problem is that I hear a soft squeal when I stop the motor (the step signal to the driver is low).
In this condition the Ton=21.6usec, so the frequency 1/(Ton+Toff) is 27.3K.
My question are:
- Could this frequency be the source of this noise?
- Is it possible to have Toff<Ton?
Thanks for your support!
Hi Akoba,
Soft squeal from the stepper is rather normal and it is almost impossible to fully eliminate. What decay mode are you using? When the motor is stopped, there is no need to employ fast or mixed decay so if you can switch to slow decay, that should help a little bit. If you are already on slow decay mode, then the only solution I can think of is decreasing current to something slightly larger than the current required for the application’s holding torque.
If none of this helps, you may consider making the RC resistor something as small as 12K (I wouldn’t go with anything smaller than this). But something tells me this could actually make things worst… Let’s see:
There may not be any problem with having TOFF be smaller than TON, but lets look at the implications. If TOFF is too short, current will decrease very little. When the bridge is enabled again, it will be very close to ITRIP so chances are you will have an ITRIP right after TBLANK, or ~1.4 us after enablement. The problem is that if the current went above ITRIP during the TBLANK period, then you do not know what current is at this time. All that you know is that it is larger than ITRIP. Hence the discharge will start from this higher than ITRIP point, and not from the actual ITRIP.
Although what this will mostly cause is a loss of current regulation, there is another mechanism we could observe if we see the current reaching ITRIP in and out of the TBLANK time stamp. This is of course highly conjectural, but it is possible you start having current chop cycles in which the TON is continuously varying, so what in essence you have is a low frequency component (or how TON is changing across time) which is what you hear.
To eliminate this frequency is then in essence impossible as you cannot fully control TON. All you can do is make the frequency component as imperceptible as possible. And the only way I can think of to achieve this is by reducing current magnitude. That is why stepper drives with closed loop technology (dynamic current control) are so quiet; because they only use the current they need. Of course at this point we could easily stop calling it a stepper and refer to them as servos, which is what they are.
Wish you luck in your noise decrease endeavors!
Hi Avayan,
thanks for you reply.
I’ll let you know about my results!
Hi Avayan,
Thanks a lot for a wonderful explanation.
I came across your post on this topic when I wanted to tune my circuit
for stepper motors using DRV8825 which I built. I am having big difficulties
in getting the stepper (Nema 17 1.2 amps per phase bi-polar) to run properly.
Here is what is happening:
1) Stepping mode – full
2) Decay – fast
3) Voltage – 40V
When accelerating the rotor very often starts “jerking” / vibrating or loosing steps
but the faster it goes, the smoother it runs. I have tried using different accelerations
but with more or less the same results. I also tried to adjust the reference voltage.
With smaller values it seem to run better but then with higher speed it stalls.
1) Stepping mode – full
2) Decay – slow
3) Voltage – 40V
Motor seems to be working much nicer – very nice start, no noise but stalls very quickly.
1) Stepping mode – full
2) Decay – mixed (pin open)
3) Voltage – 40V
Exactly the same as above (for slow decay). All my investigations narrowed down to decay problem
thus how I found your post. I really liked the way you adjusted the decay – is it possible to
do the same with DRV8825 ? You mentioned about adjusting the ref voltage in real time – would you
know where I could read more about that sort of approach (working example, diagrams, algorithms) ?
Or perhaps you would have another suggestions.
I am using the same schematics as on the DRV8825 datasheet document. Would you know what would the impact
on changing charge pump flying capacitor be ?
Many thanks for any information.
Regards,
Adrian
Hi Adrian,
Unfortunately, DRV8825 does not have the same flexibility as DRV8811/18 in terms of decay configurability. Here is the deal: DRV8811/18 is a great device but people tends to complain about how many components you need to make it work; namely, the external caps and resistors to set TBLANK and TOFF. Enter DRV8825 with a series of predetermined parameters and no need for such external components. This means an easier implementation, less cost, less space, and you know the rest.
As of today, I am not aware of a system with two battles in which you can win both. This is like in quantum mechanics and the uncertainty principle. The better you know a particle’s momentum, the less you know its position, and so on. Same happens here! The more flexible you make something, the more expensive it becomes. The cheaper you make it, the less flexible it becomes. I wish I had better news, but we are stuc in this universe and under this set of laws, there is not much else we can do.
Now, your observed behavior points me to an observation I will dare to make with a fairly large lack of information. Here we go…
You are telling us that as your stepper is accelerated with slow or mixed decay, it stalls. Under full step, slow decay is considered to be the optimal setting. But if you are stalling, this tells me the current may be losing regulation. This happens when you have a motor with a large inductance and the MIN TIME ON is such that you can’t discharge the winding below the ITRIP level. What you get is a current runaway condition which in turn represents a torque ripple. I think this is the cause for your stalling.
I also think the 40V are not helping. Because the voltage is so high, the current increases too fast. This is why it works on fast decay. Because on fast decay, you can discharge as much as you can charge and current is kept in sync. On Slow decay, once you hit ITRIP, the current decays to a value too close to ITRIP. So when the new cycle starts, you go above ITRIP almost instantaneously. From there on you are always higher and higher and higher…
I am thinking you may want to try different voltages, especially lower ones. Keep us posted on whether this works or not!
Thanks for checking this post!
Hi Avayan,
Thanks so much for your reply – really appreciate it !
I agree with every point you make – I looked up 8811 and I immediately
realised how you adjusted the decay ….
But first things first …. I have a bad news and a good news
The really bad news is I probably fried 8825 …. and by very very stupid way.
I was connecting oscilloscope in rush very late in the night and guess what ?
Connected it ACROSS motor phase … The amperage reading on my bench power supply
quickly went to over 5 amps and I switched it off as soon as I could …
Tried it again (without shorting – ouch !) and amps was again getting high.
So I suspect I fried 8825 (I hope only it!). I will check it all again today.
The good news is – I have another 8825
Just need to solder it to a dip adapter.
Anyway – yes – when voltage is smaller – it seems to perform slightly better. The problem
with it is that you can’t run it fast – to slow current ramp on the coil.
Also – I have not checked the coils inductance yet – will also try to do it all today / tomorrow.
Some my thoughts:
1) Are there any other ways to adjust current increase on ON stages other than regulating
Yes – I still want to get 8825 working
voltage level ? Would a small value capacitor on the coil work at all ? I have a feeling it would
introduce a lot of troubles especially when driving the motor fast
2) Now I know that I want another chip !
(for educational purposes) but I will be looking for other ICs. I came across L6470H – I really
like it as it seem to allow to adjust a lot of settings ! I know – the price is not very
attractive but is not bad at all considering what you can do with it. So when I finish
my experiments with 8825 – my next one (I hope the final one which I want to use in my open source
CNC project) will be L6470H.
I will let you know my findings when ready – thanks again so much for a lengthy but how accurate post.
Best Regards,
Adrian Sosialuk