Can I safely reduce a stepper motor's power consumption by applying a PWM to the driver's enable input?

I can see nothing in the datasheet which states that the enable pin cannot be pulsed. It's hard to tell from the internal circuitry if it would cause a problem. The enable pin switches off the external fets, which might mean that the chip is unable to re-circulate current properly, causing voltage spikes. However, I would expect Allegro would have dealt with that situation, since it would happen every time Enable goes high.

If you have a spare driver, then my advice would be to just try it.

Alternatively, you could reduce the Vref voltage, rather than using PWM. The A4988 will then take care of the current reduction for you nicely. This can be achieved by pulling the Vref pin a little lower with a resistor and either a transistor or a the pin of an MCU which can switch between low and high impedance.

Pulling the Vref pin lower.

An even better solution might be to make it automatic. Use the step signal to rapidly charge a capacitor which pulls the Vref voltage up. An absence of step signals lets the cap slowly discharge, and with it the Vref voltage and the motor current. The faster the steps, the higher the Vref.

Here's a very rough schematic of how it might work. I just guessed the resistor values, and haven't checked that they would work at all. (Exercise left up to the reader). Very rough schematic


I'm not sure what you mean by 'the limit setting potentiometer', but (assuming that you mean the current sense resistors \$R_{S1}\$ and \$R_{S2}\$ (which would be an interesting design, those should be matched low-impedance resistors) I read on page 9, in the section Internal PWM Current Control:

The maximum value of current limiting is set by the selection of RSx and the voltage at the VREF pin. The transconductance function is approximated by the maximum value of current limiting, \$I_{TripMAX}\$ (A), which is set by

\$ I_{TripMAX} = V_{REF} / ( 8 R_S) \$

where \$R_S\$ is the resistance of the sense resistor (Ω) and V_{REF} is the input voltage on the REF pin (V).

Do you have access to the REF pin (pin 17)? If so, adjusting this with a DAC will produce the same effect as varying the sense resistors.

If not, the Enable input is probably a better choice than cutting the power or using the sleep or shut-down pins, those would incur a 1 ms delay (per the description on p. 10).