Pages: [1]   Go Down
Author Topic: Reverse 28BYJ-48? How?  (Read 3241 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Belgium
Offline Offline
Sr. Member
****
Karma: 1
Posts: 283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
http://www.bajdi.com/joystick-and-2-28ybj-48-stepper-motors/
Logged


Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
« Last Edit: January 09, 2012, 02:53:07 pm by sbright33 » Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

@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?
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Belgium
Offline Offline
Sr. Member
****
Karma: 1
Posts: 283
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

@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  smiley
Logged


Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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. smiley

 
Logged

Topsham, Vermont USA
Offline Offline
Edison Member
*
Karma: 33
Posts: 1926
... in The Woods In Vermont
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Regards, Terry King terry@yourduino.com  - Check great prices, devices and Arduino-related boards at http://YourDuino.com
HOW-TO: http://ArduinoInfo.Info

0
Offline Offline
Shannon Member
****
Karma: 215
Posts: 12516
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

[ I won't respond to messages, use the forum please ]

Pages: [1]   Go Up
Jump to: