Datasheet

TMC2209 DATASHEET (Rev. 1.03 / 2019-JUN-26) 40
www.trinamic.com
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 TMC2209 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.
PWM scaling
(PWM_SCALE_SUM)
Velocity
PWM_OFS
PWM reaches
max. amplitude
255
0
PWM
_
GRAD
Motor current
Nominal current
(e.g. sine wave RMS)
Current drops
(
depends on
motor load
)
Constant motor
RMS current
0
V
PWMMAX
Figure 6.6 Velocity based PWM scaling (pwm_autoscale=0)