laurb9 / StepperDriver

Arduino library for A4988, DRV8825, DRV8834, DRV8880 and generic two-pin (DIR/STEP) stepper motor drivers
MIT License
556 stars 228 forks source link

Increasing microstep number also increases RPM and number of degrees #33

Closed TechnoJLL closed 7 years ago

TechnoJLL commented 7 years ago

RPM value is correct at full step mode, but the number of degrees asked and the speed are multiplied by the microsteps value, hence directly going against the commented affirmation " * The motor should rotate just as fast (set RPM)"

I directly implemented the MicroStepping example through a DRV8825.

am I doing something wrong? Where can I modify this?

laurb9 commented 7 years ago

Have you observed a different motor speed after changing the microsteps ? If so, then the microstep didn't get set correctly, check the wiring to M0-M1-M2 or try a different microstep.

The RPM should not change at all. If you are referring to this line in the example, please note that move() needs a step adjustment because it counts actual pulses, so when in microstepping mode the number of steps needs to change.

The number of degrees in rotate() does not need to change at all: rotate(-180), rotate(180).

laurb9 commented 7 years ago

Closing, assumed resolved. Feel free to reopen if new information becomes available.