Hy!
I'm making a 6 axis robot arm that has stepper motors powering the links. The robot arm has attached some limit switches for homing purposes. This whole robot arm is controlled by an Arduino Mega, and then for each motor there is a stepper motor driver (CL57T).
The variables for the motors are sent via serial. The first variable is the position for each motor wich is recieved in radians, then easily converted in steps, taking into consideration the microstepping, the gear reduction of the motor and the gear reduction of that specific link (motors are connected to a coupling and then via belt to the driven gear of that specific link).
Until now everything works great, tested each motor individually and they work perfectly.
I'm having problems running all the 6 steppers in parallel with the Arduino. They dont need to be coordinated (like not all motors need to be in position at the same time), they should have different speeds and the only condition is that they should start at the same time. I'm recieving the speed in radians per second and I can convert it in steps per second, but after that i dont know how to run the motors according to the speed and in parallel.
I am controlling the motors with pulses HIGH, LOW, delay repeat. The only way to control the speed is by changing that delay.
If you have any solutions, any libraries that might help or info on this problem I would be so glad to hear it.
Thanks!