# NEMA 17 with A4988 Runs Smoothly During Code Upload but Moves Erratically Afterward

**URL:** <https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416>\
**Category:** Motors, Mechanics, Power and CNC\
**Created:** [November 20, 2025, 4:41pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416 "2025-11-20T16:41:17Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanchitbatra](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sanchitbatra/32/1137193_2.png) [@sanchitbatra](https://forum.arduino.cc/u/sanchitbatra)\
**Post date:** [November 20, 2025, 4:41pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/1 "2025-11-20T16:41:17Z")

</div>

## Problem Description:

I'm controlling two NEMA 17 stepper motors with A4988 drivers and an Arduino Uno. I'm experiencing a peculiar issue where one motor runs perfectly smooth during code upload but becomes erratic afterward, while the second motor works correctly in both scenarios.

## The Specific Problem:

During upload: Both motors run smoothly

After upload:

Motor #1: Jerky, inconsistent movement, sometimes stalling or missing steps

Motor #2: Continues to work perfectly  
The same code produces different behaviors between the two motors

Hardware Setup:

- Arduino Uno
- Two A4988 drivers (one for each motor)
- Two NEMA 17 stepper motors (identical models)
- Power Supply: 19V, 3.42A (both motors connected in parallel)
- USB power from computer during programming

Circuit Configuration:

- 19V, 3.42A Power Supply
- A4988 #1 ── NEMA 17 #1 (problematic)
- A4988 #2 ── NEMA 17 #2 (working correctly)

What I've Tried:

- Verified power supply - 19V, 3.42A should be sufficient for both motors

- Added decoupling capacitors (470µF) near each A4988

- Verified all connections - No loose wires or poor connections

- Added proper initialization in setup()

Current Code:

```arduino
#include <Arduino.h>
#include <AccelStepper.h>
const int STEPA = 3;
const int DIRA = 4;
const int ENA = 2;
const int STEPB = 13;
const int DIRB = 8;
const int ENB = 12;
// const int EM = 8;
#define motorInterfaceType 1

AccelStepper StepperA(motorInterfaceType, STEPA, DIRA);
AccelStepper StepperB(motorInterfaceType, STEPB, DIRB);

void setup() {
  Serial.begin(115200);
  //pinMode(EM, OUTPUT);
  pinMode(ENA, OUTPUT);
  pinMode(ENB, OUTPUT);
  StepperA.setMaxSpeed(2500);
  StepperA.setAcceleration(100);
  StepperA.setSpeed(2000);

  StepperB.setMaxSpeed(2000);
  StepperB.setAcceleration(100);
  StepperB.setSpeed(2500);
  digitalWrite(ENA, HIGH);
  digitalWrite(ENB, HIGH);
}

int prev_place[] = {0, 0};
bool running = true;
void loop() {
  // ALWAYS RUN THE MOTORS
  StepperA.run();
  StepperB.run();

  // Only read commands when motors are idle
  if (StepperA.distanceToGo() == 0 && StepperB.distanceToGo() == 0) {
    digitalWrite(ENA, HIGH);
    digitalWrite(ENB, HIGH);

    if (Serial.available() > 0) {

      String cmd = Serial.readStringUntil('\n');
      cmd.trim();

      int dx = 0;
      int dy = 0;

      if (cmd == "F") { dx = 0; dy = 200; }
      else if (cmd == "B") { dx = 0; dy = -200; }
      else if (cmd == "R") { dx = 200; dy = 0; }
      else if (cmd == "L") { dx = -200;dy = 0; }
      else if (cmd == "D1") { dx = -100;dy = 100; }
      else if (cmd == "D2") { dx = 1000;dy = 1000; }
      else if (cmd == "Q") { StepperA.stop(); StepperB.stop();}

      int da = dx + dy;
      int db = dx - dy;
      // Serial.write);
      if(da>0 || da<0){
        digitalWrite(ENA, LOW);
      }
      if(db>0 || db<0){
        digitalWrite(ENB, LOW);
      }
      int dadeg = (36 * da) / (10 * PI);
      int dbdeg = (36 * db) / (10 * PI);
      Serial.print(dadeg*10000);
      StepperA.move(dadeg / 1.8);
      StepperB.move(dbdeg / 1.8);
    }
  }
}

```

Key Observations:  
Power: 19V should be within A4988 specs (8-35V), 3.42A should be enough for two motors

During upload: Both motors work perfectly (as a matter of fact, i don't why they move while code is being uploaded)

After upload: Only one motor becomes problematic

The problematic motor/driver combination is consistent (problem follows the specific A4988)

Current sharing: Both VREF pots set to same voltage

Heating: Neither A4988 gets excessively hot

What is the issue and how to solve?

I am new to this forum and any advice would be appreciated!

BONUS CLUE: If I hold the reset button on the Arduino, for as long as I hold it, it keeps rotating the motors perfectly, when i leave it they stop. Also, they were working perfectly 3 days ago. We just plugged them in today and this problem occured.

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [November 20, 2025, 4:48pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/2 "2025-11-20T16:48:11Z")

</div>

> [@sanchitbatra](#):
>
> During upload: Both motors run smoothly

Welcome to the Arduino forum. But, without showing how you actually have everything wired, there is not much we can do. Can you make a block diagram, with boxes for each piece and lines connecting each piece, just as you have it wired?

The fact that any motor is running during program compile/upload is concerning as no part of your program is controlling the motors. So something is definitely not wired correctly or you are not using stepper motors.

---

<div class="post-metadata">

**Author:** ![anon94801460](https://avatars.discourse-cdn.com/v4/letter/a/278dde/32.png) [@anon94801460](https://forum.arduino.cc/u/anon94801460)\
**Post date:** [November 20, 2025, 4:53pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/3 "2025-11-20T16:53:54Z")

</div>

The A4988 driver can handle at most 1 Ampere/winding without forced air cooling. To what value did you set the current limit?

---

<div class="post-metadata">

**Author:** ![JCA34F](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jca34f/32/340148_2.png) [@JCA34F](https://forum.arduino.cc/u/JCA34F)\
**Post date:** [November 20, 2025, 5:13pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/4 "2025-11-20T17:13:30Z")

</div>

"StepperA.setMaxSpeed(2500);,  
StepperB.setMaxSpeed(2000);"

Reduce these numbers by a factor of 4 (625, 500) and try it.

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [November 20, 2025, 5:27pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/5 "2025-11-20T17:27:02Z")

</div>

> [@sanchitbatra](#):
>
> `const int STEPB = 13;`

Do not use Pin 13.

> [@sanchitbatra](#):
>
> one motor

Which motor is "one motor?" Which pins?

> [@sanchitbatra](#):
>
> second motor

Which motor is "second motor?" Which pins?

---

<div class="post-metadata">

**Author:** ![cattledog](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/cattledog/32/217816_2.png) [@cattledog](https://forum.arduino.cc/u/cattledog)\
**Post date:** [November 20, 2025, 5:40pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/6 "2025-11-20T17:40:27Z")

</div>

> During upload: Both motors work perfectly (as a matter of fact, i don't why they move while code is being uploaded)
> 
> BONUS CLUE: If I hold the reset button on the Arduino, for as long as I hold it, it keeps rotating the motors perfectly, when i leave it they stop. Also, they were working perfectly 3 days ago. We just plugged them in today and this problem occured.

As @Paul_KD7HB said in post #2 this means that your code is not running the motors, your wiring arrangement is running them with out code.

---

<div class="post-metadata">

**Author:** ![sanchitbatra](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sanchitbatra/32/1137193_2.png) [@sanchitbatra](https://forum.arduino.cc/u/sanchitbatra)\
**Post date:** [November 20, 2025, 6:17pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/7 "2025-11-20T18:17:45Z")

</div>

[the circuit design](https://app.cirkitdesigner.com/project/07496b54-747a-456b-bb15-4ce7f10309a9)

I couldn’t really attach an image. So i designed it on cirkit designer. Also, Kindly note the following: Cirkit designer doesn’t really have a capacitor, so please just imagine that it is there, also the ioref pin is actually a 5v pin on my Arduino Uno so, please just imagine that the ioref is actually a 5v. I can that doesn’t work here’s the link:

> **[Cirkit Designer IDE](https://app.cirkitdesigner.com/project/07496b54-747a-456b-bb15-4ce7f10309a9)**
>
> Cirkit Designer IDE is an all-in-one circuit design tool that helps you create and share electronic circuits with ease.

---

<div class="post-metadata">

**Author:** ![sanchitbatra](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sanchitbatra/32/1137193_2.png) [@sanchitbatra](https://forum.arduino.cc/u/sanchitbatra)\
**Post date:** [November 20, 2025, 6:18pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/8 "2025-11-20T18:18:56Z")

</div>

Yes, but the thing is, it IS listening to my commands, and also i am able to upload a different code with a different set of commands and it is listening to that as well. its just that the motor moves in both direction wonkily on command but smoothly while the code is being uploaded by itself.

---

<div class="post-metadata">

**Author:** ![sanchitbatra](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sanchitbatra/32/1137193_2.png) [@sanchitbatra](https://forum.arduino.cc/u/sanchitbatra)\
**Post date:** [November 20, 2025, 6:20pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/9 "2025-11-20T18:20:58Z")

</div>

STEPA is the one moving wonkily and STEPB is moving fine. Also, out of curiosity, why should one not use pin 13?

---

<div class="post-metadata">

**Author:** ![sanchitbatra](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sanchitbatra/32/1137193_2.png) [@sanchitbatra](https://forum.arduino.cc/u/sanchitbatra)\
**Post date:** [November 20, 2025, 6:22pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/10 "2025-11-20T18:22:16Z")

</div>

I have attached a circuit diagram in a comment below, kindly check. Thanks!

---

<div class="post-metadata">

**Author:** ![sanchitbatra](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sanchitbatra/32/1137193_2.png) [@sanchitbatra](https://forum.arduino.cc/u/sanchitbatra)\
**Post date:** [November 20, 2025, 6:23pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/11 "2025-11-20T18:23:16Z")

</div>

I have a heat sink attached and have checked and tuned the a4988 with a multimeter to the right voltage.

---

<div class="post-metadata">

**Author:** ![sanchitbatra](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sanchitbatra/32/1137193_2.png) [@sanchitbatra](https://forum.arduino.cc/u/sanchitbatra)\
**Post date:** [November 20, 2025, 6:23pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/12 "2025-11-20T18:23:48Z")

</div>

I tried decreasing the motor speed, and that did not work. Though, thanks for the suggestion!

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [November 20, 2025, 8:05pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/13 "2025-11-20T20:05:04Z")

</div>

Come on! Did the speed change? That is what the change was for!

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [November 20, 2025, 8:05pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/14 "2025-11-20T20:05:55Z")

</div>

> [@sanchitbatra](#):
>
> why should one not use pin 13?

Pin 13 has the on-board, "L" LED... why that causes problems in some sketches, I do not know. I stay away from it, except for using it for the L-LED and clock signal.

---

<div class="post-metadata">

**Author:** ![Paul\_KD7HB](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/paul_kd7hb/32/1127958_2.png) [@Paul\_KD7HB](https://forum.arduino.cc/u/Paul_KD7HB)\
**Post date:** [November 20, 2025, 8:06pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/15 "2025-11-20T20:06:36Z")

</div>

> [@sanchitbatra](#):
>
> but smoothly while the code is being uploaded by itself.

The only program being run during upload is the upload program in your Arduino!

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [November 20, 2025, 8:44pm UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/16 "2025-11-20T20:44:49Z")

</div>

I tried your sketch in a simulation, and the sketch using PIN 13 failed just as you described.

I moved PIN 13 to ANY OTHER PIN (Pin 10 in the simulation), and your sketch worked.

> **Your sketch with Pin 10 replacing Pin 13**
>
> ```arduino
> #include <Arduino.h>
> #include <AccelStepper.h>
> 
> const int STEPA = 3;
> const int DIRA = 4;
> const int ENA = 2;
> 
> // const int STEPB = 13;
> const int STEPB = 10;
> const int DIRB = 8;
> const int ENB = 12;
> 
> // const int EM = 8;
> #define motorInterfaceType 1
> 
> AccelStepper StepperA(motorInterfaceType, STEPA, DIRA);
> AccelStepper StepperB(motorInterfaceType, STEPB, DIRB);
> 
> void setup() {
> Serial.begin(115200);
> Serial.println();
> //pinMode(EM, OUTPUT);
> pinMode(ENA, OUTPUT);
> pinMode(ENB, OUTPUT);
> StepperA.setMaxSpeed(2500);
> StepperA.setAcceleration(100);
> StepperA.setSpeed(2000);
> 
> StepperB.setMaxSpeed(2000);
> StepperB.setAcceleration(100);
> StepperB.setSpeed(2500);
> digitalWrite(ENA, HIGH);
> digitalWrite(ENB, HIGH);
> }
> 
> int prev_place[] = { 0, 0 };
> bool running = true;
> void loop() {
> // ALWAYS RUN THE MOTORS
> StepperA.run();
> StepperB.run();
> 
> // Only read commands when motors are idle
> if (StepperA.distanceToGo() == 0 && StepperB.distanceToGo() == 0) {
> digitalWrite(ENA, HIGH);
> digitalWrite(ENB, HIGH);
> 
> if (Serial.available() > 0) {
> 
> String cmd = Serial.readStringUntil('\n');
> cmd.trim();
> 
> int dx = 0;
> int dy = 0;
> 
> if (cmd == "F") {
> dx = 0;
> dy = 200;
> } else if (cmd == "B") {
> dx = 0;
> dy = -200;
> } else if (cmd == "R") {
> dx = 200;
> dy = 0;
> } else if (cmd == "L") {
> dx = -200;
> dy = 0;
> } else if (cmd == "D1") {
> dx = -100;
> dy = 100;
> } else if (cmd == "D2") {
> dx = 1000;
> dy = 1000;
> } else if (cmd == "Q") {
> StepperA.stop();
> StepperB.stop();
> }
> 
> int da = dx + dy;
> int db = dx - dy;
> // Serial.write);
> if (da > 0 || da < 0) {
> digitalWrite(ENA, LOW);
> }
> if (db > 0 || db < 0) {
> digitalWrite(ENB, LOW);
> }
> int dadeg = (36 * da) / (10 * PI);
> int dbdeg = (36 * db) / (10 * PI);
> Serial.print(dadeg * 10000);
> StepperA.move(dadeg / 1.8);
> StepperB.move(dbdeg / 1.8);
> }
> }
> }
> 
> ```

> **diagram.json for wokwi simulation**
>
> ```arduino
> {
> "version": 1,
> "author": "Anonymous maker",
> "editor": "wokwi",
> "parts": [
> { "type": "wokwi-arduino-nano", "id": "nano", "top": 4.8, "left": -0.5, "attrs": {} },
> { "type": "wokwi-a4988", "id": "drv1", "top": -91.2, "left": 139.2, "attrs": {} },
> { "type": "wokwi-a4988", "id": "drv2", "top": -235.2, "left": 139.2, "attrs": {} },
> { "type": "wokwi-vcc", "id": "vcc1", "top": -296.84, "left": 192, "attrs": {} },
> { "type": "wokwi-gnd", "id": "gnd1", "top": -9.6, "left": 201, "attrs": {} },
> {
> "type": "wokwi-stepper-motor",
> "id": "stepper1",
> "top": -307.21,
> "left": 214.62,
> "attrs": { "size": "8", "arrow": "white" }
> },
> {
> "type": "wokwi-stepper-motor",
> "id": "stepper2",
> "top": -172.81,
> "left": 214.62,
> "attrs": { "size": "8", "arrow": "white" }
> },
> { "type": "wokwi-text", "id": "text1", "top": -144, "left": 297.6, "attrs": { "text": "A" } },
> {
> "type": "wokwi-text",
> "id": "text2",
> "top": -278.4,
> "left": 297.6,
> "attrs": { "text": "B" }
> }
> ],
> "connections": [
> ["drv1:SLEEP", "drv1:RESET", "green", ["h-9.6", "v-9.6", "h-9.6"] ],
> ["drv2:SLEEP", "drv2:RESET", "green", ["h-9.6", "v-9.6"] ],
> ["vcc1:VCC", "drv2:VMOT", "red", ["v0"] ],
> ["vcc1:VCC", "drv2:VDD", "red", ["v0"] ],
> ["gnd1:GND", "drv1:GND.1", "black", ["v0"] ],
> ["gnd1:GND", "drv1:GND.2", "black", ["v0"] ],
> ["gnd1:GND", "drv2:GND.1", "black", ["v0"] ],
> ["gnd1:GND", "drv2:GND.2", "black", ["v0"] ],
> ["vcc1:VCC", "drv1:VMOT", "red", ["v0"] ],
> ["vcc1:VCC", "drv1:VDD", "red", ["v0"] ],
> ["drv2:2B", "stepper1:A+", "green", ["h0"] ],
> ["drv2:2A", "stepper1:A-", "green", ["h0"] ],
> ["drv2:1A", "stepper1:B-", "green", ["h0"] ],
> ["drv2:1B", "stepper1:B+", "green", ["h0"] ],
> ["drv1:2B", "stepper2:A+", "green", ["h0"] ],
> ["drv1:1A", "stepper2:B-", "green", ["h0"] ],
> ["drv1:1B", "stepper2:B+", "green", ["h0"] ],
> ["drv1:2A", "stepper2:A-", "green", ["h0"] ],
> ["nano:4", "drv1:DIR", "green", ["v0"] ],
> ["nano:3", "drv1:STEP", "green", ["v0"] ],
> ["nano:2", "drv1:ENABLE", "green", ["v0"] ],
> ["nano:8", "drv2:DIR", "green", ["v0"] ],
> ["nano:10", "drv2:STEP", "green", ["v0"] ],
> ["nano:12", "drv2:ENABLE", "green", ["v0"] ],
> ["nano:13", "drv2:ENABLE", "green", ["v9.6", "h-19.2", "v-307.2"] ]
> ],
> "dependencies": {}
> }
> 
> ```

I needed to add a `Serial.println()` to wake the serial line, but all commands (F, B, L, R) made both steppers work (D1, D2 were only one-stepper movements for skid-steering). Strange output: `-376037603760-3760018384` (this results from F, B, L, R, D1, D2)

---

<div class="post-metadata">

**Author:** ![sanchitbatra](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sanchitbatra/32/1137193_2.png) [@sanchitbatra](https://forum.arduino.cc/u/sanchitbatra)\
**Post date:** [November 21, 2025, 3:48am UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/17 "2025-11-21T03:48:36Z")

</div>

There was really not a change, to be honest.

---

<div class="post-metadata">

**Author:** ![sanchitbatra](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sanchitbatra/32/1137193_2.png) [@sanchitbatra](https://forum.arduino.cc/u/sanchitbatra)\
**Post date:** [November 21, 2025, 3:54am UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/18 "2025-11-21T03:54:18Z")

</div>

I completely understand that and it makes sense. But why, then are the motors moving? That is what I cannot understand. Moreover, the motors also keep moving smoothly for as long as I press the reset button but when I leave it, the stop. Also, when I write the command to move them, one of them moves weirdly.

---

<div class="post-metadata">

**Author:** ![sanchitbatra](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/sanchitbatra/32/1137193_2.png) [@sanchitbatra](https://forum.arduino.cc/u/sanchitbatra)\
**Post date:** [November 21, 2025, 4:18am UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/19 "2025-11-21T04:18:30Z")

</div>

I shifted the pin 13 to the pin 11. But still, the same problem is occurring. However, I think it is so, because the one where pin 13 is involved is working fine. It is the other one that is moving wonkily. Just to keep it out there as an option, could it be that the motor has some issue?

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [November 21, 2025, 4:45am UTC](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416/20 "2025-11-21T04:45:26Z")

</div>

What is the voltage rating for each motor?

[Next page](https://forum.arduino.cc/t/nema-17-with-a4988-runs-smoothly-during-code-upload-but-moves-erratically-afterward/1415416.md?page=2)
