Used stepper motors getting stuck while turning, loosing steps.

Hello,

I was tight on budget so I bought used stepper motors from a local supplier. They have a rating of 1.2a per motor as it is written on the back of the motor. I was connecting 10 stepper motors together so I used a 12.5 amp 12v switching power supply. But as I turned it on it started smoking and it burnt the power supply wires connected to the circuit.

I started checking individual motors so I got to know that they are getting stuck while moving and loosing steps as well. Is there a way to fix this? Or it would be something that I am doing?? Or are the motors damaged.

Here is a link to the gif as I couldn't get to upload it here for some reason:
Dropbox file gif

Looking forward to a reply.

Post pictures here so we don't have to go to another website. See this Image Guide

It is not at all clear from your description what wires failed.

It is also completely unclear how the 10 steppers are connected or what stepper motor drivers you are using or what program code you are using. You don't even say what Arduino board you are using.

...R

Okay, I will try to be more descriptive here.
I am using an Arduino mega board and controlling the motors using A4988 stepper drivers.
The motor rating is 5.0V 1.2A according to the back sticker of the motor. I needed high speed so I was running it at 12V. The code uses AccelStepper library to run it.

I am currently testing one motor at a time so I am using a 12V 2A adaptor. Most of the motors while moving get stuck and looses steps. Out of 15 motors only 3 motors are running smoothly. I tried attaching a video of the problem but the file is 15mb so I had to use an external source.

The circuit has a limit switch attached as well(not shown here). The idea is that the motor first starts rotating in one direction until the limit switch is pressed and sets the position as zero, then it waits for the input value which we give it through the serial monitor and the motor moves to that position. I have attached the code here as well.

/*  Motor Homing code using AccelStepper and the Serial Monitor

#include "AccelStepper.h" 

// AccelStepper Setup
AccelStepper stepperX(1, 2, 3);   // 1 = Easy Driver interface
                                  // NANO Pin 2 connected to STEP pin of Easy Driver
                                  // NANO Pin 3 connected to DIR pin of Easy Driver

// Define the Pins used
#define home_switch 4 // Pin 9 connected to Home Switch (MicroSwitch)

// Stepper Travel Variables
long TravelX;  // Used to store the X value entered in the Serial Monitor
int move_finished=1;  // Used to check if move is completed
long initial_homing=1;  // Used to Home Stepper at startup


void setup() {
   Serial.begin(9600);  // Start the Serial monitor with speed of 9600 Bauds
   
   pinMode(home_switch, INPUT_PULLUP);
   
   delay(5);  // Wait for EasyDriver wake up

   //  Set Max Speed and Acceleration of each Steppers at startup for homing
  stepperX.setMaxSpeed(100.0);      // Set Max Speed of Stepper (Slower to get better accuracy)
  stepperX.setAcceleration(100.0);  // Set Acceleration of Stepper
 

// Start Homing procedure of Stepper Motor at startup

  Serial.print("Stepper is Homing . . . . . . . . . . . ");

  while (digitalRead(home_switch)) {  // Make the Stepper move CCW until the switch is activated  
    Serial.println(digitalRead(home_switch)); 
    stepperX.moveTo(initial_homing);  // Set the position to move to
    initial_homing++;  // Decrease by 1 for next move if needed
    stepperX.run();  // Start moving the stepper
    delay(50);
}

  stepperX.setCurrentPosition(0);  // Set the current position as zero for now
  stepperX.setMaxSpeed(100.0);      // Set Max Speed of Stepper (Slower to get better accuracy)
  stepperX.setAcceleration(100.0);  // Set Acceleration of Stepper
  initial_homing=-1;

  while (!digitalRead(home_switch)) { // Make the Stepper move CW until the switch is deactivated
    Serial.println(digitalRead(home_switch)); 
    stepperX.moveTo(initial_homing);  
    stepperX.run();
    initial_homing--;
    delay(50);
  }
  
  stepperX.setCurrentPosition(0);
  Serial.println("Homing Completed");
  Serial.println("");
  stepperX.setMaxSpeed(1000.0);      // Set Max Speed of Stepper (Faster for regular movements)
  stepperX.setAcceleration(1000.0);  // Set Acceleration of Stepper

// Print out Instructions on the Serial Monitor at Start
  Serial.println("Enter Travel distance (Positive for CW / Negative for CCW and Zero for back to Home): ");
}

void loop() {

 while (Serial.available()>0)  { // Check if values are available in the Serial Buffer
   TravelX= Serial.parseInt(); 
   
    Serial.print("Moving stepper into position: ");
    Serial.println(TravelX);
  
  stepperX.moveTo(TravelX);  // Set new moveto position of Stepper
  
  delay(1000);  // Wait 1 seconds before moving the Stepper
  
     if (stepperX.distanceToGo() != 0) {
      Serial.println("Distance to go:  ");
    Serial.println(stepperX.distanceToGo());
     Serial.println("\n");
    stepperX.runToPosition();  // Move Stepper into position
     }
     
  if ((move_finished == 0) && (stepperX.distanceToGo() == 0)) {
    Serial.println("COMPLETED!");
    Serial.println("");
     Serial.println("Enter Travel distance (Positive for CW / Negative for CCW and Zero for back to Home): ");
    move_finished=1;  // Reset move variable
  }
  
 while (Serial.available()>0)  {
  move_finished=0;  // Set variable for checking move of the Stepper
  
  TravelX= Serial.parseInt();  // Put numeric value from buffer in TravelX variable

 }
}
  }

homing_stepper_CCW_v0.1.ino (3.73 KB)

To what value did you set the current limit on the A4988 driver?

Image from Reply #2 so we don't have to download it. See this Image Guide

...R

Zohaa_Irshad:
I am currently testing one motor at a time so I am using a 12V 2A adaptor. Most of the motors while moving get stuck and looses steps. Out of 15 motors only 3 motors are running smoothly.

You need to approach this logically. If you are testing motors one at a time with the exact same code and the exact same hardware and some work and some don't then the motors are not all the same. You need to segregate them and try to identify the differences.

Have you the current limit set correctly on all of the A4988 drivers? They are not set to a standard in the factory.

The circuit has a limit switch attached as well(not shown here). The idea is that the motor first starts rotating in one direction until the limit switch is pressed and sets the position as zero, then it waits for the input value which we give it through the serial monitor and the motor moves to that position.

If you are having problems with basic motor movement DO NOT complicate things with limit switches or changes of direction.

...R
Stepper Motor Basics
Simple Stepper Code

Robin2:
Have you the current limit set correctly on all of the A4988 drivers? They are not set to a standard in the factory.

Yes, I have set the current limit on A4988. The motors are manufactured from the same company according to the stickers and have the same current and voltage rating written on all of them. They are all similar in shape and sizes as well. That is why was using the same circuit to test all...
Okay I will test the motors without the limit switches as well. I hadn't done this yet.

jremington:
To what value did you set the current limit on the A4988 driver?

I have set it to 0.85v according the formula given on this website

I learned something that those tutorials don't tell us about. If the motor supply voltage isn't connected up, then that prevents us from setting the current limit.

click here...

Southpark:
If the motor supply voltage isn't connected up, then that prevents us from setting the current limit.

I was adjusting the current on an A4988 a few days ago and it made no difference whether the motor supply was connected or not - I specifically tried both situations.

It could be that a DRV8825 is different.

...R

Zohaa_Irshad:
They are all similar in shape and sizes as well.

IE they are all different motors... The current rating doesn't tell you much about the performance, that's
in the datasheet for the exact motor variant.