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 stepping indexer settings halving the total travel distance

Expert 1350 points
Other Parts Discussed in Thread: DRV8825

I have a custom stepper controller board based on grbl and the DRV8825. I use NEMA 17 motors with 1.7A maximum current per phase and the machine operates at 12V (essentially the voltage at VMA/B of DRV8825 is 12V). Attached here is an image of how the microswitches are connected on my board. I used this site to calculate the steps/mm value that I need to specify in grbl. If I set M2 at 5V and leave M1 and M0 open, I should see 1/16 steps/mm resolution and based on my pulley tooth count (20) and belt pitch (2mm) the calculated value for grbl is 80. However, this does not seem to be working. With a value of 80 I seem to be halving the total travel distance in any axis. What am I missing? Is the way the microswitches are connected wrong?

  • Sorry missed the attachment.

  • Hi HPB,

    There are additional factors that could be causing this. Some of them are starting speed, acceleration/deceleration, chopping current, and decay mode.

    What is your starting speed and acceleration/deceleration when you move?
    What is VREF and the shunt resistor?
    What decay mode are you using?

    Can you provide a scope capture of the current through four full steps? This will help determine if you are running at 1/16 step.
  • The machine is starting from a stand still. Decay mode is mixed mode. Shunt resistors are 0.1R and Vref is 0.75 setting the current limit to 1.5A. I don't have a scope so wouldn't be able to provide any screen captures. Let me check the micro-switches and their placement again. I have a feeling its connected the wrong way.
  • I figured out the problem. I had connected the micro-switches that set the stepping resolution in the reverse way which was setting the resolution to half of what I had intended. Put the switches back in the right way and everything works great now. Thank you for helping me troubleshoot this.