Go Down

Topic: Accel stepper library with support for 28byj-48 motor (Read 5 times) previous topic - next topic

FigZ

hi again ...

i delved a bit deeper myself, as you provide very little information
the version you used is 1.37 and it has a little bug. (which is fixed in the latest version, currently 1.39)

i still do not fully understand why you need a 8 step sequence to make the stepper run. the original stepper library manages to do so nicely with 4 step sequence. I am going to investigate further, and I will let you know.

just as part as my learning process, to really understand how steppers work, and how this library can be used

FigZ

ah - got it ...

nothing wrong with the original library

pins 2 and 3 need to be swapped, than both FULL4WIRE and HALF4WIRE work as expected
so - define a stepper as follows:
AccelStepper byj(AccelStepper::HALF4WIRE, 8, 10, 9, 11); // byj - pins 2 and 3 swapped !!!
(use HALF4WIRE for half stepping)

arduino pin:         ULN2003A IN pin       out pin      color code on the byj stepper
8                             in4                                D                  blue
9                             in3                               C                  pink
10                            in2                               B                  yellow
11                             in1                               A                  orange
+5v                          vcc                                                   red

sorry - don't know how to make a pretty table, hope this clarifies things

kerimil

That's what the datasheet says. IIRC sbbright mentioned it in his example code.

3xbs



To install just copy and paste the two files into AccelStepper library folder and they will replace the original files ( you need both AccelStepper.cpp and AccelStepper.h ).


https://github.com/adafruit/AccelStepper  ;)

coricdado

can you now add it to the control of the two motors with a joystick?
I need exactly the same kit but we should control joystick .. I do not know programming, so I need some help with this .. thx!

Go Up