Complete stepper motor noob, despite searching all Adafruit tutorials and many helpful posts from you guys I can't get this small detail worked out: is AFmotor using a 4 step sequence?
This very helpful webpage explains things about my 28BYJ-48 5v :
From information here I deduce that my motor has 5.625 angle in 8-step sequence, 11.25 angle in 4-step sequence. The article explains that the Arduino "Stepper" library will use 4-step sequence.
But what about AFmotor? This is my main question, so I can decide, after gear reduction, whether to tell my sketch to go with 2048 steps per rev or 4096. I notice through experimentation that either settings do work, but am I using it efficiently or safely? I don't want to burn anything out.
My second question, if anyone has the answer off top of their heads, is: can I safely go to the highest operable speed settings (I notice above a certain rpm setting the motor just stops working) without risking damaging anything?
I'm using these motors for a simple motorised car (two DC motors aren't going in a straight line and I'm not ready to start messing with speed encoding, so I thought I'd try steppers for the learning experience). I'm operating the Arduino Uno with a 9v battery, and have a separate 4xAA to drive the motors (I know, that's 6v into a 5v motor).
I have read that these steppers are better off with different driver boards, like that UNL one, but right now Adafruit V1 motor shield board clone is all I have.
jremington:
The number of steps per revolution for the 28BYJ stepper is not an integer, because of a strange gear ratio. Google will provide the exact number.
However you can only make an integer number of steps so you may need to make a correction every few revolutions (like for a leap-year) to stay in sync.
Thank you. I'm a little gutted at how slow the motors run. I expected slow, but these things crawl along, even at the best settings I can find. I'm using AA rechargable batteries, wonder if that makes a difference. Probably not a lot I can do, beyond buying more expensive higher powered motors and doing a complete redesign, or going back to DC motors and doing speed encoding. The DC motors I have weren't much quicker than these steppers though, lol.
It doesn't really matter, it's all in the name of learning experiences
For higher speed you need a bipolar stepper motor that can be driven at high voltage using a specialized stepper driver such as the Pololu DRV8825. Note that this does not mean a motor that has a high voltage rating - the motors that are rated for 2v or so can be driven with 24v or 36v.
A stepper won't be able to start out at its fastest speed. You need to accelerate the stepper. You might want to try the higher speeds again but with an acceleration algorithm.
If the motor runs faster with acceleration (as it should), you might hit a limit from the Adafruit shield. IIRC first version of the Adafruit motor shield uses a '595 shift register to driver the direction pins on the L293D chips. Shifting out all the stepper patterns might be keeping the motor from reaching its fastest possible speed.
If the motor can spin at the top speed provided by the shield, it may be possible to increase the speed even more by using a different driver (like the one suggested by Robin2).
Side note:
If you're brave, you can convert your motor to a bipolar stepper. I'm not sure if this will give much additional speed but it might give you a bit more torque.
I've done this myself and it worked but I didn't test to what sort of performance difference it produced.
If you can't find the instructions to do the conversion, let us know. I bet I can find the YouTube video showing how to make the conversion.