Hello, I am trying to run 2-28BYJ-48 steppers using the Accelstepper library by Mike McCauley on an Uno R3. If I run the base multistepper example, stepper one does not reverse and stepper two will turn and stop. I found Celem's modification "accellstepper 28BYJ-48" for a single stepper, which I tried to adapt and I can get stepper 2 to reverse, but stepper 1 continues in the same clockwise direction. Any advice would be helpful.Thanks

// accellsteppertest.ino// Runs two steppers forwards and backwards, accelerating and decelerating// at the limits. Derived from example code by Mike McCauley// modified by Celem for single stepper// Set for two 28BYJ-48 stepper motors

Yes, I am out here, and I am a newbie reading every little bit of information like a new born puppie having its first drink of milk from its mommies nipple. That is about the best way I have of describing my experience with Arduino.I have the Arduino Uno, the 2003 driver board and the 28BYJ-48-5 motor. I have played with the Uno board and have suceeded in getting the "Blink" command to work. I have tried a previous set up to get the motor to do its thing but so far a "Fail"..I have just received a second new motor and 2003 board, and I am about to go to my basement work area and start a new fresh approach to the problem.My aim to have the Uno control a stepper motor to drive a dividing head for my Unimat lathe. I would like to direct you to a "YouTube" video by Chuck Fellows : http://www.youtube.com/watch?v=XwX0YjClgQE.......This is what I am aiming to do.I will be back. I just wanted you to know I was taking in all the good information.Harvey,in Kelowna, BC.

I have copied and pasted the code from your messgae. Thanks very much. Now, I am new, new, new,to Arduino and the "codes" ..I am using the 28BYJ-48-5VDC Gear Stepper Motor with ULN2003 Driver Board. So just to let you know why I put in three new's my first project was to download the "BLINK" code, and completed that succesfully. Now I have set up the Arduino Uno, with this little motor and driver, downloaded the code from your posting, and woopy it also works. So now Grampa has two attempts that have worked.

I sort of understand the concept of the clockwise and the C/clockwise, but I have no clue as to where to go into the code to edit it. My motor is turning at just under 1 rpm. Where do I go to adjust the speed, and direction. Thanks for your help.Harveyin Kelowna BC.

If you are using the code in my December 31, 2011 post the variable "motorSpeed" controls the speed since it is used for the "delay" value between steps.If your goal is to increase speed, remember that this stepper is geared down with a 1:64 ratio - so it will never spin very fast. That said, it can be improved with a different library - see my post of January 17, 2012, 10:14:20 AM - try the AccelStepper library mentioned there. The VIDEO at that post shows the AccelStepper in use - your stepper should turn at least this fast.

The AccelStepper Library has speed() and runSpeedToPosition() functions that may give you what you want. While the AccelStepper Library supports a maximum stepping speed to about 4kHz, the 28YJ-48 supports a maximum no-load step rate of 900pps (less that 1kHz).

The 28BYJ-48 has a step angle of 5.625°/64. Therefore, one full rotation requires 4,096 steps. At 900pps (with simultaneous port writes as mentioned in the post of Reply #19 on: January 14, 2012, 10:17:55 AM) the maximum rotation speed computes to 13rpm (unless my math was wrong) - (900/((360/5.625)*64))*60. However, look back in this thread and you'll see that sbright33 says that he can achieve 35rpm. I don't see how this is possible but that is what he says. Please note, however, that he is running the stepper with 12VDC and he has to de-power it when idle to avoid overheating, so he is driving the stepper very hard.

As to speed, remember that this stepper was designed to move the vents on air conditioners, that are popular in Asia, with a goal of high torque not high speed.