SLOSE98A December 2022 – September 2023 DRV8461
PRODUCTION DATA
When operating with the SPI interface, the DRV8461 supports stall detection.
Stepper motors have a distinct relation between the winding current, back-EMF, and mechanical torque load of the motor, as shown in Figure 7-42. For an unloaded motor, the back-EMF is 90° out-of-phase with the winding current. As motor load approaches the maximum torque capability of the motor for a given winding current, the back-EMF will move in phase with the winding current. By detecting back-EMF phase shift between rising and falling current quadrants of the motor current, the DRV8461 can detect a motor overload stall condition or an end-of-line travel.
The Stall Detection algorithm is enabled when -
The device is programmed to operate with the SPI interface (MODE = 1)
The decay mode is programmed as smart tune Ripple Control (DECAY = 111b)
EN_STL is 1b
No fault condition exists (UVLO, OCP, OL, OTSD etc.).
The algorithm compares the back-EMF between the rising and falling current quadrants by monitoring PWM off time and generates a parameter called torque count, represented by the TRQ_COUNT register. The comparison is done in such a way that the TRQ_COUNT is largely independent of motor current, ambient temperature and supply voltage. Motor stall can be detected even if the driver is operating in full step mode.
TRQ_COUNT is calculated as a running average from the most recent four electrical half-cycles. TRQ_COUNT register is updated once every electrical half-cycle. The updated TRQ_COUNT is compared with the STALL_TH, and if a stall condition is detected, stall fault will be reported and latched at the electrical half-cycle current zero crossing.
For a lightly loaded motor, the TRQ_COUNT will be a non-zero value. As the motor approaches stall condition, TRQ_COUNT will approach zero and can be used to detect stall condition.
If anytime TRQ_COUNT falls below the stall threshold (represented by the STALL_TH register), the device will detect a stall.
STALL, STL and FAULT bits are latched 1b in the SPI register.
The STL_REP bit controls how stall is reported.
If STL_REP is 1b, the nFAULT pin will be driven low when a stall is detected.
If STEL_REP is 0b, the nFAULT pin will stay high even if stall is detected.
In the stalled condition, the motor shaft does not spin. The motor starts to spin again when the stall condition is removed and the motor ramps to its target speed. The nFAULT is released and the fault registers are cleared when a clear faults command is issued either via the CLR_FLT bit or an nSLEEP reset pulse.
High motor coil resistance can result in low TRQ_COUNT. The TRQ_SCALE bit allows scaling up low TRQ_COUNT values, for ease of further processing.
If the initially calculated TRQ_COUNT value is less than 500 and the TRQ_SCALE bit is 1b, then the TRQ_COUNT output in register is multiplied by a factor of 8.
If the TRQ_SCALE bit is 0b, TRQ_COUNT retains the value originally calculated by the algorithm.
Stall threshold can be set in two ways –
The user can write the STALL_TH bits by observing the behavior of the TRQ_COUNT output at all operating conditions.
The algorithm can learn the stall threshold using the automatic stall learning process, described below:
Before learning, ensure that the motor has reached its target speed. Do not learn stall threshold while the motor speed is ramping up or down.
Start learning by setting the STL_LRN bit to 1b.
Run motor with no load.
Wait for 32 electrical cycles for the driver to learn the steady-state count.
Stall the motor.
Wait for 16 electrical cycles for the driver to learn the stall count.
The STL_LRN_OK bit becomes 1b if learning is successful.
Stall threshold is calculated as the average of steady count and stall count and stored in the STALL_TH register.
The flowchart on how to set stall threshold is shown below.
Sometimes the automatic stall learning process might not be successful due to unstable torque count while the motor is running or is stalled. For example, when the motor has high coil resistance or is running at very high or low speeds, the torque count might vary a lot over time and the difference between steady count and stall count might be small. In such cases, it is recommended not to use the automatic stall learning method. Instead, the user should carefully study the steady count and torque count across the range of operating conditions and set the threshold midway between the minimum steady count and the maximum stall count.
A stall threshold learnt at one speed may not work well for another speed. It is recommended to re-learn the stall threshold every time the motor speed is changed by more than ± 10%.
The stall detection algorithm depends on back-EMF modifying the PWM off time. The back-EMF is directly proportional to the speed of the motor. In order for stall detection to work reliably, motor speed should be sufficiently high to be able to generate back-EMF of sufficient amplitude. Higher motor coil resistance would require higher minimum speed for reliable stall detection.
When the device goes from Disable mode (H-bridges Hi-z) to Active mode by toggling EN_OUT bit or ENABLE pin; or when the device recovers from a fault by issuing a CLR_FLT, stall detection fault may also be flagged. This is because of the time taken by TRQ_CNT to reach a value higher than STL_TH. As a result of the stall fault, nFAULT may stay low (if STL_REP = 1b), and another CLR_FLT will be needed to release stall fault and nFAULT pin. This can be prevented by -
Enabling stall detection after enabling active mode (write EN_STALL = 1b only after writing EN_OUT = 1b and making ENABLE = logic high)
By starting the STEP pulses only after the bridge is in active mode or after a CLR_FLT command has been issued to clear a fault condition.
If there is loss of current regulation due to low supply voltage, high coil resistance or high speed of the motor, stall detection may not work reliably, because the TRQ_COUNT can be erratic and may jump to a high value. This can be checked and confirmed by looking at the coil current waveform. If the coil current has a standard sinusoidal waveform, and the peak of the sinusoid reaches the desired full-scale current, then stall detection will work reliably. If the current waveform is triangular due to high speed or low supply voltage, stall detection algorithm might not work reliably.
If EN_STL = 1b and auto-torque is also enabled, coil current goes to ATQ_TRQ_MAX when motor stall is detected.
If EN_STL = 0b and auto-torque is enabled, coil current goes to ATQ_TRQ_MIN when motor is stalled.