Please describe the project in detail, as it may not even be possible.
If it’s not possible we are getting a few more Arduinos and we’ll just have the operator push one button after another, it looks like that will be a fine Plan B.
What steppers, and what stepper power supplies?
I am using one Nema 17 now, I do not have its data sheet but it works great with the Pololu libray example download for a serial controller. Other steppers are on order with the actuators. Here is the sketch:
void resetCommandTimeout()
{
tic.resetCommandTimeout();
}
// Delays for the specified number of milliseconds while
// resetting the Tic's command timeout so that its movement does
// not get interrupted.
void delayWhileResettingCommandTimeout(uint32_t ms)
{
uint32_t start = millis();
do
{
resetCommandTimeout();
} while ((uint32_t)(millis() - start) <= ms);
}
void loop()
{
// Move forward at 200 steps per second for 2 seconds.
tic.setTargetVelocity(800000000); (I increased this number, it worked fine, I had to increase the "maximum" number on the Pololu Tic with the control panel)
delayWhileResettingCommandTimeout(9000); (I increased this number too)
// Decelerate to a stop.
tic.setTargetVelocity(0);
delayWhileResettingCommandTimeout(9000); (I disabled deceleration and acceleration, it is not suitable to my use)
// Move in reverse at 100 steps per second for 1 second.
tic.setTargetVelocity(-80000000);
delayWhileResettingCommandTimeout(9000);
// Decelerate to a stop.
tic.setTargetVelocity(0);
delayWhileResettingCommandTimeout(1000);
}
Which motor drivers do you have in mind?
I am using a Pololu Tic 500
.
What will the steppers be doing and how quickly must they step?
I need 2 or 3 revolutions per second. They will be driving a linear actuator, there seems to be plenty of power, I’ve already run it with the UBS control and it’s fine.
How many steppers will be active at the same time?
Only one
What is “one Pololu”?
Sorry, ONE Tic 500
uses the TX and RX pins and there are no more of them.
The Arduino Mega has four serial ports.
Yes, the info I said told me only to use the TX and RX pins, of which there are only 2.
PLEASE give me some information about what the setTargetVelocity and the
delayWhileResettingCommandTimeout commands actually do!
Thank you!
Aryeh