TMC2160 DATASHEET (Rev. 1.02 / 2018-NOV-19)
50
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:
푃ꢊꢋ_푆ꢍꢉꢎ퐸 248
1
푃ꢊꢋ_푆ꢍꢉꢎ퐸
374
푈ꢆ푊푀 = 푉푀 ∗
∗
∗
= 푉푀 ∗
256
256
√
2
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 TMC2160 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:
푓
ꢏ푇ꢐꢆ
푃ꢊꢋ_푆ꢍꢉꢎ퐸_푆푈ꢋ = 푃ꢊꢋ_ꢌ퐹푆 + 푃ꢊꢋ_퐺푅ꢉ퐷 ∗ 256 ∗
푓
퐶퐿퐾
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:
푉
푓
∗ 1.46
퐶퐿퐾
푃ꢊꢋ_퐺푅ꢉ퐷 = ꢍ퐵ꢐ푀ꢑ
[
] ∗ 2휋 ∗
푟푎푑
푠
푉푀 ∗ ꢋ푆푃푅
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