A hobbyist in Vereeniging has built a pen plotter from aluminium extrusion and two belt driven motors, and the first test square came out the wrong size. The firmware wants one number for each axis, the steps per mm, and the driver wants its current set before the motors cook. This calculator works out both from the motor, the microstepping and the belt or lead screw; drivers and motor sizes are compared on stepper motors.
Steps per mm from three facts
A 1.8 degree motor takes 360 / 1.8 = 200 full steps a turn. The driver splits each full step into microsteps, so at 1/16 the controller sends 3200 pulses for one turn. A belt moves the pitch times the pulley teeth each turn; a lead screw moves its lead, the thread pitch times the starts. Microsteps a turn divided by mm a turn is steps per mm. Direct drive, for a turntable or rotary axis, gives steps per degree.
Worked example: the Vereeniging plotter
The calculator starts with a 1.8 degree motor at 1/16 microstepping on a 2 mm GT2 belt and a 20 tooth pulley, 100 mm a second, 1.5 A per phase on an A4988 board with 0.1 Ohm sense resistors and a 24 V supply:
| Figure | Result |
|---|---|
| Microsteps a turn | 200 x 16 = 3200 |
| Travel a turn | 2 mm x 20 teeth = 40 mm |
| Steps per mm | 80 |
| Resolution | 0.0125 mm a microstep, 0.2 mm a full step |
| Step rate at 100 mm/s | 8000 Hz |
| Motor speed | 150 rpm |
| Vref on the A4988 | 1.2 V at the full 1.5 A, 0.96 V at 80% |
A 0.2 mm full step is coarser than 0.1 mm, so the calculator flags it.
More microsteps, more pulses to send
On the same belt, full steps give 5 steps per mm and 500 Hz at 100 mm/s; 1/4 gives 20 and 2000 Hz; 1/16 gives 80 and 8000 Hz; 1/32 gives 160 and 16,000 Hz. An 8 mm lead screw at 1/16 gives 400 steps per mm, 40,000 Hz and 750 rpm at the same speed, tripping both warnings. Somewhere around 20 to 40 kHz a slow microcontroller or a busy loop stops keeping up, and torque falls as the motor spins faster.
Setting the driver's current
The A4988 sets current with Vref = I x 8 x Rsense, and the common DRV8825 module uses Vref = I / 2. Sense resistors differ between driver boards, so read the value off yours and check the board's own documentation. A TMC2209 is set over UART or by a Vref formula in its datasheet. Starting at 70 to 90% of the rated current keeps motor and driver cooler; the calculator shows 100% and 80%. The Mega with a RAMPS shield is a common controller for machines like this.
Frequently asked questions
How do I calculate steps per mm for a lead screw?
Divide the microsteps a turn by the screw's lead. A 1.8 degree motor at 1/16 gives 3200 microsteps a turn; on an 8 mm lead that is 400 steps per mm. A 2 mm pitch, four start screw has an 8 mm lead.
Why does my stepper motor miss steps?
Too much speed or acceleration, too little current, too low a supply voltage, or an axis that binds. Lower the acceleration first, then check the current and turn the axis by hand to feel for tight spots.
Does more microstepping make a machine more accurate?
It makes the motion smoother and quieter, but each microstep holds less torque and is not an exact position. Real accuracy stays close to a full step, so a smaller pulley or a lead screw does more for precision than 1/256.
Who will quote me for stepper motors and drivers in Vereeniging?
Independent electronics suppliers and component distributors who deliver to the area. Send one request with the motor size, the current, the driver and the quantity, and they quote you directly; we pass the request on and sell nothing ourselves.
Read more
More tools
- Resistor colour codeFour, five or six colour bands, or a value, tolerance and band count: the resistance, its tolerance range, the bands in order and the nearest E12 and E24 values
- LED resistor calculatorSupply voltage, LED colour or forward voltage, current and LEDs in series: the exact resistor, the nearest E12 and E24 values, the current they give and the power rating
- Voltage divider calculatorInput voltage and two resistors, or the highest input and a safe output: the output voltage, ratio, current, power in each resistor, an E24 pair and the ADC step at the input
- Battery life calculatorBattery capacity, usable share, awake and sleep currents, awake time and wakes per hour, and an optional solar panel: average current, hours, days and whether the panel keeps up
- PCB trace width calculatorCurrent, copper weight, temperature rise, layer and trace length: the minimum width in mm and mil, the trace's resistance, voltage drop and power lost
- Board pickerLogic voltage, pins, analogue inputs, radio, camera, Linux, battery and the kind of job: a short list of three board families with a reason for each
- PLC I/O calculatorField devices, spare capacity and module sizes: digital and analogue I/O counts with spare, the modules to fit and the points left free
