# Stepper doesnt work and connection help

**URL:** <https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449>\
**Category:** Motors, Mechanics, Power and CNC\
**Created:** [May 16, 2026, 12:02pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449 "2026-05-16T12:02:09Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![herobrineh2055](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/herobrineh2055/32/1130218_2.png) [@herobrineh2055](https://forum.arduino.cc/u/herobrineh2055)\
**Post date:** [May 16, 2026, 12:02pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/1 "2026-05-16T12:02:09Z")

</div>

Hey there,

Is it okay if I keep my batteries connected while uploading the code to Arduino?

I'm trying to use a stepper motor and it doesnt work correctely I asked claude and it said to connect the ULN driver's +ve terminal to the VIN pin or arduino and -ve terminal to GND pin and it said that the battery will work for the driver and the usb will work for the arduino

Here is and ss of the conversation

 ![Screenshot 2026-05-16 173126](https://europe1.discourse-cdn.com/arduino/original/4X/8/9/6/896befe81bdcca9c6defd20982c523f354742bbd.png)

 ![Screenshot 2026-05-16 173024](https://europe1.discourse-cdn.com/arduino/original/4X/6/0/a/60a3b4fdb7d496a26b3ccc5f82156484b52db15e.png)

---

<div class="post-metadata">

**Author:** ![anon95813201](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@anon95813201](https://forum.arduino.cc/u/anon95813201)\
**Post date:** [May 16, 2026, 12:09pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/2 "2026-05-16T12:09:46Z")

</div>

Which arduino are you using?  
Are you using one of these boards?

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/f/4/a/f4a92941104a83e1423143d1caab391aaeb6e7df.jpeg)

Please post you code. In the IDE click on Edit then Copy for Forum then come back here and just do a paste.

---

<div class="post-metadata">

**Author:** ![herobrineh2055](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/herobrineh2055/32/1130218_2.png) [@herobrineh2055](https://forum.arduino.cc/u/herobrineh2055)\
**Post date:** [May 16, 2026, 12:11pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/3 "2026-05-16T12:11:06Z")

</div>

```arduino
#include <Arduino.h>
#include <Stepper.h>

#define STEPS_PER_REV 2048
#define STEPS_PER_COMPARTMENT 512

Stepper stepper(STEPS_PER_REV, 8, 10, 9, 11);

void setup() {
  Serial.begin(9600);
  stepper.setSpeed(5);
  Serial.println("Ready...");
}

void loop() {
  Serial.println("Moving...");
  stepper.step(512);
  delay(3000);
  Serial.println("Moving back...");
  stepper.step(-512);
  delay(3000);
}

```

im using vs code with platform io and yeah thats the board im using btw the servo vibrates does it need more power or somthing?

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [May 16, 2026, 12:25pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/4 "2026-05-16T12:25:12Z")

</div>

Hi, @herobrineh2055

Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?  
Hand drawn and photographed is perfectly acceptable.  
Please include ALL hardware, power supplies, component names and pin labels.

What is your power supply?

Do you have a DMM? Digital MultiMeter?  
Have you identified the two coils of the stepper correctly?

Can you please post a link to specs/data of your stepper?

Thanks.. Tom.... 😃 👍 ☕ 🇦🇺

---

<div class="post-metadata">

**Author:** ![herobrineh2055](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/herobrineh2055/32/1130218_2.png) [@herobrineh2055](https://forum.arduino.cc/u/herobrineh2055)\
**Post date:** [May 16, 2026, 12:28pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/5 "2026-05-16T12:28:40Z")

</div>

```arduino
PC USB → Arduino Nano
ULN2003 + → VIN
ULN2003 - → GND
Stepper white connector → ULN2003
IN1 → D8
IN2 → D9
IN3 → D10
IN4 → D11

```

```arduino
Battery + (red) → VIN
Battery - (black) → GND
ULN2003 + → VIN
ULN2003 - → GND

```

The stepper motor is the 28BYJ-48

Power supply is currently 5v but im currently testing 7.4v

---

<div class="post-metadata">

**Author:** ![herobrineh2055](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/herobrineh2055/32/1130218_2.png) [@herobrineh2055](https://forum.arduino.cc/u/herobrineh2055)\
**Post date:** [May 16, 2026, 12:30pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/6 "2026-05-16T12:30:54Z")

</div>

Hey thanks for all your attention guys but now the stepper motor works with 7.4v when i connect it with my 18650 li-ion batteries im using my usb and the battery together

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [May 16, 2026, 12:34pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/7 "2026-05-16T12:34:12Z")

</div>

Hi,  
Where have you got the jumper on the driver PCB?

Can you post some images of your project?  
So we can see your component layout.

Tom.... 😃 👍 ☕ 🇦🇺

---

<div class="post-metadata">

**Author:** ![herobrineh2055](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/herobrineh2055/32/1130218_2.png) [@herobrineh2055](https://forum.arduino.cc/u/herobrineh2055)\
**Post date:** [May 16, 2026, 12:42pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/8 "2026-05-16T12:42:28Z")

</div>

![WhatsApp Image 2026-05-16 at 6.10.21 PM](https://europe1.discourse-cdn.com/arduino/original/4X/e/9/3/e9385fe36a2fabaefb9919f15efd78ccd72abe10.jpeg)

it works with this setup

Battery ---------- Arudino

+ve --------------\> VIN

-ve ---------------\> GND

ULN2003 ------------ Arduino Nano

IN1 ----------\> D8

IN2 ----------\> D9  
IN3 ----------\> D10  
IN4 ----------\> D11

---

<div class="post-metadata">

**Author:** ![anon95813201](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@anon95813201](https://forum.arduino.cc/u/anon95813201)\
**Post date:** [May 16, 2026, 12:45pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/9 "2026-05-16T12:45:23Z")

</div>

Which Arduino are you using?  
I'm sure you have it connected wrong.

---

<div class="post-metadata">

**Author:** ![anon95813201](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@anon95813201](https://forum.arduino.cc/u/anon95813201)\
**Post date:** [May 16, 2026, 12:50pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/10 "2026-05-16T12:50:27Z")

</div>

This explains the correct way to use the driver board

> **[In-Depth: Control 28BYJ-48 Stepper Motor with ULN2003 Driver & Arduino](https://lastminuteengineers.com/28byj48-stepper-motor-arduino-tutorial/)**
>
> Learn to control 28BYJ-48 stepper motor and uln2003 driver with Arduino, working, gear ratio, pinout, wiring, arduino code and to control two steppers simultaneously

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/8/b/0/8b0a5f20a4c2295267a749d7cb9abcd8efffe516.png)

**Which Arduino are you using**?

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [May 16, 2026, 12:50pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/11 "2026-05-16T12:50:40Z")

</div>

Hi, @herobrineh2055

> [@herobrineh2055](#):
>
> 28BYJ-48

Have a look at this site and try his layout and code.

> **[In-Depth: Control 28BYJ-48 Stepper Motor with ULN2003 Driver & Arduino](https://lastminuteengineers.com/28byj48-stepper-motor-arduino-tutorial/)**
>
> Learn to control 28BYJ-48 stepper motor and uln2003 driver with Arduino, working, gear ratio, pinout, wiring, arduino code and to control two steppers simultaneously

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/d/2/2/d2282b647d911f300bdb5bcebb7b4c7dd3890807.jpeg)  
Tom.... 😃 👍 ☕ 🇦🇺  
@anon95813201 Like minds think alike... 👍

---

<div class="post-metadata">

**Author:** ![anon95813201](https://avatars.discourse-cdn.com/v4/letter/a/87869e/32.png) [@anon95813201](https://forum.arduino.cc/u/anon95813201)\
**Post date:** [May 16, 2026, 12:56pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/12 "2026-05-16T12:56:00Z")

</div>

> [@TomGeorge](#):
>
> Like minds think alike...

The saying is " **great** minds think alike"

---

<div class="post-metadata">

**Author:** ![herobrineh2055](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/herobrineh2055/32/1130218_2.png) [@herobrineh2055](https://forum.arduino.cc/u/herobrineh2055)\
**Post date:** [May 16, 2026, 1:05pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/13 "2026-05-16T13:05:20Z")

</div>

Btw thanks but now it works and according to my brain if something works do not put your finger in it :)

---

<div class="post-metadata">

**Author:** ![TomGeorge](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/tomgeorge/32/215261_2.png) [@TomGeorge](https://forum.arduino.cc/u/TomGeorge)\
**Post date:** [May 16, 2026, 1:09pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/14 "2026-05-16T13:09:52Z")

</div>

> [@anon95813201](#):
>
> The saying is " **great** minds think alike"

"But fools never differ"

> [@herobrineh2055](#):
>
> Btw thanks but now it works and according to my brain if something works do not put your finger in it :)

What was the solution?  
Tom.... 😃 👍 ☕ 🇦🇺  
PS. Haven't had a coffee for 6 hours, caffeine low.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [November 12, 2026, 1:09pm UTC](https://forum.arduino.cc/t/stepper-doesnt-work-and-connection-help/1444449/15 "2026-11-12T13:09:55Z")

</div>

Closed on November 12, 2026, 1:09pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
