I note the following comments & recommendations in the DRV8711 documentation:
Datasheet: 7.3.10.1 Internal Stall Detection
..."The time between step inputs must be greater than SMPLTH time for back EMF sampling."
SLVA632–March 2014: 9 Stall Detect
..."The sampling occurs after SMPLTH during this zero current step."
So to confirm my interpretation: set SMPLTH to be a period of time less than the step rate (makes sense ...).
My question is - do you believe there is a sweet spot for the SMPLTH setting relative to the step rate.
Without the benefit of having access to a scope, I am somewhat working through this by trial and error.
In the chart below, I have represented 7 cycles of stepping a motor 1000 times (VM = supply voltage = 12v) with the following settings:
- 30 steps/second, StepMode=Microstep8, ExStall=1, VDIV=4.
At the commencement of each cycle, I set SMPLTH to the next tested value for SMPLTH (usec100, then usec200 ... through to usec1000 on the 7th cycle).
(extremely UNscientifically) - part way through each cycle, I grab the motor pulley with my fingers enough to generate "a load" but not hard enough to (visibly/audibly) to miss steps.
So in my case (charted below), the SMPLTH that appears to provide the most ... sensitivity ... between no load and some load us SMPLTH=usec300.
BEMF Volts is reverse calculated through an external DAC as:
BEMF (volts) = dacpin * (5.0 / 1023.0) * 4.0 ;
Comments welcomed...
Many thanks,
Glenn.