Steps per millimetre, step frequency, maximum speed and driver current setting
The maximum speed is an estimate based on the time the current takes to reach its value in each coil; the actual torque at speed is given by the manufacturer's torque–speed curve. Check the sense resistor on your board: there are A4988 modules with 0.05, 0.1 and 0.2 Ω.
A stepper motor turns a fixed angle, a step, every time the driver changes the current in its coils in the right order. The most common, the 1.8° hybrid (200 steps per revolution) in NEMA 17 size, is used in 3D printers, CNC machines and positioners. Since each step is a known angle, the position is known by counting steps, with no sensor, as long as the motor does not miss any.
With a belt, the travel per revolution is the number of pulley teeth times the belt pitch (a 20-tooth GT2 pulley travels 40 mm). With a leadscrew, it is its lead: 8 mm per revolution for four-start T8 trapezoidal screws.
Instead of switching the coils on and off, the driver shares the current between both following a sine shape, and the rotor settles in intermediate positions. With 1/16, 3200 positions per revolution are obtained. Motion is much smoother and quieter and resonances are reduced, but the real accuracy of each microstep is lower than it seems and the torque per microstep is small: microstepping improves smoothness more than accuracy.
A stepper's torque falls as speed rises, because the coil inductance prevents the current from reaching its value before switching to the next step. An estimate of the limit is the current rise time:
That is why current (chopper) drivers work with supply voltages well above the motor's rated voltage, 12, 24 or 48 V, and limit the current themselves. If more torque or speed is demanded than the motor can give, it misses steps and the counted position no longer matches reality. Acceleration ramps and a torque margin of 30 to 50 % prevent it.
The A4988 and DRV8825 drivers limit the coil current according to a reference voltage Vref, set with a potentiometer and measured between the wiper and ground. On the A4988, I = Vref / (8 · RS); on the DRV8825, I = Vref / (5 · RS). It is usually set between 70 and 90 % of the motor's rated current so that it does not overheat. TMC drivers (TMC2208, TMC2209) are set the same way with Vref or via UART, with formulas specific to each board.
Related: DC motors with an H-bridge, servo motors, ULN2803 and PWM calculator.