I purchased a 28BYJ-48 5V Stepper Motor from SeeedStudio
and connected it to the Arduino through the Adafruit Motor Shield v2.
I got it to work by attaching it to the motor shied as described in the tutorial. I had to swap the leads around to get it to work correctly, in some combinations it would not reverse, sometimes erratic etc. I think I found the only combination that follows commands correctly and runs smoothly.
Now it follows commands fairly well, but seems to step twice as far as it should, and the speed of the motor is a random output of the speed setting.
Here’s my calculation:
64 steps/motor rev = 5.625deg. / step - given in the datasheet
64:1 gear reduction - also given in the data sheet
Total number of steps for one revolution of the output shaft = 64*64 = 4096.
If I tell Arduino to step 4096 steps using the Adafruit motor library, the motor turns 2 revolutions. Here is my code:
This is the same for single and double stepping options. It seems to run ok, it has some vibration but it is fairly smooth rotation but this is my first experience with a stepper motor.
The stranger thing is the output shaft speed, I took measurements from 1-10 rpm incrementing by 1 rpm, took a few in between, and a few higher speed points. The output speed varied between 1.7 and 5.5 rpm, and not correlated to the motor speed setting at all!
See the attached data and graph.
Could you help me please?
Stepper Motor Datasheet seedstudio.pdf (163 KB)