Microstepping help

It seems to be a pretty difficult task to find clear examples on the inter web of how to do this...
I have the DRV8825 driver for the uno and a nema17 2A motor.
My end goal is come up with the smoothest motion possible while maintaining a constant SLOW speed.
I understand how microstepping works but implementing it with code and schematics has proven to be a difficult challenge.
Everyone always provides tutorials and explanation on step/direction controlling but never actually microstepping!
I'd like to learn and practice 1/16 and 1/32 stepping.
If someone could direct or provide schematics And some basic code ( just to get the thing running) that would be awesome.

I suspect you will find that a 2 amp motor overloads the DRV8825 but I would be very interested if you can confirm that it does not. I presume you have the current limit on the DRV8825 set at 2 amps. But that is not relevant to your question.

I'm not clear what problem you have. The driver has 3 pins for selecting the microstep mode and they are pulled low by internal resistors so the default is single stepping. There is a table on the Pololu DRV8825 web page that shows the settings needed for the different modes. You can either permanently connect one or more pins to 5v or you can connect them to Arduino I/O pins so that your program can change the mode.

...R

For microstepping to work, it is critical to set the current limit properly.

The DRV8825 can't handle more than about 1.5 amperes/winding without extra cooling, so set it below that.

You should probably do your experiments using a motor with higher winding resistance.

lol I didn't think it was that easy. That's exactly what I got from their page but I thought there had to be more to it! Derp
So should my code be pretty much the same? Would I have to increase time between each step?
That was the smallest motor I could get my hands on for free at the time. It's 2A/phase.
Should I be setting the current limit as.. current limit=Vref * 2?
I ended up setting it for just under 1.
It worked... it wasn't even really that warm.
I'm looking for smooth movement so if you have suggestion for a driver/motor set up, please let me know :slight_smile:

Appreciate the value you've already given me.

The stepper driver does the work for you - different microstepping settings mean you have to
provide different numbers of steps per revolution, so 1/32 microstepping and a standard stepper
means 6400 steps per revolution.

Which stepper library are you using?

I see that I forgot to include these links in Reply #1

Stepper Motor Basics
Simple Stepper Code

...R

Thanks for the epic value and links robin2 and markT!

Robin2:
I see that I forgot to include these links in Reply #1

Stepper Motor Basics
Simple Stepper Code

...R

So this is weird.. I ran your basic sample code from the link and my motor started off the first few steps fine then, it began stepping 1 forward and then 1 reverse repeatedly eventually, shutting off.
would this indicate my motor not getting enough current?

Mkeup66:
would this indicate my motor not getting enough current?

Possibly, or a combination of that and the driver overloading. At what current have you set the limit on the DRV8825? By the way you need to follow the instructions that came with your specific driver module as they don't all have the same value for the current sense resistor.

...R