28BYJ-48 and ULN2003 (I think)

Having a go at getting the 28BYJ-48 stepper motor going. I have what I think is a ULN2003 driver but there are quite a few different ones with this same number.
The sketch uploaded OK and the Arduino and the driver light up but the motor doesn’t turn. I plugged in a different motor and it doesn’t turn either although the driver board runs a sequence of LEDs. There are three pics here on youtube as an MP4 which you can pause to peruse. Hope I have supplied enough information. Thank you.

Stepper motor info - YouTube

4 Likes

Hi Geoffrey,

From experience these motors have a pretty large gear ratio and for the longest time I was troubleshooting an issue that wasnt even there!
Putting some extra long tape on the shaft of the motor will give a good idea of if its turning.

The onboard voltage regulator on the Arduino should be enough for the supply should be enough for the motor and driver.

If you slow the steps right down are the LED’s moving in a ‘conga line’.
Also the pin declaration being 8,10, 9 ,11 might be messing with some stuff, from experience the driver should have a point - point mapping of the pins.

3 Likes

Thanks mate. First I’m new at this and I don’t know what “the driver should have a point - point mapping of the pins” means. As for the leds of which there are four, the top two are red and on whilst the others have a double blink, blink thing going on. I think that means it is processing the sketch but the motor doesn’t move. I tried by changing the set speed from 100 to 500 but it made no difference.

3 Likes

Hey Geoffrey,

Sorry, by point to point I meant when initialising the stepper in the code you would want the pins to be 8, 9, 10, 11; the same as you have it wired in to the driver board
Turning the speed all the way down to 1 should show the progression on the LEDs (just on the driver board) which is a perfect way to debug the operation of the motor itself.
the LEDs on the Arduino itself should be all good, one is power, one is connected to D13, and there are another two tied to the serial connection.

Core has a good tutorial here explaining the how’s of a stepper: https://core-electronics.com.au/tutorials/controlling-steppers-with-arduino.html
For the specific parts you have I would check out this page for a how-to: https://www.makerguides.com/28byj-48-stepper-motor-arduino-tutorial/

PS: Here’s a great Scott video on the topic as well: Electronic Basics #24: Stepper Motors and how to use them - YouTube

2 Likes

Hi Geoffrey
A ULN2003 is a Darlington transistor array. Point to point mapping means that the physical arrangement of the pins is pin 1 = input 1 pin 16 = output 1, pin 2 = input 2 pin 15 = output 2 and so on. That is each input pin has its corresponding output physically opposite in the package. There are 7 darlington transistors in the package complete with diodes for driving relays or other inductive loads. Pin 9 is the common and connects flywheel diodes to load V +ve Pin 8 is Gnd. The Darlington transistors sink current and would normally connect to the -ve side of the load (which in your case is the stepper coils) and connect it to ground when switched.
The common (5th wire) of your stepper is connected to motor supply on the breakout board. Each stepper coil is taken to ground (energised) when the corresponding Darlington is switched by Arduino or whatever. I assume your motor supply is connected because you say the LEDs light up. The diagram in a data sheet will help explain this.
Cheers Bob

3 Likes

You blokes are awesome. I was encouraged by your replies and did some more looking. I found another sketch and with a bit of fiddling got it to work. Thank you so much. I feel ready to go further now.

3 Likes

Excellent Geofrey!!

If you need a hand with future projects feel free to make another topic

Best of luck with future projects and happy making!
Liam.

2 Likes