Stepper motor using l298n driver not rotating continuously

Hello, I trying to run a Nema 17 stepper motor using L298N motor driver. I have setup the connections as:

12V - power supply +

GND - power supply -

IN1, 2, 3, 4, - arduino digital 8,9,10,11

out 1, 2, 3, 4 - stepper coils. [ checked the proper coils using a multi-meter. Connected the coils which showed resistance reading ]

I am powering the arduino using my computer. I am running the stepper_oneRevolution sketch with a minute variation of 10 rotations.

But my motor is not running smoothly. It seems to get stuck on definite intervals and again start rotating. I am very new to arduino and stepper motors and have no electrical engineering or coding background. Detailed solutions will be much appreciated.

You need to post a link to the datasheet for your stepper motor.

An L298 is a poor choice for driving a stepper motor.

And please post the code that YOU have uploaded to your Arduino (what Arduino are you using?)

...R
Stepper Motor Basics
Simple Stepper Code

Sambitroy:
Hello, I trying to run a Nema 17 stepper motor

Which NEMA 17 stepper motor? Most are only suitable for current control with a chopper driver
as they are low impedance motors.

Hello, Please find the code I uploaded in my Arduino UNO.
#include <Stepper.h>

const int stepsPerRevolution = 200; // change this to fit the number of steps per revolution
// for your motor

// initialize the stepper library on pins 8 through 11:
Stepper myStepper(stepsPerRevolution, 8, 9, 10, 11);

void setup() {
// set the speed at 60 rpm:
myStepper.setSpeed(60);
// initialize the serial port:
Serial.begin(9600);
}

void loop() {
// step one revolution in one direction:
Serial.println("clockwise");
myStepper.step(10*stepsPerRevolution);
delay(500);

// step one revolution in the other direction:
Serial.println("counterclockwise");
myStepper.step(-10*stepsPerRevolution);
delay(500);
}

This is the standard one Revolution example in arduino

This is the link for the data sheet:

http://robokits.download/documentation/RMCS-1012.pdf

I am using it for making an automatic screwing system therefore I need precise control over the position. It will be highly appreciable if you can suggest a suitable driver.

Thanks.

That low resistance stepper is rated for 1.7 amperes/phase maximum and won't work at all with the L298N.

At the minimum, you need a DRV8825 stepper driver, but even that won't handle the full rated current.

If you do use the DRV8825, be sure to carefully set the current limit to 1.5 amperes or below.