TMC5160 DATASHEET (Rev. 1.08 / 2018-NOV-19)
62
7.4 Velocity Based Scaling
Velocity based scaling scales the stealthChop amplitude based on the time between each two steps,
i.e. based on TSTEP, measured in clock cycles. This concept basically does not require a current
measurement, because no regulation loop is necessary. A pure velocity-based scaling is available via
programming, only, when setting pwm_autoscale = 0. The basic idea is to have a linear approximation
of the voltage required to drive the target current into the motor. The stepper motor has a certain coil
resistance and thus needs a certain voltage amplitude to yield a target current based on the basic
formula I=U/R. With R being the coil resistance, U the supply voltage scaled by the PWM value, the
current I results. The initial value for PWM_OFS can be calculated:
374 ∗ 푅ꢋ푂ꢌ퐿 ∗ 퐼ꢋ푂ꢌ퐿
푃ꢏꢐ_ꢑ퐹푆 =
푉푀
With VM the motor supply voltage and ICOIL the target RMS current
The effective PWM voltage UPWM (1/SQRT(2) x peak value) results considering the 8 bit resolution and
248 sine wave peak for the actual PWM amplitude shown as PWM_SCALE:
푃ꢏꢐ_푆퐶ꢎꢒ퐸 ꢀ4ꢁ
ꢃ
푃ꢏꢐ_푆퐶ꢎꢒ퐸
374
푈ꢊ푊푀 = 푉푀 ∗
∗
∗
= 푉푀 ∗
ꢀ56
ꢀ56
√
ꢀ
With rising motor velocity, the motor generates an increasing back EMF voltage. The back EMF voltage
is proportional to the motor velocity. It reduces the PWM voltage effective at the coil resistance and
thus current decreases. The TMC5160 provides a second velocity dependent factor (PWM_GRAD) to
compensate for this. The overall effective PWM amplitude (PWM_SCALE_SUM) in this mode
automatically is calculated in dependence of the microstep frequency as:
푓
ꢓ푇ꢔꢊ
푃ꢏꢐ_푆퐶ꢎꢒ퐸_푆푈ꢐ = 푃ꢏꢐ_ꢑ퐹푆 + 푃ꢏꢐ_퐺푅ꢎ퐷 ∗ ꢀ56 ∗
푓
ꢋ퐿퐾
With fSTEP being the microstep frequency for 256 microstep resolution equivalent
and fCLK the clock frequency supplied to the driver or the actual internal frequency
As a first approximation, the back EMF subtracts from the supply voltage and thus the effective current
amplitude decreases. This way, a first approximation for PWM_GRAD setting can be calculated:
푉
푓
∗ ꢃ.46
ꢋ퐿퐾
푃ꢏꢐ_퐺푅ꢎ퐷 = 퐶퐵ꢔ푀ꢕ
[
] ∗ ꢀ휋 ∗
푟푎푑
푠
푉푀 ∗ ꢐ푆푃푅
CBEMF is the back EMF constant of the motor in Volts per radian/second.
MSPR is the number of microsteps per rotation, e.g. 51200 = 256µsteps multiplied by 200 fullsteps for
a 1.8° motor.
www.trinamic.com