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

Hi I’m using Arduino mega 2560 and quad stepper motor driver from spark fun using this stepper motor(Pololu - Stepper Motor: Bipolar, 200 Steps/Rev, 42×38mm, 2.8V, 1.7 A/Phase). I was running a code where the motor makes one full clockwise rotation and then a full anti clockwise rotation and then stalls for five seconds. the first link to the video is the successful working of the motor (Stepper motor making complete rotations - YouTube). the second video show how it stopped working after two days when with all the same wiring, code and power(Stepper motor not turning properly - YouTube). what could be the problem here ? the wiring is the same as it was before. I have changed the motor, still the same. Used the quad stepper example code still the same. Changed the channel from 3 to 1 still the same. what could be the issue here ? I’m posting the code below.

#include <SparkFunQuadstep.h>

// create an instance of the class motor

quadstep quadstep;

void setup() {
 
  // assign the 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 for 200 increments CW
  quadstep.motor_go(1,4,-800,6);
  delay(500);
  // step motor 4 for 200 increments CCW
  quadstep.motor_go(1,4,800,6);
  delay(500);
 
  // holds the motor in one position with full torque/current
  quadstep.stall(3);
  delay(5000);
}

Do you have a basic program the simply runs the stepper and does nothing else? This is to test the the basic circuit. There may be a problem with the driver or wiring.

Weedpharma

hi Weedfarma, yes I have tried the basic program and it’s not running with that as well.
This is the basic program

#include <SparkFunQuadstep.h>

// create an instance of the class motor
quadstep quadstep;

void setup() {
  
  // assign the 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 for 200 increments CW
  //quadstep.motor_go(1,1,-200,5);
  //delay(500);
  // step motor 4 for 200 increments CCW
  quadstep.motor_go(1,4,800,5);
  delay(500);

Do not cross-post. Other thread removed.

[quote author=Coding Badly link=msg=2401376 date=1442551375] Do not cross-post. Other thread removed.

[/quote]

thanks and sorry I didn't knew that was the wrong section to post the question.

martin3498637: show how it stopped working after two days when with all the same wiring, code and power

Does this mean that all the wiring and connections were undisturbed for two days?

Or might it mean that you think you made all the connections the same when you tried it the second time ?

...R

Hi, Someone hasn't turned the current limit down on your power supply? Do you have a DMM, measure the DC supply to the stepper board while it is malfunctioning.

Tom.... :)

the second video show how it stopped working after two days when with all the same wiring, code and power

There are only two possible explanations for this:-

1) You are fooling yourself and it is not the same.

2) A component failed in your setup through either bad design or bad luck.

Might not be the problem but it is not a good idea to use either pin 0 or pin 1 to interface to.

Robin2: Does this mean that all the wiring and connections were undisturbed for two days?

Or might it mean that you think you made all the connections the same when you tried it the second time ?

...R

no the wirings were untouched but were relocated from one location to another but the wires and everything stayed intact. what do you reckon might have been the problem then ? Current Voltage issue ?

TomGeorge: Hi, Someone hasn't turned the current limit down on your power supply? Do you have a DMM, measure the DC supply to the stepper board while it is malfunctioning.

Tom.... :)

Hi Tom, I have a DMM but TBH, I'm a bit noob with electronics, how do I measure that ? the volatge supply was 12volts which i checked on the DMM.

Grumpy_Mike: There are only two possible explanations for this:-

1) You are fooling yourself and it is not the same.

2) A component failed in your setup through either bad design or bad luck.

it is the same one, I have tried finding out by changing the motor, running in the basic code, changing the channel, short testing all wires. The next thing I'm planning is changing the driver board. what do you reckon i should do ?

Are you using solder less bread board? They are notorious for having bad / intermittent connections.

A video of a motor does not give any help in the problem. Post a clear photo of the full project showing all connections.

Weedpharma