Page 1 of 1

Running 28BYJ-48 stepper motor in full step mode

Posted: Sat Jan 12, 2019 1:04 am
by zizumara
I have a 28BYJ-48 stepper motor with a ULN2003 driver that I have successfully operated in half-step mode, which is pretty much what everyone seems to be using. I want to sacrifice resolution for speed and operate in full step mode, but I haven't been able to get it to work. In half-step mode with long delays between phases, I can confirm the signal sequence via the UNL2003 driver LEDs is

1000
1100
0100
0110
0010
0011
0001
1001

In full-step mode, I can confirm with the LEDs on the ULN2003 driver that the inputs are applied in the following sequence.

1000
0100
0010
0001

However, the stepper doesn't move, though I can feel it pulsing. I'm using a 5 VDC power adapter to power the UNL2003 driver rather than the Raspberry Pi power. Has anyone gotten full-step mode to work with this stepper and driver?

Re: Running 28BYJ-48 stepper motor in full step mode

Posted: Sat Jan 12, 2019 8:15 pm
by pcmanbob
Hi.

In your second list of signal sequences you only appear to be driving one winding each step which wont drive the motor round.

try this sequence

(1, 0, 1, 0)

(0, 1, 1, 0)

(0, 1, 0, 1)

(1, 0, 0, 1)

taken from this example https://learn.adafruit.com/adafruits-ra ... s/software

Re: Running 28BYJ-48 stepper motor in full step mode

Posted: Sat Jan 12, 2019 10:02 pm
by mattmiller
In half-step mode with long delays between phases
its quite a while since I played with these steppers but IIRC, there are sweet spots in terrms of the delay between the steps - longer delays does not necessarily lead to happiness

I might be completely wrong but 1-2.5ms comes to mind between steps

The most speed I ever got out of them was around 13rpm BTW

Re: Running 28BYJ-48 stepper motor in full step mode

Posted: Sun Jan 13, 2019 6:35 am
by zizumara
Actually, the pattern sequence 1010, 0110, 0101, 1001 did not work. What I discovered is that the pattern 1000, 0100, 0010, 0001 does work. The problem is speed. At 1 millisecond between phases, I appear to be at the limit of the stepper motor speed when using half step mode. When I use full step mode with the pattern 1000, 0100, 0010, 0001, I have to increase this to 2 milliseconds between phases and it works. Maybe the pinouts for the drivers are different between my driver and the driver in the example you referenced. I'm using a Vellman VMA401 driver board and my MS GPIO is connected to driver IN1 while my LS GPIO is connected to driver IN4.

At any rate, switching to full step mode doesn't seem to improve the maximum speed of the stepper, so I guess I'll stick to half-step operation anyway.

Re: Running 28BYJ-48 stepper motor in full step mode

Posted: Sun Jan 13, 2019 8:48 am
by pootle
I experimented with getting the maximum speed from steppers, for the 2 I tried, both achieved maximum speed in 1/2 step mode. Also to run fast you need very accurate timing - way beyond what bit banging from code can achieve - even in C or assembler (unless you go bare bones mode). You can do this by using pigpio waves, the only other option is a dedicated controller that runs the low level stuff autonomously such as a trinamic chip.

Oh yes and you need to ramp up the speed as well.

Re: Running 28BYJ-48 stepper motor in full step mode

Posted: Sun Jan 13, 2019 9:55 am
by mattmiller
JFI this article seems a good source of info on pros/cons on the stepping modes

http://www.jangeox.be/2013/10/stepper-m ... 48_25.html

The value for money of these steppers means you can make very cheap robots that can move much more accurately, albeit slower, than PWM motor ones.

I've used them to successfully navigate a maze - just a Pi - 2 steppers and 1 ultrasonic sensor - programmed in Python

But they are cheap and you get what you pay for

Re: Running 28BYJ-48 stepper motor in full step mode

Posted: Sun Jan 13, 2019 11:11 am
by pcmanbob
You will never achieve high speed with this stepper motor due to the fact that most of them have a 1/64 gearbox on them, so you have to do 64 revolutions of the motor to get 1 revolution of the out put shaft.

If you want speed you need to use a stepper motor that does not have a gearbox on the output.