How to quickly tune your stepper motor

Other Parts Discussed in Post: DRV8846

In our fast-paced world, there are many times we are tasked with having to make something work but don’t have time to learn the theory behind it. It’s important that it works but not as important why. This allows us to move on to the next task. In modern stepper motor drivers, tuning the motor for optimal current regulation can be one of those situations.

Recently, I’ve been asked why a stepper motor driver is misbehaving. The concern is that there are missing steps at low speed. The current waveform may jump up to one level and remain there until the steps catch up, or it may increase beyond the maximum chopping current. Typically the user has set mixed decay, but many devices use slow decay when the absolute value of the current is increasing.

Most often the distorted current waveform appears at holding or low speeds, where slow decay does not remove as much current as the driver inserted during the normal drive time. The problem is often worse as the motor voltage increases. The bottom image is an example of this loss of regulation at slow speed. The motor is driven at 200 steps per second with 1/8 microstep. The motor voltage is 12V.

In the top image, a new feature called adaptive decay is used to create the desired waveform at slow speeds. This new feature automatically adjusts the percentage of slow and fast decay to create a near optimal current waveform.

The bottom image shows a typical waveform using slow decay when the absolute value of the current is increasing and mixed decay (50% fast and 50% slow) when the absolute value of the current is decreasing. Note the missing steps as the current transitions from zero current, as highlighted in the yellow circle. This is due to the motor driver injecting more current during the drive state than is removed during the slow decay state. The missing steps can also be seen as the current begins to go negative.

Using these new features available, such as adaptive decay, you can quickly tune your stepper motor and move on to your next task.

For more information, please see check out:

DRV8846 samples

Watch my video for more on adaptive decay

See the DRV8846 in action using this 3D printer TI Designs reference design

 

Anonymous