This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRV8434S: Stall not detected when TRQ_COUNT < STALL_TH

Part Number: DRV8434S

Tool/software:

Hello,

I have set up the DRV8434S to drive a 1.5A stepper motor. I have enabled the TRQ_SCALE bit, and through testing I have found the motor stalls at around 200 TRQ_COUNT. I have set the STALL_TH to 255, and enabled EN_STL, however when the motor stalls, and the TRQ_COUNT goes below 255, the STL, STALL, and nFault pin are not changed.

Here is a register dump taken during a stall, when the TRQ_COUNT dropped below 255:

Stall detected
Register dump:
0x00: 0b0000 0000
0x01: 0b0000 0000
0x02: 0b0000 0000
0x03: 0b1100 0000
0x04: 0b1000 1111
0x05: 0b0000 1000
0x06: 0b0011 0000
0x07: 0b0001 1000
0x08: 0b1111 1111
0x09: 0b0011 0000
0x0A: 0b1111 0000
0x0B: 0b0000 0000

If I'm reading it correctly, the decay mode is smart tune ripple control, the EN_STL bit is 1, and there are no faults, as required to use stall detection.

The TRQ_COUNT is 240, and the STALL_TH is 255, therefore the stall condition should be met, however, the STL and STALL bits aren't set.

I've tried a few different things, including using different microstepping levels, turning TRQ_SCALE off, changing the motor speed and current limit, however nothing has fixed this.

Any advice is appreciated,

Thanks

  • Hello George,

    Were you performing these tests on a TI DRV8434SEVM? What was the VM voltage used? Based on the post you were using a target current set at 1.5A, correct? What was the torque count while the stepper is running with no load both with torque scale off and on? 1/8 to 1/64 settings are the best microstep settings zone for good stall detection. Could you please share the current waveform of either A or B windings? What is the STEP input rate used during the test. If there is STEP to STEP time period variation stall will not be detected, for example acceleration profile in progress. I assume the motor was running with steady state target velocity while stall detection was tested.   

    Did you also try a much lower stall threshold value just to make sure detection was not affected by noisy counts? Register dump does not look unusual. Thanks.

    Regards, Murugavel

  • Hi Murugavel,

    This was run on a pololu driver board, VM is 12V.

    I have set a Vref equivalent to 1.5A target current, but I have set the TRQ_DAC to 25% to make the motor easier to stall.

    The no load TRQ_COUNT is around 500 with TRQ_SCALE on, and around 80 with TRQ_SCALE set to 0.

    I am using 1/64 microstepping.

    Here is the current waveform:

    My step to step time is ~78us / ~13kHz steady state. Every 64 steps there is a ~1ms pause while the registers are read for debugging. I have tried removing this pause and just monitoring the nFault pin, however this does not fix my issue.

    I have tried setting both a very low and very high stall threshold and have not been able to get the STL bit to set.

    Thanks,

    George

  • Hi George,

    Thanks for the additional information. The current waveform looks reasonable as well as the no load torque count. You said "Every 64 steps there is a ~1ms pause while the registers are read for debugging. I have tried removing this pause and just monitoring the nFault pin". Does this mean you were generating the STEP input pulses using firmware GPIO toggle? I have seen this method creates variations in STEP period, pulse to pulse, that can prevent stall detection. Would it be possible to use a Timer PWM output (hardware based) or an external signal generator with the required STEP pulses for testing this? 

    Regards, Murugavel

  • Hi Murugavel,

    Yes the step pulse is generated with a GPIO toggle, I did have a look at the step signal and it looked reasonably consistent, but I'll have a go tomorrow with a signal generator.

    Thanks, George

  • Hi George,

    Sounds good, thanks. I have a similar setup with a 1.5 A stepper NEMA17 and a DRV8434S with 24V supply. I do not have any trouble detecting stall using the GUI of the EVM. I set the current to 0.5 A just so I can easily stall the motor. The STEP pulses are generated by the timer in an MCU in the EVM. Just for your reference. 

    Regards, Murugavel

  • Hi Murugavel,

    Using a signal generator fixed my problem, I will move to using a hardware timer for the step pulses. There was an occasional jitter in the clock, 4us or so in every few 80us step pulses, I didnt realise the stall detection would be so sensitive to this.

    Thanks, George

  • Hi George,

    Good to know that using a stable STEP input resolved your issue. Yes stall detection is automatically masked if there is a variation in STEP input pulses period. This helps false detection during acceleration or deceleration. Please mark this post as resolved and close it at your end. Thank you.

    Regards, Murugavel