Datasheet

TMC5160 DATASHEET (Rev. 1.01 / 2017-NOV-29) 62
www.trinamic.com
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_AMPL can be calculated:




With V
M
the motor supply voltage and I
COIL
the target RMS current
The effective PWM voltage U
PWM
(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:







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:
  


With f
STEP
being the microstep frequency for 256 microstep resolution equivalent
and f
CLK
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:


󰇯

󰇰 



C
BEMF
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.