Reverse 28BYJ-48? How?

How do I Reverse my 28BYJ-48 stepper motor?
Tried mystepper.step(-1) just goes forward.
Can I use stepper library?

How many degrees is 1 step?
5.625/64 or 360/64/64
I understand one 64, because of gear reduction.
Why is there 2 64's in the divisor?
The motor only turns 5.6 degrees per step?
Thanks in advance for your help!

I have 2 of these little stepper motors. No problem to let them turn in both directions. What I haven't figured out is how many steps these little steppers really are. From testing I found out that I need to let them step more then 2000 steps for one rotation. I posted a sketch on my blog to control both steppers with a small joystick.

64*64=4096 to be exact.
I tried step(-1) like in your code and step(-64) they just move in the same forward direction as step(+1).
Am I losing my mind? Am I mistaken?
Just tried it again with your encouragement. Same results.
I'd post my code, but it's mostly only one line above.

Anyone? I don't want to Hijack another thread so I will ask again here. Can I use the Stepper library?

@bajdi- According to this thread:

http://arduino.cc/forum/index.php/topic,85335.0.html

Your code should not work with the Stepper library to reverse the direction of a 28BYJ-48?
Are you sure it does go both ways CW and CCW?
How did you do it?

The answer is here:
http://arduino.cc/forum/index.php/topic,85335.0.html

sbright33:
@bajdi- According to this thread:

http://arduino.cc/forum/index.php/topic,85335.0.html

Your code should not work with the Stepper library to reverse the direction of a 28BYJ-48?
Are you sure it does go both ways CW and CCW?
How did you do it?

I started from the code I found here http://arduino-info.wikispaces.com/SmallSteppers take a good look at how the pins are specified. I had no problem letting them turn both ways. I'll make a video if you don't believe me :slight_smile:

Ah you have found the proper sequence!
Will let you know if the performance is difference for 8 phases.

Try to switch the connections IN2 and IN3. This did the trick for me. Also this increased torgue a lot (since the stepper is running as it should), and feels like its running cooler.

Here's my setup:
pin8->controller IN1
pin9->controller IN3
pin10->controller IN2
pin11->controller IN4

ps. I'm not an expert, so the connections might be totally wrong. But it works just fine for prototyping. :slight_smile:

Details of the connections for those motors, example code etc is on the ArduinoInfo.Info WIKI HERE:

sbright33:
64*64=4096 to be exact.

Wrong (in two ways), since the docs say that the gear ratio is 64:1 and
there are 64 half-steps per motor revolution. So 32*64 ought to be the
anwser...

There seem to be at least two different versions of this motor, and the gear
ratios in at least one are not exactly 64:1, but close (this is usually the case
for large gear ratios, the design and implementation are often slightly
different due to the practicalities of gear-train design.

Big thanks to bobotus! Reversing the connections on the 2 and 3 pins on the ULN2003 board did the trick for me. You can see a video of it working at: 28BYJ-48 motor with ULN2003 driver with Arduino - YouTube

Note: I realized after I can power the ULN2003 board (and thus the 28BYJ-48) off the Vin and ground of the Arduino. The motor is not a ton of current but all that I read said I should not power it off the +5v of the board as it may blow it up. It makes sense to me that the Vin is 'outside' of the regulated voltage on the board and can handle more current and voltage, but I figured Vin would be just that.... in.

QUESTION: Any idea why reversing the connections on the 2 and 3 pins works? Just trying to understand.

The phases have to be sequenced +A/+B/-A/-B (or equivalent), wrong wiring
would give +A/-A/+B/-B which isn't quadrature. There are 24 ways to wire 4 wires,
8 or them will work and 12 won't. Of the 8 that work 4 go CW and 4 CCW, and for
a particular direction the wirings are cyclic-permutations of each other.