Stepper motor does not turn

Hello,

i have a NEMA 17 Stepper Motor with 12V 0.4A, a A4988 Driver and an Arduino Nano.
For the motor I use a 12V 2A power supply.
All cables are connected correctly but the motor does not turn.

Sometimes it makes some steps but then it jumps back and sometimes the motor does nothing.

The poti on the A4988 is at 0.4V *2 = 0.8A for the motor.

Is there something wrong with the PSU or with the driver?

Thanks for your help :slight_smile:

You have not posted your program or your circuit diagram.

The Pololu A4988 web page has a good circuit diagram - and lots of other useful info.

Try this Simple Stepper Code

...R
Stepper Motor Basics

Robin2:
You have not posted your program or your circuit diagram.

The Pololu A4988 web page has a good circuit diagram - and lots of other useful info.

Try this Simple Stepper Code

…R
Stepper Motor Basics

My circuit:

Vmot/GND → 12V 2A
VDD/GND → Arduino 5V/GND
Step → Arduino D5
Dir → Arduino D6
Sleep with Reset

Motor
Black (A) → 1B
Green (A/) -->1A
Red (B) → 2A
Blue (B/) → 2B

My Code:

int ste = 5;
int dir = 6;

void setup()
{
pinMode(ste, OUTPUT);
pinMode(dir, OUTPUT);
}

void loop()
{

for(int i = 0; i < 400; i++ )
{

digitalWrite(dir, HIGH);
digitalWrite(ste, HIGH);
delay(250);
digitalWrite(ste, LOW);
delay(250);
}

for(int i = 0; i < 400; i++ )
{
digitalWrite(dir, LOW);
digitalWrite(ste, HIGH);
delay(250);
digitalWrite(ste, LOW);
delay(250);
}

}

Is there are mistake in the connection of the motor to the driver?

The motor wire colours are meaningless unless you have a datasheet for that specific motor. Even then I would check them with your multimeter. The wires from one motor coil go to 1A and 1B and the wires from the other coil go to 2A and 2B.

...R

Black (A) -Green (A/) is one coil and Red (B)-Blue(B/) is the second one.
i have Black on 2B and Green on 2A, Red on 1A and Blue on 1B.

Maybe your DRV8825 is damaged?

Never disconnect the wires between the motor and the stepper driver while the driver is powered up. The driver will be instantly destroyed,

...R

Have you tried using #include.<Stepper.h> library, you’ll still need to have correct wiring but it might simplify thing for you. then declare a stepper, its direction and step pins, steps per revolution. then just set its speed, then all you have to do it tell it how many steps you want any where in your code. Just a thought

ScoobyDoo:
Have you tried using #include.<Stepper.h> library,

That library is not a good idea for stepper motor drivers (like the DRV8825) that take step and direction signals. The OP’s code is fine for testing.

…R

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Can you please tell us your electronics, programming, Arduino, hardware experience?

Thanks.. Tom.. :slight_smile:

slider101:
Black (A) -Green (A/) is one coil and Red (B)-Blue(B/) is the second one.
i have Black on 2B and Green on 2A, Red on 1A and Blue on 1B.

Have you checked them with a DMM?
Tom.. :slight_smile:

slider101:
Hello,

i have a NEMA 17 Stepper Motor with 12V 0.4A, a A4988 Driver and an Arduino Nano.
For the motor I use a 12V 2A power supply.
All cables are connected correctly but the motor does not turn.

Sometimes it makes some steps but then it jumps back and sometimes the motor does nothing.

The poti on the A4988 is at 0.4V *2 = 0.8A for the motor.

Is there something wrong with the PSU or with the driver?

Thanks for your help :slight_smile:

You problem is you are trying to drive a high impedance stepper constant-current.

To do that you need substantially more voltage - 24V for instance.

Alternatively set the A4988 for less current (say 0.25A), and put up with lower torque.

30 ohms is a high impedance motor, low impedance ones are usually in the range 0.4 to 3 ohms
and are designed to be high performance from constant current drivers.

High impedance steppers will give low speed only