Stepstuck revisited… DRV8825

In April 2012 Nophead from HydraRaptor fame, brought us the micro-current hack for the pololu 4988 stepper motor driver carrier.

Now, it is my turn…

The amazing DRV8825 driver carrier has a similar flaw, strange jumping of steps in 32th micro-stepping mode.

After doing a bit of research, it seems that we need to put the chip in FAST decay mode, by pulling the DECAY line of the chip to 5V.  Luckily the DRV has exposed pins, so I carefully soldered the DECAY pin (19) to the M2 pin on the board (will be 5V when 32th uStepping is enabled.)

Decay mode modification - FAST mode
Decay mode modification – FAST mode

Movement as smooth as butter!

39 Replies to “Stepstuck revisited… DRV8825”

  1. Which version of DRV8825 do you have? On the bottom in silkscreen should say either md20a or md20b?
    Looking for my 1/32 drivers to buy-$1 difference.

  2. From the datasheet the DRV board is set for mixed decay. Do you have before and after videos to show the difference of doing the mod?

    “The DRV8825 supports fast decay, slow decay and a mixed decay mode. Slow, fast, or mixed decay mode is selected by the state of the DECAY pin – logic low selects slow decay, open selects mixed decay operation, and logic high sets fast decay mode. The DECAY pin has both an internal pullup resistor of approximately 130 kΩ and an internal pulldown resistor of approximately 80 kΩ. This sets the mixed decay mode if the pin is left open or undriven.

    Mixed decay mode begins as fast decay, but at a fixed period of time (75% of the PWM cycle) switches to slow decay mode for the remainder of the fixed PWM period. This occurs only if the current through the winding is decreasing (per the indexer step table); if the current is increasing, then slow decay is used.”


    1. I do not have video, but the easiest is to look at the output, and also touch the arms while working. The motors had a grainy movement to it, as if sand got in the bearings. After the mod, the movement is smooth, at the expense of a bit more noise coming from the drivers

      I think the reason for this is that the motors are not driven very hard, and that the motors turn relatively slowly, accentuating any decay errors during printing.

      The best way is to make a needle probe, and connect the pin on the driver to 5V during a slow movement. The difference will be clear.

        1. Yes, the problem is still visible at 1/16 steps but not as pronounced. The issue remains the same. In order to make the driver quieter, the output is filtered to remove audible noise. Unfortunately this also filters some of the low powered step phases, and can cause small artifacts.

          Fast decay delivers the most accurate steps, at the expense of some noise.

          1. Thank you very much for the quick response.

            Will see if this works for me on 1/16 micro steps

  3. I read the article, and since i have the stepstick drv 8825, can i do that hack?
    And could in not be possible to put 5V from the arduino on the M2 pin? or is the decay only on when the stepper motor is moving?

    Greetings Wilco

    1. You can connect 5V to it permanently. I chose that pin because I could control it for the experiment.

  4. I did this to one of my drivers and had a real hard time with the second. In fact, the second is not done yet. At this point I fear I may have damaged it I have tried so many times. I was looking at pin 19’s neighbors. Could I short pin 19 to pin 21 (ENABLE)? I was thinking that pin 21 is high when the driver is on. Am I wrong on that? The other neighbor looked like it might work as well. Pin 17 appears to be nSLEEP which is high when the driver is not sleeping. Twice I desoldered and started over because I had bridged 19 and 21.

    1. According to the TI spreadsheet that 21st pin is nENABLE and not ENABLE. So it will be high when the driver is disabled. Connecting DECAY to it will result in setting fast decay when the driver is disabled and slow decay when it’s enabled (because while it’s enabled then the 21st pin will be in logic low – and logic low on DECAY gives show decay).

      1. Thanks Szafran,
        I wondered why I would go so far for the 5v in my hack if 5v was so close by. Turns out I didn’t, because it wasn’t!
        Good catch!

  5. That seems perfectly reasonable…

    You will however have to be sure that you do not include 18 or 20 in the bridge. 18 is an output (nFault) and will kill 5v when activated, and 20 is your direction pin… very very important.

    Check the datasheet for the pin numbering: Pins are numbered from the dot in the top left corner, going down, and then continuing anticlockwise around the chip.

    1. Are you completely sure that we shouldn’t just join pin 19 with pin 18? In this page it appears that OldDogSleeping simply does it:

      And I think it shoud be ok, looking at the description of the DRV8825 in
      Key differences between the DRV8825 and A4988
      The pin used to supply logic voltage to the A4988 is used as the DRV8825’s FAULT output, since the DRV8825 does not require a logic supply (and the A4988 does not have a fault output). Note that it is safe to connect the FAULT pin directly to a logic supply (there is a 1.5k resistor between the IC output and the pin to protect it), so the DRV8825 module can be used in systems designed for the A4988 that route logic power to this pin.

      If we want to replace the A4988 with the DRV8825, then FAULT pin will be connected to logic power supply, because our system is configured to give 5V to A4988’s VDD.

      1. Been a long time since I had to hack at carrier modules…

        I am a bit of a control freak in that I want to be 100% sure what signals I apply to the driver, but this should work as long as the chip is not in overcurrent error condition (which would disable the chip completely anyway)

        Give it a shot, and let us know how it goes. It is surely a lot less work than my hack!

        1. Hello Quentin,
          Finally, I replaced my A4988 stepper drivers with the DRV8825 configured in Fast Decay mode by soldering the pin 19 (decay) with pin 18 (nFault).

          I have X and Y configured with 1/32 microstepping, and Z and E with 1/16.
          I think that the printer goes ok and very smooth.


    2. Hello
      I have noticed that the 1.5k resistor that protects nFault pin is not inside the Drv8825 chip (TI) but between the IC output and the pin, in the carrier.
      But, anyway, I keep thinking that join the pin 19 (decay) with the pin 18 (nFault) should work, because the last one will be driven logic high all the time, except when driven low by Overcurrent Protection (OCP) or Thermal Shutdown.

      That’s what we want to get Fast Decay mode, isn’t it? Setting the pin 19 to logic high. What do you think?


    1. Let me know if you got it going.

      These days I cheat a bit, by using drivers adapted specially for me by a local makerspace… Solder tab programmable fast decay ;-). It is worth the R5 extra (about 50c US)

      1. I was not able to find anything thin enough that would also stay in place when I hit it with my iron. I ended up doing both the same way that you did. When plugged into RAMPS I get voltage on the top of the pot so I expect they are working. I do not have a motor connected to the board yet.

  6. If you use 4988 on the Z axis, I recommend doing nophead’s mod on it. It involves removing a resistor, and replacing it with a piece of wire, or a 0 ohm resistor of you can get hold of one.

  7. Hi Quentin,

    I plan to write an article for the wiki, explaining this problem to new users. May I use your image of the DRV8825 driver for that? Of course I will state the source and give credit to you.

    Yours sincerely,

    1. You are welcome to use the image. Hopefully we can convince the hardware manufacturers to add a solder jumper to program the decay mode.


      1. Thank you.
        This is not your mentioned jumper, but the G3D stepperdrivers have a potentiometer to set up the decay pin. Unfortunately they are not very popular and thus hard to get.

        1. I have a local manufacturer that made me some Drv8825 drivers with a soldertab jumper on the back. Works great.

  8. I Dont think this solves the problem. It definitely helps, but the bands are still present. The angle changed and they are super subtle, but they are there.

    1. Of course there are more ways to improve the performace, but that would involve installing the chip on a larger board with proper power planes and better thermal properties. We moved to a board called Speedy, which is a Smoothie derivative but sporting the DRV drivers.

      The tiny board is great as an evaluation board for prototyping and DIY projects, but should not be used in commercial projects. Be creative, use convenient tools cor design, but don’t be lazy when you know what you need.

  9. I read that this is necessary if you’re running on 24V. What about if you run it on 12V? Or is it advisable to hack the fast decay on whatever voltage you’re running to get smoother operation?

    1. I found it also works on 12V (which is the voltage of my power supplies)

      The problem occurs when your motors run on a significantly lower voltage than supply voltage. Typical Nema17 steppers run on 3V, which is fine if you want responsive 3D printers, but will tax your drivers.

      1. Yes, 3V is pretty high. I have my drivers tuned to about 0.9V (I’ve read that more will cause the Nemas to overheat).

        So to activate fast decay mode on the DRV8825 you only jump pin 19 of the chip to M2 while running 32th step? Thats it?

        1. The 3V I am referring to is not the current control voltage on the driver, but rather the actual drive voltage at the rated current. If the voltage is significantly lower, the driver needs very low PWM to ensure the current is not exceeded. This is why fast decay helps. Fast decay will allow the extremely short PWM pulses to decay in time and not be smoothed away.

          To activate connect pin 19 to VCC (and I got mine at M2)

          1. Oh okay, I didn’t know that there was a difference between the control and the drive voltage. Thank you very much for your help! I don’t know a whole lot about all of this, so I’m learning as I go… I need to Google so much more.

Leave a Reply to Patryk Bonzanini Cancel reply

Your email address will not be published. Required fields are marked *

Warning: Attempt to read property "token" on null in /usr/www/users/morgagzmba/wp-content/plugins/funcaptcha/funcaptcha.php on line 106 Warning: Attempt to read property "challenge_url" on null in /usr/www/users/morgagzmba/wp-content/plugins/funcaptcha/funcaptcha.php on line 107

The CAPTCHA cannot be displayed. This may be a configuration or server problem. You may not be able to continue. Please visit our status page for more information or to contact us.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: