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.

DRV8711: changing microstepping ratio mid move

Part Number: DRV8711

At low speeds I use 1/16 microstepping to have fine control and lower noise etc. As I speed the motor up, I transition to full stepping in order to have more torque and to avoid resonances. I have the DRV8711 connected to a microcontroller (MCU) which sends the step pulses to the DRV8711 as well as handling the SPI. Currently, I am tracking when to make the transition internally in the MCU as I want the transition to occur on a valid state of the indexer (i.e. a state that is shared by both the 1/16 microstepping and full stepping). Is there any way to verify this? The datasheet only mentions the home state (reset state) once. The SPI interface doesn't allow the MCU to read the full indexer location, but is there a bit (e.g. in the reserved bits) that would show that the indexer is in a specific state (e.g. the home state)?

My current approach works, but I am nervous about the possibility of losing microsteps that could result in cumulative errors.

  • Hi ChrisP,

    Unfortunately, keeping track of the step pulse is the only way to make the transition. And there is no way to verify it.

    If you are not using stall detection, it may be possible to use the STALLn/BEMFVn signal as a check prior to switching to full step. The BEMFVn signal can signal a zero cross in microstep mode.

    As long as you time between step pulses to change step modes (and ideally read that the change has occurred), there should be no issue. 

  • Hi Rick

    Thank you for your reply. I didn't think there was a way of checking this but wondered if there was something unofficial or hidden in the Reserved bits of registers.

    I have never had the issue of the change not happening, that would be painfully (noisily) obvious if it happened. I would just like confirmation that I don't loose a microstep, or worse fullstep, by making the register change just after at say 1/16 index 8 rather than the intended index 9 (same angle as fullstep index 1). That would mean the next step pulse received by DRV8711 would cause it to move to fullstep index 1 rather than the expected index of 2 meaning a fullstep sized error.

    Thinking about it, I could deliberately make the change at 1/16 index 7, wait two lots of 1/16 microstep period and then send the next step pulse. This would mean I would at worst be one 1/16 microstep out (by actually being at 1/16 index 6 or 8) rather than running the risk of being a fullstep out.

    Thanks

    Chris

  • Hi Chris,

    Sorry for the delay.

    You probably have found this in the datasheet, but for the benefit of all:

    If the step mode is changed while stepping, the indexer will advance to the next valid state for the new MODE
    setting at the rising edge of STEP.

    Your suggestion of changing at 1/16 index 7 is a good idea. This may also provide more time to change the step mode depending on the step frequency.