# My nema 17 motor isnt working with my a4988 and esp32

**URL:** <https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826>\
**Category:** Motors, Mechanics, Power and CNC\
**Created:** [May 13, 2026, 2:56am UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826 "2026-05-13T02:56:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnsonprojects](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsonprojects/32/1203674_2.png) [@johnsonprojects](https://forum.arduino.cc/u/johnsonprojects)\
**Post date:** [May 13, 2026, 2:56am UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/1 "2026-05-13T02:56:56Z")

</div>

So I am trying to use a esp32 to move a motor but nothing is happening. I have changed out the a4988, changed the motor, moved the potentiometer, moved the cables, and nothing is working. The a4988 isn't even getting hot but I am pretty sure that my code is executing. I am recycling my motor from my ender 3 pro 3d printer.

 ![IMG8264](https://europe1.discourse-cdn.com/arduino/original/4X/3/1/c/31c7cf61f9e49b0cfe883fc54f969e52294cd574.jpeg)  
 ![IMG8262](https://europe1.discourse-cdn.com/arduino/original/4X/b/f/d/bfdd04d2e7db99c4260f3ff07db6c23d0e36b0de.jpeg)  
 ![IMG8265](https://europe1.discourse-cdn.com/arduino/original/4X/a/b/1/ab100d423d9eab77af720296e902fbbc4bb32208.jpeg)  
 ![IMG8263](https://europe1.discourse-cdn.com/arduino/original/4X/c/c/4/cc412cfa7f4578509be68a44a4649967e6c3a00f.jpeg)

---

<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 13, 2026, 3:07am UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/2 "2026-05-13T03:07:27Z")

</div>

Hi, @johnsonprojects  
Welcome to the forum.

> [@How to get the best out of this forum](https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum/679966):
>
> See also [FAQ - Arduino Forum](https://forum.arduino.cc/faq) for general rules on forum behavior and etiquette. Hello, Welcome to the Arduino Forum. This guide explains how to get the best out of this forum. Please read and follow the instructions below. Being new here you might think this is having rules for the sake of rules, but that is not the case. If you don’t follow the guidelines all that happens is there is a long exchange of posts while we try to get you to tell us what we need in order to help you, which is frus…

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?  
Can you please post a link to data/specs of the stepper, NEMA17 tells us very little about it but it physical profile.

Do you have a DMM? Digital MultiMeter?

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

---

<div class="post-metadata">

**Author:** ![johnsonprojects](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsonprojects/32/1203674_2.png) [@johnsonprojects](https://forum.arduino.cc/u/johnsonprojects)\
**Post date:** [May 13, 2026, 3:53am UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/3 "2026-05-13T03:53:35Z")

</div>

3v3 - vdd  
GND - GND  
p18 - step  
p19 - dir  
p21 - en  
sleep and reset together  
12v + - gnd  
12v- - vmot  
100mk 50v capacitor behind the vmot and gnd wires  
I cant find anything relating to my motor but it is from an ender 3 pro with the model 42hs040df280n-01

 ![IMG8266](https://europe1.discourse-cdn.com/arduino/original/4X/d/f/1/df1133b108321e7c273ccf5c31ce9241eed39a0d.jpeg)  
 ![IMG8267](https://europe1.discourse-cdn.com/arduino/original/4X/6/9/f/69f176a783e09bd0bfd51ba37d842a06d17f885d.jpeg)  
 ![IMG8268](https://europe1.discourse-cdn.com/arduino/original/4X/4/0/f/40f03794f9b830f03e1b35e46c0ebc7b8d91f6a4.jpeg)

---

<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 13, 2026, 6:42am UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/4 "2026-05-13T06:42:56Z")

</div>

> [@johnsonprojects](#):
>
> I cant find anything relating to my motor but it is from an ender 3 pro with the model 42hs040df280n-01

You need to know the specs of the stepper to set the power supply requirements and the current setting of tthe driver.

Please draw a circuit diagram.  
Please post your code.

Can you measure the resistance of the stepper windings please?

Tom.... 😃 👍 ☕ 🇦🇺

---

<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:** [May 13, 2026, 1:05pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/5 "2026-05-13T13:05:34Z")

</div>

In the first post photo of the wired A4988, the "step" pin solder looks like the solder is floating above the pad, and most pins look like the solder is "tucked under" with a clear distinction between solder and pad... like the pad was not heated during soldering... add flux and reflow the solder onto pads and pins.

---

<div class="post-metadata">

**Author:** ![johnsonprojects](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsonprojects/32/1203674_2.png) [@johnsonprojects](https://forum.arduino.cc/u/johnsonprojects)\
**Post date:** [May 13, 2026, 6:57pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/6 "2026-05-13T18:57:02Z")

</div>

I don't have a multimeter. Do I absolutely need one? This is my first project and I am unsure if I will continue to do these things so I don't want to get one unless I really have to. Is there any other way to do this project without needing it? All the Youtube videos I watched seemed relatively easy compared to what I am experiencing.

This is the most similar motor I could find: [Creality 42-40 Stepper Motor – FDM3D](https://fdm3d.co.za/products/creality-42-40-stepper-motor?utm_source=chatgpt.com&variant=50869518237909)

---

<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:** [May 13, 2026, 7:07pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/7 "2026-05-13T19:07:02Z")

</div>

> [@johnsonprojects](#):
>
> This is the most similar motor I could find: [Creality 42-40 Stepper Motor – FDM3D](https://fdm3d.co.za/products/creality-42-40-stepper-motor?utm_source=chatgpt.com&variant=50869518237909)

Yes, that looks like your motor. See the 1.5 Amp per phase statement? That means some of the time your motor will use both windings and draw 3 amps. You were asked about the power supply but never answered. what is it's voltage and current ratings? Will it handle the motor?

---

<div class="post-metadata">

**Author:** ![johnsonprojects](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsonprojects/32/1203674_2.png) [@johnsonprojects](https://forum.arduino.cc/u/johnsonprojects)\
**Post date:** [May 13, 2026, 7:10pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/8 "2026-05-13T19:10:58Z")

</div>

[https://www.ebay.com/itm/157861399159?chn=ps&mkevt=1&mkcid=28&google\_free\_listing\_action=view\_item](https://www.ebay.com/itm/157861399159?chn=ps&mkevt=1&mkcid=28&google_free_listing_action=view_item) This is my power supply.

---

<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:** [May 13, 2026, 7:17pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/9 "2026-05-13T19:17:32Z")

</div>

Thank you for the link. If you had a DVM you could watch the voltage drop as you got closer to the 5 amp current point. But at 3 amps it should stay close to 12 volts.

---

<div class="post-metadata">

**Author:** ![johnsonprojects](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsonprojects/32/1203674_2.png) [@johnsonprojects](https://forum.arduino.cc/u/johnsonprojects)\
**Post date:** [May 13, 2026, 7:19pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/10 "2026-05-13T19:19:12Z")

</div>

So what should I do. Should I buy these electrical tools or is there a way to solve my issue without them?

---

<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:** [May 13, 2026, 7:20pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/11 "2026-05-13T19:20:43Z")

</div>

Is time of any value to you?

---

<div class="post-metadata">

**Author:** ![johnsonprojects](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsonprojects/32/1203674_2.png) [@johnsonprojects](https://forum.arduino.cc/u/johnsonprojects)\
**Post date:** [May 13, 2026, 7:25pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/12 "2026-05-13T19:25:58Z")

</div>

I would like to get this done as soon as possibly but I am willing to wait. I just do not know if I am willing to spend all this money to never use it again.

---

<div class="post-metadata">

**Author:** ![johnsonprojects](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsonprojects/32/1203674_2.png) [@johnsonprojects](https://forum.arduino.cc/u/johnsonprojects)\
**Post date:** [May 13, 2026, 7:30pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/13 "2026-05-13T19:30:43Z")

</div>

![circuit](https://europe1.discourse-cdn.com/arduino/original/4X/3/9/3/393144d217676618537db5ace341334a40b8d7b6.jpeg)  
Here is a very poorly drawn circuit

---

<div class="post-metadata">

**Author:** ![johnsonprojects](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsonprojects/32/1203674_2.png) [@johnsonprojects](https://forum.arduino.cc/u/johnsonprojects)\
**Post date:** [May 13, 2026, 7:34pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/14 "2026-05-13T19:34:04Z")

</div>

```arduino
#define STEP_PIN 18 // Step pin connected to A4988 STEP
#define DIR_PIN 19 // Direction pin connected to A4988 DIR
#define ENABLE_PIN 21 // Optional, connected to A4988 ENABLE

int stepsPerRevolution = 400; // Adjust based on your motor

void setup() {
  Serial.begin(115200);
  pinMode(STEP_PIN, OUTPUT);
  pinMode(DIR_PIN, OUTPUT);
  pinMode(ENABLE_PIN, OUTPUT);

  digitalWrite(ENABLE_PIN, LOW); // Enable driver (LOW = ON)
  Serial.println("Stepper Motor Test Start");
}

void loop() {
  // Rotate clockwise
  digitalWrite(DIR_PIN, HIGH);
  stepMotor(stepsPerRevolution); // One full rotation
  delay(1000);

  // Rotate counterclockwise
  digitalWrite(DIR_PIN, LOW);
  stepMotor(stepsPerRevolution);
  delay(1000);
}

void stepMotor(int steps) {
  for (int i = 0; i < steps; i++) {
    digitalWrite(STEP_PIN, HIGH);
    delayMicroseconds(5000); // Control speed (lower = faster)
    digitalWrite(STEP_PIN, LOW);
    delayMicroseconds(5000);
  }
}

```

This is my code

---

<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:** [May 13, 2026, 9:11pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/15 "2026-05-13T21:11:45Z")

</div>

> [@johnsonprojects](#):
>
> I would like to get this done

Did you reflow the A4988?

You can simulate controlling a motor by connecting an LED and resistor to each pin used (18, 19, 21). The DIR LED will be on for one rotation, then off for a rotation. The STEP pin will flutter as the motor steps and the ENBL LED will be ON (or is it off?) all the time.

The stepper motor datasheet says the motor is rated at 1A, so the power supply shouldn't be too weak with 5A available.

Your code works in a simulation. I assume you are 1/2 stepping, or your motor is 400 steps per revolution.

---

<div class="post-metadata">

**Author:** ![johnsonprojects](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsonprojects/32/1203674_2.png) [@johnsonprojects](https://forum.arduino.cc/u/johnsonprojects)\
**Post date:** [May 14, 2026, 1:12am UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/16 "2026-05-14T01:12:12Z")

</div>

I just tried this and it works just like you explained. So is it the driver that is the problem?

---

<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:** [May 14, 2026, 3:21am UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/17 "2026-05-14T03:21:33Z")

</div>

Probably the driver is not configured correctly.

This page descibes the process...

> **[Pololu - A4988 Stepper Motor Driver Carrier](https://www.pololu.com/product/1182)**
>
> This breakout board for Allegro’s A4988 microstepping bipolar stepper motor driver features adjustable current limiting, over-current and over-temperature protection, and five different microstep resolutions (down to 1/16-step). It operates from 8 V...

---

<div class="post-metadata">

**Author:** ![johnsonprojects](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsonprojects/32/1203674_2.png) [@johnsonprojects](https://forum.arduino.cc/u/johnsonprojects)\
**Post date:** [May 14, 2026, 6:57pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/18 "2026-05-14T18:57:35Z")

</div>

Is there a way to check if my driver is working fine, and is there a way to limit my driver without using a multimeter?

---

<div class="post-metadata">

**Author:** ![johnsonprojects](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnsonprojects/32/1203674_2.png) [@johnsonprojects](https://forum.arduino.cc/u/johnsonprojects)\
**Post date:** [May 14, 2026, 7:03pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/19 "2026-05-14T19:03:48Z")

</div>

or should i just get a cheap 10 dollar multimeter and use that

---

<div class="post-metadata">

**Author:** ![gilshultz](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gilshultz](https://forum.arduino.cc/u/gilshultz)\
**Post date:** [May 14, 2026, 7:18pm UTC](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826/20 "2026-05-14T19:18:04Z")

</div>

> [@johnsonprojects](#):
>
> should i just get a cheap 10 dollar multimeter and use that

Yes, I have seen them on sale from china where you could get 2 for that amount.

[Next page](https://forum.arduino.cc/t/my-nema-17-motor-isnt-working-with-my-a4988-and-esp32/1443826.md?page=2)
