Supply rating for a stepper driver

There has been some recent discussion on the current rating of the power supply to run a microstepping driver, such as the DRV8825 or DM542 type. As there seems to be diverging views, and on the basis that an ounce of experiment is worth a ton of theory, I have done some experiments with a DRV8825 type that I use in the controller of my milling machine x-axis power feed. This actually has 2 axes, the second one being available to drive a rotary axis for example. The unit has a Uno, a CNC shield rev3, HC06 Bluetooth module, and a 24v/2A, 5V 4A supply for the stepper and Uno. The unit uses the Pololu 8825 carriers

For the experiments I disconnected the internal 24v and ran the drivers from a 0 - 20v bench power supply, measuring the current with a DMM. I ran tests at 12, 15, 20.8 (max of PSU), and 24v (using the internal supply). For each I ran the axis at 150mm/min to make sure the steppers were doing some work. For each voltage I measured the Vref on the current adjustment pot and verified that actually it was constant at ~0.5v. The Pololu instructions here:

give a formula for the winding current which is Vref = Current/2. So for Vref = 0.5V the current is 1 amp/phase.

The table below gives the measured supply currents for the various voltages. One can see from the DMM display that actually the current is fluctuating quite a lot so one has to "eyeball" a mean.

Volts Current (A) Supply power (W)
12 0.20 2.4
15 0.18 2.7
20.8 0.16 3.33
24 0.18 4.32
I guess the most obvious observation is that the supply current is only about a 5th of the winding current. The actual power consumed is roughly the same though the 24v value is an outlier.

At first sight the fact that I have a 2A 24v supply rail seems inadequate. When I built the unit though these are the kind of numbers that I expected (actually they are lower than I expected) so I reckoned that 2A would be more than adequate.

These measurements show that at least for this type of current-controlled microstepping driver the approach sometimes recommended, where you take the set phase current, double it for 2 phases, and choose a power supply with the resulting current rating, can greatly overestimate the required current. A better approach is as follows (based on my example).

  1. From the winding resistance and the required current, compute the power needed. This has a twist since the two coils are driven in quadrature. Held at a whole step, one winding has the set current through it and the other has zero. If the rotor rotates half a step, the first phase current is reduced to 1/root(2) = 0.7071 of the peak and the second phase current is set to the same value. The total current is now root(2) x the single winding current - this is the maximum current draw.

  2. Now calculate the maximum power needed from I^2 * R for each winding. My stepper has a coil resistance of 2.3 ohms, so it works out the power per winding is 1.15W, total power is 2.3W.

  3. These stepper drivers, if one looks at the outline schematics for the output stage, essentially work as buck converters, stepping down the supply voltage to the winding by PWM'ing the voltage to the motor. This diagram shows just one side of the H bridge.


    There's a big cap C to smooth the current pulses; a MOSFET to switch the voltage to the coil, which has an inductance and resistance; and a commutating switch which is represented by a diode. On the other side the winding is connected to ground through a switch which would usually be a MOSFET. (Actually the commutating diode would then also be a MOSFET.)

The MOSFET is turned on and off by a PWM signal. When the MOSFET is on it feeds current into the winding; when it switches off the current continues to circulate through the commutating diode. By adjusting the PWM duty cycle the equilibrium current in the winding can be adjusted - for example to obtain a sinusoidal waveform for microstepping. The PWM switching is operating much faster than the actual stepping rate. While the MOSFET is on it increases the current in the inductor, and therefore the stored energy, to compensate for the decay when it is off. This is operating exactly like a buck converter - ideally all the power from the DC supply is delivered to the winding resistance. The power absorbed from the supply will be VDC x supply current and that has to equal the voltage dropped on the winding resistance x winding current - since the second voltage is much smaller then the first, the first (average) current is much smaller than the second.

Provided that the experiments follow scientific and engineering principles that ensure statistical validity and eliminate experimenter bias.

Also with something like a MOSFET, if you don't have the lab equipment that it takes to make certain critical measurements, then it's not possible to determine some things reliably.

With a bipolar motor, both coils always draw current, either forward or reverse, not ON or OFF like a unipolar.

just my thinking, maybe not 100% ......
Maybe you know this already....a stepper is not a normal rotating motor.
they are not buck converters, they have coils to make a magnetic field (Lorenz force)

With PWM you can set the speed. You try to make a sinusoidal wave form that is how synchron motors work but then it is not a stepper anymore, it does not step...
A steppermotor steps. This is done by switching the coils on/off , or switching on/off in small steps
Full step (200 steps/rev) coils on off.
So you cannot calculate the consumed power by just calculating the given amps.
The maximum current of a coil is given to prevent burning out.

there are (I have) NEMA17 steppers 1.5A / 0.44Nm and 2.5A / 0.44 Nm
so both have the same torque but different amps. Why..
2.5A you can run faster because they have less windings (thicker wire) so you can switch faster on/off

on page 4 is something what looks the same as your idea.

Actually that is not correct, when the motor is at a "full and half step" positions, only one winding is energised. At intermediate positions if microstepping the currents have intermediate values.

Buck converters have coils too, the motor uses its coil inductance to enable switching drive.

Well I just showed a calculation where I did just that, with a result that was pretty close.

In microstepping the currents at each microstep vary in proportion to the sine / cosine of the angular difference from full step position. Actually some advanced motor controllers adapt to essentially sinusoidal "synchronous" drive at high speed.

In many places is it is explicitly stated that this is the winding current for rated torque.

Indeed, lower resistance and possibly lower inductance.

An interesting reference from Toshiba, the TI DRV8825 data sheet is also very informative.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.