28byj48 stepper motor driver with ULN2003

(New user) Pi pico with stepper motor

Ask Question

Asked today

Modified today

Viewed 22 times


New to the community, i am a total noob, i have a pi pico project using 28byj stepper motor 5v, looking to control revolutions per day from 600-1200, in both directions, using a rotary encoder. also want to have some lights to make it looks cool. Ive spent the last few days trying to get this work with the help of some youtube videos but can only get basic things working code wise, the farthest i have got it to get my stepper motor to buzz and tick, im using gp pin 0-3 for the stepper motor, to a driver board (in1,in2,in3,in4) along with vcc for power and the gnd to the pi pico. I tried taking power from 3v on the pico but the x4 driver led were very faint, so ive used Vbus since and they are much brighter, can anyone point me into the right direction of what im missing?


EditFollowClose 3Flag

asked 17 hours ago

Lewispipico's user avatar



 New contributor

  • what im missing? … you did not say what you have, so how can we determine that you are missing? … please add information about all of the components, how they are connected and the program you are using – jsotola 13 hours ago
  • Im on micropython, i got stepper motor with 5 pin jst that connects to driver board, then in1-in4 goes to pico GPIO pins 0,1,2,3, then i have a VCC on the driver board going to vbus on the pico? Then gnd going from pico to driver, Should i be using a 5v dc power supply instead of VCC? Is it not getting enough power? Problem is i dont know if my issue lies in wiring or code, my code is just some basic stuff i found on youtube – Lewispipico 13 hours ago
  • the problem is on line 8 of your code – jsotola 4 hours ago
  • For newbies, I would recommend the following ULN2003 driver board: 28YBJ-48 DC 5V 4 Phase 5 Wire Stepper Motor With ULN2003 Driver Board – $4 elecbee.com/… – tlfong01 17 mins ago   
  • The following tutorial by the LastMinuteEngineers is good, but you need to do a simple code conversion from Arduino to Pico: Control 28BYJ-48 Stepper Motor with ULN2003 Driver & Arduino – LastMinuteEngineers lastminuteengineers.com/28byj48-stepper-motor-arduino-tutorial – tlfong01 10 mins ago   
  • The LastMinute Engineers recommends to use an external power supply: 1. Because the motor consumes a significant amount of power, it is preferable to power it directly from an external 5V power supply rather than from the Arduino. 2. The stepper motor can be powered directly from the Arduino, but this is not recommended because the motor can generate electrical noise on its power supply lines, which may damage the Arduino. – tlfong01 3 mins ago  Edit  
  • You don’t need any library. It is simple to use a loop to do the 5 GPIO output sequence and I guess you have already done that. Show us you code and we can debug it together. – tlfong01 15 secs ago  Edit  

Add a comment

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.