Stepper motors not running

Hello,

I am currently working on a XY plotter using two stepper motors. For that I downloaded Arduino version 1.0.6, and <MultiStepper.h> class. Even though I have successfully uploaded the code to Arduino board, the motors doesn't move. The reason for using an old version of Arduino is <MultiStepper.h> is not available for latest Arduino versions.

Can someone suggest me what would have been the problem here. Thanks in advance.

// MultiStepper.pde
// -*- mode: C++ -*-
// Use MultiStepper class to manage multiple steppers and make them all move to 
// the same position at the same time for linear 2d (or 3d) motion.
#include <AccelStepper.h>
#include <MultiStepper.h>
// EG X-Y position bed driven by 2 steppers
// Alas its not possible to build an array of these with different pins for each :-(
AccelStepper stepper1(AccelStepper::FULL4WIRE, 8, 9, 10, 11);
AccelStepper stepper2(AccelStepper::FULL4WIRE, 4, 5, 6, 7);
// Up to 10 steppers can be handled as a group by MultiStepper
MultiStepper steppers;
void setup() {
  Serial.begin(9600);
  // Configure each stepper
  stepper1.setMaxSpeed(100);
  stepper2.setMaxSpeed(100);
  // Then give them to MultiStepper to manage
  steppers.addStepper(stepper1);
  steppers.addStepper(stepper2);
}
void loop() {
  long positions[2]; // Array of desired stepper positions
  
  positions[0] = 1000;
  positions[1] = 50;
  steppers.moveTo(positions);
  steppers.runSpeedToPosition(); // Blocks until all are in position
  delay(1000);
  
  // Move to a different coordinate
//  positions[0] = -100;
//  positions[1] = 100;
//  steppers.moveTo(positions);
//  steppers.runSpeedToPosition(); // Blocks until all are in position
//  delay(1000);
}

Maybe just try to use the built-in stepper library, then work out how to wire your steppers first. After you get them working, go to the MultiStepper library.

are you useing an external power supply? i dont think the arduino has the power to drive more than one.

tila_76:
I am currently working on a XY plotter using two stepper motors. For that I downloaded Arduino version 1.0.6, and <MultiStepper.h> class. Even though I have successfully uploaded the code to Arduino board, the motors doesn't move. The reason for using an old version of Arduino is <MultiStepper.h> is not available for latest Arduino versions.

Can someone suggest me what would have been the problem here. Thanks in advance.

There is so much you have not told us that I don't know where to start.

  • Post a link to the datasheet for your stepper motors
  • What stepper motor drivers are you using?
  • How are you powering your motors (volts and amps from power supply)?
  • Have you been able to get a single motor working with a short program?

...R
Stepper Motor Basics
Simple Stepper Code

kau_cinta_ku:
are you useing an external power supply? i dont think the arduino has the power to drive more than one.

The Arduino doesn't have the current supply capabilities to drive more than 0.01 steppers.

Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Thanks.. Tom... :slight_smile: