I've got a stepper motor which says the "angular move distance" is 60 degrees, the "step angle" is 1.8 degrees, and the "suggested motor speed" is 40 rpm. It also says I should "set the default microstepping value to 16" (I am using this board and have flipped switches 1, 2, and 3 to do this).
I am attempting to use the AccelStepper library, but what I'm not sure about is how to compute the values to pass to both the "setMaxSpeed" and "setMinPulseWidth" functions when I set up the stepper?
Thanks
Also, while I'm at it, would you mind verifying my circuit is correct? The documentation with my motor states that it is "wired as bipolar series, 4 lead-wire connection"
KL-4030 | where it goes
-----------------------------
VCC+ | +24V bench psu
GND | - bench psu
A+ | motor coil A start (red)
A- | motor coil A end (blue)
B+ | motor coil B start (green)
B- | motor coil B end (black)
EN- | not connected
EN+ | not connected
DIR- | arduino pin 6 (the pin I pass to AccelStepper for "direction")
DIR+ | +5v
PUL- | arduino pin 5 (the pin I pass to AccelStepper for "step")
PUL+ | +5v
Edit: Ok, I've been doing some thinking, is this right....?
360° in a circle / 1.8° per step = 200 steps per revolution
@40rpm (suggested motor speed) = 8000 steps per minute (spm)
8000 spm / 60 seconds in 1 minute = 133 1/3 steps per second (sps)
133 1/3 sps * 16 microsteps in 1 step = 2133 1/3 microsteps per second
So, I should call setMaxSpeed(2133.333) ? That seems... way too high?
Still not sure what to pass setMinPulseWidth, though.
(PS if anyone remembers the long thread I had about stepper motor problems a few months ago, the problem ended up being a bad motor. I've solved those problems and have moved on. I was going to update that thread, but I didn't want to bump it all the way to the top when I had just posted this one, but maybe I'll do that later on, just for closure.)