I am running a bipolar stepper driver from one of Pololu's DRV8825 stepper driver boards. I have followed the recommended minimum wiring diagram, with a 220uF capacitor right across the input and another 470uF cap a few centimeters away.

I set my power supply to 20V. Stays right at 20V while the motor accelerates. However, when the motor is cruising at about 6000 steps/sec (30 rps), the voltage shows spikes to about 25V long enough to register on the power supply voltage display, not just my scope. Estimate about 0.1s (dubious number).

The real problems come when my motor begins to decelerate. The current draw drops a ton, often down to 0.00A. Also, the voltage shoots up too: I have seen spikes to about 40V, and the voltage is over 35V for at least 1/4 second.

Has anybody else noted this? Does anyone know why this is happening? What should I do to stop it?

  • \$\begingroup\$ I have heard of steppers generating current when free-spinning (like in this question: electronics.stackexchange.com/questions/20264/… ), but I have verified that this motor is definitely NOT skipping steps, so I don't think that applies. \$\endgroup\$ – dpdt Apr 16 '16 at 20:41
  • \$\begingroup\$ Could you post a scheme please? \$\endgroup\$ – Gregory Kornblum Apr 16 '16 at 21:07
  • \$\begingroup\$ Which decay mode are you using? Does changing it make any difference? \$\endgroup\$ – Bruce Abbott Apr 16 '16 at 21:15
  • \$\begingroup\$ I don't think I can change the decay: on the Pololu breakout board, I don't have access to the needed pins. \$\endgroup\$ – dpdt Apr 16 '16 at 22:07
  • \$\begingroup\$ Scheme is on the driver page: pololu.com/product/2133 Look under "Using the driver". My logic supply is 3.3V and the input capacitor is 220uF directly next to the pins along with a 470uF a little farther away. \$\endgroup\$ – dpdt Apr 16 '16 at 22:12

I would assume the spikes are occurring with each step of the motor. Is this the case? If so, then you can't eliminate the spikes, you can only mitigate them.

The motor is an inductive load, so the current cannot stop instantaneously when one of the switches (which I assume are mosfets) open. That motor current has to go somewhere, and that is what the free-wheeling diodes are for. But the free-wheeling diodes cannot turn-on instantaneously, so the voltage will rise until the diodes start to conduct and give the motor current a path to flow. That's what those spikes are.

There are several ways to mitigate the issue, but the most common way is to use faster free-wheeling diodes. The specification that you need to look for is "reverse recovery time". If your bridge is using the mosfet body-diodes for free-wheeling, than faster diodes may be in order, as the body-diodes are not necessarily fast.

Another way to mitigate the problem is to slow-down the turn-off of the switch. The slower turn-off allows more time for the free-wheeling diode to start conducting. But it may not be as simple as that sounds, as a longer turn-off could cause shoot-through if you don't compensate with the turn-on of the other switch in that half-bridge. Softening turn-off is also how you would reduce EMI, but at the cost of greater heat dissipation in the switch.

If you only want to mitigate the over-voltage to the power-supply (the spikes not being a problem to the bridge), a fast zener at the input of the bridge may be all you need. A high-frequency capacitor might also do the trick.

--- Later ---

I just looked at the schematic, and realized that all of the components I mentioned earlier are buried inside the chip, and not accessible to you. So the fast zener or capacitor approach is all that's available. The board already has a pair of 0.1uF ceramic caps (c2 and c3), so I would suggest a zener (around 30 volts) across VMOT and GND.


Let me take a small detour to synchronous motors while answering. I promise to get back to steppers. Steppers are very similar to permanent-magnet synchronous motors (PMSMs) in many ways (except the number of phases and the fact that they are spaced 90°, not 120° like in a PMSM).

If you run a PMSM from a frequency converter, you basically step-down the input voltage just as much as you need to get the required torque (proportional to current) in your motor. You reach the maximum speed (RPM) once your motor's back-EMF is nearly equal to your supply voltage. If you just turn off all the transistors in your frequency converter at max. speed, the motor's back-EMF will become rectified along the converter's free-wheeling diodes, but you can't get a voltage higher than the original input voltage, because you can't spin your motor faster than the input voltage allows. If, however, your driver tries to actively decelerate the motor, it acts as a step-up converter from the motor to the supply rails, and the input voltage will rise (unless you try to destroy the energy by actively connecting a brake resistor).

Same story for steppers, except you have a two-phase system now. If your driver tries to actively slow down your motor using a PWM signal on its output transistors, you probably need a brake resistor. Or a very big input capacitor that will take the energy without causing too much rise of the voltage...

Your small spikes may just be switching noise (freewheeling of parasitic inductance), and using some smaller capacitors at the right places (just next to the driver, for instance) might help.

  • \$\begingroup\$ I do have a cap right next to the driver: a 220uF one about 3mm away. \$\endgroup\$ – dpdt Apr 16 '16 at 22:09
  • \$\begingroup\$ Would a TVS diode work too, if I'm tolerant of small voltage spikes? I am going to move to a battery powered system, so I don't want to be wasting energy with an unnecessary load resistor. \$\endgroup\$ – dpdt Apr 16 '16 at 22:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.