I have an easydriver pcb up running on a stepper motor with 1,8degree per step.
to this motor I hav attached a nut on a thread with a pitch 4 mm per revoultion. So then movement paralell to nut axis will be x = step/50
It was easy to get it to move to a correct position, but in addition I would also move at a given rate mm/s. How can I do this?
rate = rpm*4/60
Correct me if these formula is wrong… How fast can I step??
Step rate will depend on the motor and the voltage (I think) The coils have to pull the rotor to the next position and the stronger the field the faster you can go, to some limit depending on hardware.
There are two speeds one is the stall speed, that is how fast you can go from a standing start. The second is the run speed, that is how fast you can go if you are already moving. The stall speed is always slower so that to get up to the maximum speed you have to ramp up to it. The same applies to stopping, you have to ramp down to a speed that you can stop dead from, if you want to get the maximum speed.
In any real system this depends on the load on the motor and the toque the motor will delver. The toque is dependent on the coils, the permanent magnet strength and the current you are putting through it. The current of course depends on the voltage and the stepping rate.
So you have a whole heap of things that you don’t know.
In practice you should experiment at how fast you can go and ramp up without missing pulses. You can usually here when a pulse is missed as it sounds like a bit of chatter but a better test is to send the motor one way for a bit, then give it the same number of pulses coming back and see how far off the start you are. This will also be subject to backlash in the gears, but the backlash will be constant, independent of the number of pulses where as the missing pulses will be dependent on how many you produce.
So when you get a constant error in the return position you know that you have no missing pulses and you are safe to go at that speed. Then just back it off 20% for safety.
Hope that helps.