Skip to content

Why voltage matters

teemuatlut edited this page Feb 12, 2019 · 1 revision

Why voltage matters

This section primarily focuses on spreadCycle stepping mode and how your main driver voltage (VMOT) level affects the chopper behavior.

As per usual the datasheet and application notes provide further information but this is meant as a more high level explanation.


TLDR

Off time, hysteresis settings, motor characteristics and driver voltage determine the chopper frequency.

Aim for a frequency above normal human hearing, around >22kHz.

To increase chopper frequency; decrease off time and hysteresis, increase driver voltage.

Too high frequency increases switching losses within the driver. Read: heat.

Understanding spreadCycle

The goal of the driver is to adjust the amount of current in a coil to generate a electromagnetic field and thus a force that rotates the motor shaft. In spreadCycle mode the driver will measure the coil current with a sense resistor and cut it off once the current reaches desired level. After the current falls down enough, the driver will turn it on again and so there's a balancing act to keep the coil current at desired level. This level is determined first by the configured rms value, as well as scaled down according the microstepping look up table. Even if the current is turned on and off again, it should not be confused with PWM. They are not the same.

In total for spreadCycle there are four stages the driver goes through:

  • On phase
  • Slow decay
  • Fast decay
  • 2nd slow decay

In the on phase the current in the coil increases until the driver cuts it off based on measurements. Slow decay is when the current re-circulates within the motor coil. No current passes through the sense resistor and current cannot be measured. That's why slow decay is terminated by a timer. In fast decay current is driven to the coil in the opposite direction compared to on phase.

Parameters

irun ihold toff tbl hstrt hend

There are several parameters within the drivers that affect the chopper cycle. As said, On phase is terminated by the rms current configuration as well as position in the microstepping table. There's also the hysteresis settings. At the start of on phase (or fast decay), there's a small ripple or spike during which current cannot be reliably measured and the TMC drivers use a timer during which the measurements are not taken. This timer is configured with blank time (tbl) and as all timers and velocities within the TMC drivers, is based on the driver system clock. Typically, but not always, this is around 12.5MHz. Because current does not flow through the sense resistor during the slow decay phases, another timing value is needed to terminate the phase. This duration is configured with off time (toff). The hysteresis options hysteresis start (hstrt) and hysteresis end (hend) also affect the chopper timing. You can read more about tuning them in the datasheet or in an application note.

How voltage affects the chopper timings and frequency

The chopper frequency depends on how long the four phases take. Slow decay is determined by timers but on phase and fast decay depend on your stepper motor characteristics and the main driver voltage level. As the driver switches on voltage to the motor to raise the current in a coil, the motor coil will try to resist this change because of its impedance (inductance mostly). The phase ends when current is at the desired level (peak = rms * sqrt(2)). Thus we can conclude that the on phase duration, and thus one factor in the chopper frequency depends on motor inductance and the driver voltage. Higher voltage means the current in the coil increases faster and so the chopper frequency also increases. Lower motor inductance means the coil will resist current change less and the current increases faster also increasing the chopper frequency.