0

I am having problem with my Nema 17 drive by L298N(WB291111). I cant make it work. I already tried multiple example and tutorials in instructibles but still it will just move 1 step i also used accel libaries but still the same.

i used this schematic wirings

#include <Stepper.h>

const int stepsPerRevolution = 200;  

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(stepsPerRevolution);
  delay(500);

  // step one revolution in the other direction:
  Serial.println("counterclockwise");
  myStepper.step(-stepsPerRevolution);
  delay(500);
}
i logout
  • 7
  • 8

1 Answers1

0

Are you sure that you have the wires from the stepper, and the wires from the L298n connected in the correct order? If these wires are not connected in the right sequence then the stepper motor will draw a significant amount of current but not move (except for a slight shudder). Please refer to my 'Lesson 9' document here for the wiring configuration.

  • I just noticed your schematic, and it looks correct. I would re check the wiring, and then if all is correct consider testing with another motor and also another L298n module. – Seven Vinton Sep 05 '16 at 09:30
  • thank you for your reply sir. i tried another L298N. and it worked.. gues my L298N driver is defected.. – i logout Sep 05 '16 at 12:29