Robohouse ’26 Library
Contents

Chapter 5

Stepper motors from first principles

5 sections · about 7 minutes

5.1 What is inside

A hybrid stepper motor — the type in essentially every NEMA-17 you will encounter — has a rotor and a stator, and most of its behaviour comes from the geometry of the teeth.

The rotor is a permanent magnet mounted axially, with a soft-iron cup at each end. Each cup is machined with fifty teeth around its circumference. The two cups are offset from one another by half a tooth pitch, and because the magnet runs between them, one end cap is magnetically north and the other south. So going around the rotor you see fifty north teeth, and interleaved between them, fifty south teeth — one hundred teeth in total, alternating in polarity.

The stator surrounds it and carries eight poles, each wound with a coil, each pole also having several small teeth on its face. The eight coils are wired into two independent phases, usually called A and B. The two phases are positioned so that when phase A's teeth are perfectly aligned with rotor teeth, phase B's are offset by a quarter of a tooth pitch.

Energise phase A and the rotor snaps to align with it. Now de-energise A and energise B: the nearest alignment for B is a quarter tooth pitch away, so the rotor rotates by that amount. Continue through the four combinations — A positive, B positive, A negative, B negative — and the rotor advances one full tooth pitch, then repeats. With fifty teeth and four steps per tooth, you get two hundred steps per revolution, which is 1.8° each.

So 200 steps per revolution is not a software convention; it falls out of the fifty-tooth rotor geometry.

5.2 Torque, and why it falls off with speed

The torque a stepper produces is, to a good approximation, proportional to the phase current, not the voltage. Most of how stepper drivers are built follows from that.

The problem is that a motor winding is an inductor. When you apply a voltage V across an inductance L with resistance R, the current does not appear instantly; it rises exponentially with time constant L/R towards a final value V/R. A typical NEMA-17 winding might have 2–4 mH of inductance and a couple of ohms of resistance, giving a time constant of a millisecond or so.

Now consider running the motor fast. At 1000 full steps per second, each step lasts one millisecond, and the driver has to reverse the current in a winding within that time. If the time constant is also a millisecond, the current never gets close to its target before it is asked to reverse. Average current falls, and torque falls with it.

Worse, a spinning motor generates back-EMF proportional to speed, which opposes the applied voltage and further reduces the current the driver can push. Together these produce the characteristic stepper torque–speed curve: flat holding torque at zero and low speed, then a progressively steeper roll-off, until at some speed the motor cannot produce enough torque to turn its own rotor and stalls.

The remedy is voltage. If you drive the winding from a much higher voltage than V = I·R would suggest, current rises far faster, because the initial rate of rise is V/L. Then you chop the voltage on and off rapidly to regulate the average current to the value you actually want. That is what a chopper driver does, and it is why you run a 24 V supply into a driver for a motor whose windings are rated at 2 volts. Higher supply voltage buys you high-speed torque, and nothing else. Within the driver's rating, more volts is generally better.

For the VCP6, this argues for running the highest supply voltage your drivers and your thermal budget allow. The TMC2209 accepts up to 29 V, so a 24 V supply is the natural choice — it leaves margin for supply tolerance and for the voltage spikes a decelerating motor pumps back into the rail.

5.3 Microstepping, and what it does and does not give you

If instead of switching the phases fully on and off you drive them with currents that follow a sine and a cosine, the resulting magnetic field vector rotates smoothly rather than jumping, and the rotor follows it smoothly. Divide each full step into 32 increments and you have 1/32 microstepping: 6400 positions per revolution instead of 200.

Microstepping gives you two real benefits and one illusory one.

The first real benefit is smoothness. Full-stepping slams the rotor between positions, exciting the motor's mechanical resonance, producing audible noise, and — on a lightweight 3D-printed arm — visible vibration. Microstepping makes the motion continuous and quiet, which on a machine like the VCP6 is reason enough on its own.

The second real benefit is avoiding resonance. A stepper plus its load forms a resonant system, typically somewhere in the region of 100 Hz. Drive it at full steps near that rate and the oscillation can build until the motor loses steps entirely — mid-band resonance. Microstepping spreads the excitation across many small increments and largely eliminates the problem.

The illusory benefit is resolution. 1/32 microstepping does not give you 32 times the positional accuracy. The torque a stepper produces is proportional to the sine of the angular error between rotor and field. Between full-step positions, that relationship means the incremental holding torque near a microstep position is very small — roughly proportional to the sine of one microstep angle. With 1/32 microstepping, a microstep is 0.056°, and the torque available to hold that precise position is a percent or two of the motor's full holding torque. Any friction, any load torque, and the rotor simply sits somewhere else. In an open-loop system, the achievable positional accuracy is set by friction, by gearbox backlash, and by structural compliance — not by microstep count.

So: microstep for smoothness, and get your accuracy from the mechanics and from calibration. The PAROL6's quoted 0.1 mm repeatability comes from its gearboxes and its structure, not from its microstepping.

The TMC2209 also has a feature called MicroPlyer: feed it a modest step rate and it interpolates internally up to 1/256 microstepping. You get the smoothness of very fine microstepping while the controller generates a thirty-second of the pulses — a useful reduction in step-generation load across six axes.

5.4 The specific motors in a PAROL6-class arm

The PAROL6 uses NEMA-17 steppers throughout, at 1/32 microstepping, with the following reductions:

JointReduction typeRatio
J1Belt6.4 : 1
J2Planetary gearbox20 : 1
J3Planetary × belt18.1 : 1
J4Belt4 : 1
J5Belt4 : 1
J6Planetary gearbox10 : 1

The reductions do two things. They multiply torque, which is what lets a small stepper hold a 1 kg payload at 400 mm. And they multiply resolution, so that even though a microstep is a coarse thing at the motor, it is a fine thing at the joint. Chapter 13 works through the numbers.

They also introduce backlash, which is the design's real limitation. A belt drive has very little backlash but does have compliance — it stretches under load. A planetary gearbox has meaningful backlash, typically measured in arc-minutes. Neither is visible to the controller in an open-loop system: the Teensy knows how many pulses it sent, not where the joint actually is. Every source of lost motion downstream of the motor is invisible error.

5.5 A thermal warning specific to this arm

The PAROL6 is printed in PETG, and PETG softens at temperatures a stepper motor reaches without difficulty. The official documentation gives operating limits in the region of 48–61 °C for holding and 52–73 °C while moving, and explicitly tells you to reduce motor current in software for extended operation.

A stepper at its rated current, holding position, dissipates its full I²R losses continuously and gets hot enough to soften a printed motor mount. The mount then deforms, alignment goes, and accuracy degrades well before anything visibly fails.

The mitigations are, in order of usefulness: run the lowest current that reliably holds the load, use the driver's automatic hold-current reduction so that a stationary motor drops to a fraction of its running current, disable motors entirely when the arm is parked and not required to hold position, and monitor driver temperature flags so the firmware can back off before something melts. The TMC2209 gives you all of these; Chapter 7 covers IHOLD_IRUN, TPOWERDOWN, and the over-temperature warning flags.