Stepper motor not working

Please guys i need tour help. I have a project that i am working on. I have an arduino unl, stepper motor driver l298n and nema 17. Specs for nema 17 is below.

Nema 17 Stepper Motor 40Ncm 0.9A 4-Lead 90cm Lead Cable for DIY 3D Printer CNC 721047951734 | eBay.

When i connect stepper driver to pin 8 to 11, and positive and ground to arduino and stepper motor to driver, it rotates only one direction but hardly rotates the other direction. It looks like it does not have enough powe. What should i do?

Please help me.

Use a proper stepper driver, such as a DRV8825, not a DC motor controller.

Only high impedance steppers can be driven from DC motor H-bridges, and then only
slowly and without microstepping (so noisy and low dynamic torque).

The problem you describe could be a number of things, since you haven't given information on the
power supply its hard to know. You might have mixed windings up, or have a bug in the code.

With that 0.9A motor a 12V or 24V 1A supply would be appropriate using a DRV8825 or A4988
stepper driver. Higher supply voltage allows higher top speed.

I'd recommend starting with a microstepping setting around x8 to x16.

Thank you for your reply. Really appreciate. I have used 12v 10a from power supply and also tried with the power of the arduino. But it did not work. I will try to get the A498 stepper driver.

The stepper motor is rated at 3.96V, will it be ok to use it with 12v connected to the driver?

If i need to use push button to program the stepper motor to rotate at specific angle, do i need to use 10k resistor connected to ground of push button?

Thank you

Christophe90:
The stepper motor is rated at 3.96V, will it be ok to use it with 12v connected to the driver?

ONLY if you use a specialized stepper driver (such as the DRV8825 or A4988) which allows you to adjust the maximum current to match the motor.

If you connect 12v directly to a 3.96v motor the current will be 3 times the design limit and shortly after the smoke will escape.

...R

Christophe90:
Thank you for your reply. Really appreciate. I have used 12v 10a from power supply and also tried with the power of the arduino. But it did not work. I will try to get the A498 stepper driver.

The stepper motor is rated at 3.96V, will it be ok to use it with 12v connected to the driver?

No, modern steppers are current controlled, its rated at 0.9A and 4.4ohms, and some unknown inductance. You want a lot more voltage (24V is common) to get good speed, its the inductance that matters most, and this dominates motor behaviour when its spinning, the 4.4 ohms is dwarfed by the inductive reactance typically.

If i need to use push button to program the stepper motor to rotate at specific angle, do i need to use 10k resistor connected to ground of push button?

Thank you

You normally use push button to ground, and enable the built-in pullups on the pin

pinMode (pin, INPUT_PULLUP);