So my problem is that I have 3 steppers and using the Accel Library I tried to make them move simutanousley, first of all two steppers move at the same time then a third one continues to rotate,
However when I upload the code and the program starts running the steppers start to vibrate, like they are struggling to rotate and throughout the program the steppers will vibrate in place for a certain amount of time and then continue to rotate. Also as it is vibrating it is also counting those little movements as steps.
These steppers are rated 2.5 A and I am using a 12v power supply along with a motor controllers and arduino.
Here is the motor controller that I am using:
Here is the stepper that I am using:
Here is the code that I am using:
// MultiStepper.pde
// -*- mode: C++ -*-
//
// Shows how to multiple simultaneous steppers
// Runs one stepper forwards and backwards, accelerating and decelerating
// at the limits. Runs other steppers at the same time
//
// Copyright (C) 2009 Mike McCauley
// $Id: MultiStepper.pde,v 1.1 2011/01/05 01:51:01 mikem Exp mikem $
#include <AccelStepper.h>
// Define some steppers and the pins the will use
AccelStepper stepper1(AccelStepper::FULL4WIRE, 5, 4, 3, 2);
AccelStepper stepper2(AccelStepper::FULL4WIRE, 9, 8, 7, 6);
AccelStepper stepper3(AccelStepper::FULL4WIRE, 13, 12, 11, 10);
void setup()
{
stepper1.setMaxSpeed(200.0);
stepper1.setAcceleration(200.0);
stepper1.moveTo(10000000);
stepper2.setMaxSpeed(300);
stepper2.setAcceleration(100.0);
stepper2.moveTo(600);
stepper3.setMaxSpeed(300);
stepper3.setAcceleration(100.0);
stepper3.moveTo(700);
}
void loop()
{
// Change direction at the limits
if (stepper3.distanceToGo() == 0)
stepper1.run();
stepper3.run();
stepper2.run();
}