Stepper working all fine before but now the motor wont turn properly.


hi i'm using arduino mega 2560 , quad stepper motor driver spark fun using stepper motor(https://www.pololu.com/product/2267). running code motor makes 1 full clockwise rotation , full anti clockwise rotation , stalls 5 seconds. first link video successful working of motor (https://www.youtube.com/watch?v=vj3u9aifxcc). second video show how stopped working after 2 days when same wiring, code , power(https://www.youtube.com/watch?v=jrud6jdjpck). problem here ? wiring same before. have changed motor, still same. used quad stepper example code still same. changed channel 3 1 still same. issue here ? i'm posting code below.
code: [select]

#include <sparkfunquadstep.h>

// create instance of class motor

quadstep quadstep;

void setup() {
 
  // assign pin connections
  quadstep.motor_pins(1,a1,36,a8,a9,a10); //ch 1
  quadstep.motor_pins(2,10,9,8,7,4);      //ch 2
  quadstep.motor_pins(3,22,23,24,25,26);  //ch 3
  quadstep.motor_pins(4,27,28,29,30,31);  //ch 4
 
}

//1.8deg = 1step
void loop() {
 
 
 
  // step motor 4 200 increments cw
  quadstep.motor_go(1,4,-800,6);
  delay(500);
  // step motor 4 200 increments ccw
  quadstep.motor_go(1,4,800,6);
  delay(500);
 
  // holds motor in 1 position full torque/current
  quadstep.stall(3);
  delay(5000);
}

do have basic program runs stepper , nothing else? test the basic circuit. there may problem driver or wiring.

weedpharma



Arduino Forum > Using Arduino > Motors, Mechanics, and Power (Moderator: fabioc84) > Stepper working all fine before but now the motor wont turn properly.


arduino

Comments