Step Motor Help

I have attached a script that runs with the current sim program and I was looking to see if their was anyone who could right a sketch to run three step motors. I am purchasing the Step motor driver to run the Arduino Uno R3. I watched a video Zentools using a micro stepper Tb6560: ZTW Arduino-Driver Tutorial - YouTube

If their is an easier sketch that can get me a full rotation on all 3 axis's or get me started. My Arduino is connected by USB to my pc. the attachment is for DC motors but watching his connection their has to be a way to get it to work with the program.

I am not a program language guy and I am at the most basic level of understanding this.

Any help to get me started would help.

Script.ino (59.6 KB)

I was looking to see if their was anyone who could right a sketch to run three step motors.

"To run three steppers" is way too vague a requirement to even consider how to implement.

What input do you expect? How does that input relate to the number of steps that one of the steppers is to take?

Well the input is Binary and I am looking to get a full 360 out of all three axis points X, Y,Z. The software is already reading the telemetry of the software that is running and it is sending the data through Com3 to the Arduino to run 3 DC motors but they are weak in torque and I would like to run three step motors of the Arduino plugged into a 6amp motor driver and not the 2.5 amp shown in the video. The code that I attached works well with the dc motors.

Since I an new to this in some ways I am trying to work backwards. Like stated above the Arduino is running 3 dc motors with the attached code and the software that I am using to get telemetry. The question is can the stepper motor set up in the video be in some way linked to the code already provided with minor changes to the language.

Start by looking at the MultiStepper example of the AccelStepper library.

king1hw:
I was looking to see if their was anyone who could right a sketch to run three step motors.

If you want someone to write a program for you then you should ask in the Gigs and Collaborations section and be prepared to pay.

If you are not sure about things then I suggest you hold off buying motors and drivers until you are sure the motor is suitable for your project and the driver is suitable for your motor.

And, as @PaulS has said you will need to provide a great deal more information about what you want the project to do.

...R
Stepper Motor Basics
Simple Stepper Code

Loaded the library where to next.

Pick the right motor (torque and power) for the task, then pick the appropriate motor driver and motor power supply.

Why are you doing this project? Is someone forcing you to do it against your will?

-jim lee

well I am working on a full motion flight simulator for FSX DCS and Cliffs of Dover il2 BOS and BOM. I need a code that will work with step motors for the high torque the produce. The dc motors are not strong enough and AC costs are off the chart. The program is already connected to the games and I am using to run tests a ZTW TB6560 Motor Driver on a NEMA 34 HST 927oz High torque step motor. connected to the Arduino. The only thing that I am missing is the sketch to run them:

#include <AccelStepper.h>

//AccelStepper Xaxis(1, 2, 5); // pin 2 = step, pin 5 = direction
//AccelStepper Yaxis(1, 3, 6); // pin 3 = step, pin 6 = direction
//AccelStepper Zaxis(1, 4, 7); // pin 4 = step, pin 7 = direction

AccelStepper Xaxis(1, 3, 6); // pin 3 = step, pin 6 = direction
AccelStepper Yaxis(1, 4, 7); // pin 4 = step, pin 7 = direction
AccelStepper Zaxis(1, 5, 9); // pin 5 = step, pin 8 = direction

void setup() {
Xaxis.setMaxSpeed(400);
Yaxis.setMaxSpeed(400);
Zaxis.setMaxSpeed(400);
Xaxis.setSpeed(45);
Yaxis.setSpeed(25);
Zaxis.setSpeed(80);
}

void loop() {
Xaxis.runSpeed();
Yaxis.runSpeed();
Zaxis.runSpeed();
}

Please read the "How to use this forum" post and carefully follow the directions.

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom... :slight_smile:

Sorry just used quick reply and the option is not available:

#include <AccelStepper.h>

//AccelStepper Xaxis(1, 2, 5); // pin 2 = step, pin 5 = direction
//AccelStepper Yaxis(1, 3, 6); // pin 3 = step, pin 6 = direction
//AccelStepper Zaxis(1, 4, 7); // pin 4 = step, pin 7 = direction

AccelStepper Xaxis(1, 3, 6); // pin 3 = step, pin 6 = direction
AccelStepper Yaxis(1, 4, 7); // pin 4 = step, pin 7 = direction
AccelStepper Zaxis(1, 5, 9); // pin 5 = step, pin 8 = direction

void setup() {
  Xaxis.setMaxSpeed(400);
  Yaxis.setMaxSpeed(400);
  Zaxis.setMaxSpeed(400);
  Xaxis.setSpeed(45);
  Yaxis.setSpeed(25);
  Zaxis.setSpeed(80);
}

void loop() {  
   Xaxis.runSpeed();
   Yaxis.runSpeed();
   Zaxis.runSpeed();
}