NEMA 8 stepper Motor fails to follow the rpm and step set points

Hello! I just joined this sub hoping to shed some light into a stepper motor cirquit/code issue I am running into for a project of mine.

The components I am using are:

  1. An Arduino Uno
  2. A L298N motor driver.
  3. A NEMA 8 Bipolar stepper Motor. ( 3.6V 1.8 degrees/step, 0.6A/Phase, 0.20kg.cm holding torque)
  4. A configurable power supply (set at 6V)
  5. 4X4 keypad
  6. Bread board
  7. Jumper cables

I have followed the exact circuit found on here and I have added a keypad in order to use two of its buttons (4,6) for directional control of the stepper motor.

I am trying it make it do one full revolution which for this motor is 200 steps (360/1.8). However no matter what RPM I choose the motor fails to do so, or barely makes it but with almost no torque. In some cases, usually when i choose very low or very high RPMS the shaft stays completely still, (while the motor is trying to spin).

I am trying to narrow done the cause of why this is heppening and so far I have come up with 3 possible explanations:

1)Wrong voltage input at the L298N driver

  1. Wrong choice of Driver.

  2. Problems with my code

I would greatly appreciate any input so I can move forward with my project.

Thank you!

My code:

#include <Keypad.h>

const int ROW_NUM = 1; //one row

const int COLUMN_NUM = 3; //three columns

char keys[ROW_NUM][COLUMN_NUM] = {

{'4','5','6'},

};

byte pin_rows[ROW_NUM] = {7}; //connect to the row pinouts of the keypad

byte pin_column[COLUMN_NUM] = {5, 4, 3}; //connect to the column pinouts of the keypad

Keypad keypad = Keypad( makeKeymap(keys), pin_rows, pin_column, ROW_NUM, COLUMN_NUM );

#include <Stepper.h>

// Number of steps per output rotation

const int stepsPerRevolution = 200;

// Create Instance of Stepper library

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()

{

char key = keypad.getKey();

if (key){

Serial.println(key);

if(key == '4') {

myStepper.step(-stepsPerRevolution);

Serial.print ("left");

}

if(key=='6'){

myStepper.step(stepsPerRevolution);

Serial.print ("right");

}

if(key=='5'){

digitalWrite(8, LOW);

digitalWrite(9, LOW);

digitalWrite(10, LOW);

digitalWrite(11, LOW);

Serial.print ("stop");

}

}

}

Please post a link to the datasheet of the stepper.
I suspect that the L298 is not a good driver. How do You set the current to 0.6 amps or below?
Please extract the schematics and post i here.

I eve your problem is the driver:

This is a H-bridge driver for DC motors.
What you need is a stepper motor driver, such as:

And finally, note that the NEMA designation is simply the size of the face plate/ mounting holes, in decimal inches. Your motor has a face plate of 0.8". It does not speak to the current draw, voltage, torque at all. One can assume that larger NEMA numbers will be more "powerful", but this is not necessarily the case.

Thank you for the reply, my apologies here is the link https://grobotronics.com/images/companies/1/HS2680-1.jpg?1628594147847
I currently dont have a way of controlling the current, do you mind suggesting a method to do so?
Thanks again for your time!

Got it! Appreciate your feedback, I will order the driver you suggested if I cant figure out a way to make it work with the L298N.
Thank you for your time!

If You power the L298, and the steppers, with max 6 volts You can use that driver!

Good to know :+1:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.