# Unable to get desired speed with nema 17 stepper motor and tb6560 driver.

Hello to all team members.
We are going to design a robotic arm. we are using Nema 17 stepper motor and tb6560 driver to drive the motor. For driving and controlling, we are utilizing AccelStepper lib. As this lib calculating all the speed parameters based on steps for seconds. Now coming to the main problem we want to move the arm first 90 degrees and then again moved it to the initial position mean at just starting position in less than a second. In fact, we need to move 180 degrees in less than a second. Following is our rough calculation to evaluate the desired parameters.
Our stepper motor will have 200 steps for a complete cycle or revolution or 360'
For 90' degree movement we will have 360/4 = 50 steps.
Suppose our arm is standing along the y-axis and now we want to move 50 steps mean 90 degrees clockwise and then returning it to this initial position we have to move 50 steps in the opposite direction (counter-clockwise).
total steps need for one cycle of arm is 50 + 50 = 90 steps
Lets we want to complete these steps in 0.7 sec
so our speed for first 90' degrees movement will be
speed = 50 / 0.35 = 143 (steps/sec)
and
acceleration will be
Acceleration = ( 50 ) / (0.35*0.35) = 408 steps/sec(square)
Setting the above parameters in our sketch and running the sketch though we get the working motors and the arm movement mean first 90 and then again 90 degrees in opposite direction, we are unable to get the desired speed at which the arm movement should move to mean completing the 180 in less than a second (in our case we assumed 0.7 ).
We have no idea what to do to achieve the desired speed or we are missing something in calculating the parameters. any help would be appreciated.

"NEMA 17" tells us nothing useful about the motor, nor have you posted any useful details about your system.

I suspect that you have chosen motors that cannot provide the torque and power required to move the arm at the speeds you wish to achieve.

Post the details of your design and mechanical analysis.

Thank you for time and keen interest. we have calculated all the parameters mean the power and torque based on our weight and other assumptions and then we select this motor. For now, we have the issue of the speed that we are facing and we are unable to complete the cycle less than a second. Our main concern is speed correction. If the calculation is necessary for the resolving of the problem I will paste it here.
Best regard

Your speed and acceleration calculations do not give confidence in your team's abilities.

speed = 50 / 0.35 = 143 (steps/sec)

This is the average speed required. Speed starts at zero steps per second. Naturally, the maximum speed must be higher than the average.

Overall strategy of move: ramp up to speed higher than average, run, ramp down to stop. Choose ramp up/down times wisely.

Acceleration = ( 50 ) / (0.35*0.35) = 408 steps/sec(square)

Nope. Since start speed = zero,
(initial acceleration) = (maximum speed)/(desired time from zero to maximum speed)