Stepper motor, doesn't turn counter clockwise, wrong steps number indication

Hi
From your picture, your stepper motor looks suspiciously like the 28BYJ-48 unipolar stepper motor I bought on ebay (as a package with a ULN2003). I had a similar problem with it not turning backwards with the example code for stepper_oneRevolution.

It may be that your problem (like mine) was because the wires on the motor were not in the expected order. I had to order my stepper pins as 8, 10, 9, 11 rather than 8,9,10,11 when creating the stepper instance. This enabled the motor to go backwards and forwards as expected. You could try other permutations to see which work for your stepper. (connect 8,9,10,11 to in1, in2, in3, in4 on the ULN)

For the speed/revolutions per minute issue I found combinations with speed * revolutions = about 2^13 (i.e.8192) would work as this is used to calculate the delay needed for the stepper to move. The most accurate one for my stepper was speed = 4 (used for setSpeed) and stepsPerRevolution = 2048 as my stepper moved at about 4 revs per minute.
:slight_smile:

1 Like