Problems trying to move NEMA 17 with DRV8825

First of all, I have to say that I’m a newbie at Arduino and building circuits with it.
I have some problems trying to move a stepper motor, so I hope you could help me with it. The components I am using are:

  • Arduino UNO R3
  • NEMA 17 stepper, model 42BYGHW811: bipolar stepper motor controled by 4 wires, although it has 6
  • Driver DRV8825: it is able to give about 2.2A per phase and is fed by a 9V Alkaline battery (in the pololu web - - page they say that needs between 8.2 and 45V). Also needs a 100µF capacitor to avoid voltage peaks, so I use a 25V capacitor (I don’t know if it is too much for a 9V battery). The pin diagram connection is showed in the DRV8825.png image.
  • Protoboard

I have followed other’s people examples and wiring images about DRV8825 and stepper motor, I have used several libraries for Arduino (Stepper, AccelStepper, StepperDriver) and tested it about 30 times, changing the wire that is connected to every driver pin, but all I get are annoying squeaks coming from the stepper, like if it was trying to move but it couldn’t. I get it to move in a coming and going move when I control every wire with a single Arduino pin, without driver, but as I read it could burn out the chip.
The wiring I’ve been using is showed in the image called WiringDiagram.jpg. I made it with SketchUp, but I hope it is understandable (I know there is software like fritzing, eagle… but I get a bit confused when I use).

#include <Stepper.h>
const unsigned int motorSteps = 200; //Steps per turn
const unsigned int stepPin = 12; //Steps pin to control motor
const unsigned int dirPin = 13; //Dir pin to control motor
Stepper stepper(motorSteps, stepPin, dirPin);

void setup() {

void loop() {

Do I need any other driver or any other component to run this stepper?
Sorry if I committed any misspelling mistake.
Thanks in advance.


Small 9V batteries are utterly utterly hopeless for this. They basically can't power even a small
motor properly, and are completely inadequate for a stepper.

Post a link to the datasheet for your stepper motor.

The Pololu DRV8825 webpage has a good wiring diagram.

If you have a suitable motor power supply and if the motor current is within the range of the DRV8825 then this Simple Stepper Code should be good for testing it. It does not need any library.

Stepper Motor Basics

Thanks you MarkT for your reply and thank you Robin2's for your motor basics post and code.
I tested the new code with a 12V and 400mA power supply from an old razor for the driver and motor as MarkT suggested, but I still get the same, annoying squeaks coming from the motor. I've been using the same wiring diagram I posted up, and I also tried to change the motor wires connections to DRV8825 when it was off, but nothing.
Here's the NEMA 17 42BYGHW811 datasheet:
Anything I can do apart from it? Is the DRV8825 really different from A4988 and because of this it doesn't work?
Thanks in advance.

Edit: I read both in Robin2's post and in other web pages that the DRV8825 and A4988 stepper drivers are quite similar but I don't know it they really work the same way. At first sight, DRV8825 is capable on giving more current than A4988, but is there any other difference?

I tested the new code with a 12V and 400mA power supply

Try a 12V, 4 Amp supply (or higher power output), and you should be ok.

The important thing is to check to see if the supply that you have is able to supply the amount of power required by whatever is on the output of it.

Otherwise it's like taking a blindfold and hoping for the best. Or like mouse trying to move a mountain.

So then, I have to ask on Ebay for a new power supply of 4-5A and I'll tell you.

According to the datasheet of the DRV8825 you could even go up to 45V (although I would stay at 40V max to have a little spare room to the limit).

If you have no restrictions using more than 12V, I would go with 24V / 3A to power the stepper.
24V will give your stepper a much better performance (in speed and torque).

That motor requires 2.5 amps and the DRV8825 cannot provide that - IIRC its max is 2.2amps and in practice that probably means about 1.8amps. You need a more powerful (and almost certainly more expensive) driver than can provide 3.5 or 4 amps to give you a margin for reliability. The motor may run at the lower current of the DRV8825 but it won't develop maximum torque.

How have you adjusted the current limit on the DRV8825 board?

If you have to buy a new power supply get one that can provide 24v or 36v - check what is the upper limit that your stepper driver can accept.


IIRC its max is 2.2amps and in practice that probably means about 1.8amps.

Even at 1.0A the DRV8825 gets already very hot, so you, Robin, might be right to go with a bigger driver for this 2.5A stepper. But it's depending on what the OP intends to do and if the max torque is needed at all or if he is just experimenting with Arduino and steppers to get acquainted to it.

I run NEMA17 steppers with DRV8825 at 1.0A and I am not able to hold the shaft when it's turning; at least for my projects that's more than enough torque.

If the OP does not need the full torque why not buy a motor that has a lower max torque and a demand for amps that can be satisfied by a DRV8825?


Maybe because he had already such a motor lying around or bought something to start with.
When I started with stepper motors I bought a stepper which I never would buy on today's knowledge.

I call that gaining experience by buying the wrong things :slight_smile:

But you are right, we don't know enough about the OP's real intention.

You won't need 4A supply BTW, the supply provides less current than the driver supplies to
the motor, 1.5A to 2A range is probably fine. The driver acts as a buck converter so it outputs
higher current at a lower voltage. 0.4A wasn't going to be enough, I'd budget about 7 to 8W
to heat a NEMA17 motor, then add some more for the mechanical load (yes, steppers convert
most of the supply to heat).

If you want the motor to have a higher top speed you'll be wise to go to 24V supply though.