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.

DRV8825 Current control PWM

Other Parts Discussed in Thread: DRV8825

Hi there,

I have a question regarding DRV8825 stepper motor driver. 

The datasheet states that the maximum step frequency is 250 kHz. However there is also written that that Internal current control PWM  frequency is 30 kHz.

There is also written:

The current through the motor windings is regulated using a fixed-frequency PWM scheme. This means that after any drive phase, when a motor winding current has hit the current chopping threshold (ITRIP), the DRV8825 will place the winding in one of the three decay modes until the PWM cycle has expired. Afterward, a new drive phase starts.

And this confuses me. How then stepping with frequency above 30 kHz is possible? Does it mean that the driver logic is actually ORing two events, one is a pulse from Step pin and another from PWM driver? Roughly speaking, step pulse drives the current through the phases, and then the comparator trips it when the phase current reaches the particular step trip value? And with step frequencies close to 250 kHz pwm actually doesn't play any role no more?

Thanks in advance.

  • Hi Andrei,

    The step frequency and the internal pwm frequency are not OR'ed.

    The step frequency is used to control the indexer logic. The indexer can be advanced at a 250kHz rate.
    The PWM frequency is used to regulate the current on the output. This uses the 30kHz frequency.

    An example of where advancing the indexer at >30kHz becomes useful is high speed stepper operation. At high speeds, it can be difficult to achieve to the desired current.
    Instead of changing from 1/8 step to full step, the indexer could be quickly advanced 8 steps from one full step location to the next. Upon reaching the full step location, the step pin would be held there until the next series of pulses are sent. Doing this allows more time at each full step, which allows more current (torque) in the system.
  • Hi Rick,

    Ok, it's clear to me now that the step pulses are only used to move to the next step position. Still, the last part of your answer is not clear to me. Could you please elaborate on it a little bit more.

    Let us assume that we are running a motor with step frequency 250 kHz with 1/8 step rate. Let's look at one phase. We are quickly moving from 0% current to 100% current which takes exactly 8 steps. So, when we reached 100% current position in our indexer table, what should we do now? What do you mean by saying "step pin would be held there until the next series of pulses" ? Should we explicitly hold on and not feed any step pulses to the driver?
  • Hi Andrei,

    Think of the sequence described as a way to implement full step at high speed without having to change the step mode. In general, maintaining torque at high speeds requires more time at each step. There are a couple of methods to provide more time at each step.

    1) As previously described.
    2) Switch to full step mode at higher speeds and lower the step rate.

    To clarify, assume the desired 1/8 speed is 48000 steps/second or 6000 full/steps. As the motor speed increases the current begins decreasing.

    Using 1/8 steps, a series of 8 step commands can be issued at 4us intervals. Total time to advance is 32us. Next hold the step input stabel for 134us allowing time for the current to build up. After 134us, the next series of 8 step commands can be issued.

    Alternately, at some predetermined speed the step mode can be changed to full step. The nHOME signal can be used to determine when to make the switch from 1/8 to full step. Once the switch has been made, the step rate is reduced from 20.8us to 166us to maintain the speed.

    Both methods described above should work.
  • Hi Rick,

    Yes, it sounds reasonable now. Sounds a bit tricky, but yea, might be useful someday :)
    Thank you.