Understanding Mixed Decay and the Allegro A3977 PFD Percent Fast Decay Feature

This article explains why you might want to use mixed decay and how it is implemented in the A3977’s current chopper PWM scheme with the percent fast decay (PFD) pin.

First, you need to understand how each of the two fixed-off time PWM current chopper circuits on the A3977 work.

A resistor and capacitor are connected in parallel from the RC pin to ground.  Initially, the RC pin is internally pulled up to Vdd, keeping the capacitor charged to about 2/3 of Vdd.  When the current sense voltage rises to the Itrip voltage for the current microstep, the internal flip-flop is set, starting a PWM off-cycle.   At the same time, the internal switch connecting the RC pin to Vdd is opened and the capacitor begins to discharge through the parallel resistor.

When the voltage on the RC pin drops to approximately 1/3 of Vdd, the flip-flop is reset.  The h-bridge is switched back to the on state and the internal pull-up on the RC pin is again turned on, charging the capacitor up to Vdd in preparation for the next cycle.

The PFD function simply uses a comparator to compare the voltages on the RC pin and the PFD pin.  During the PWM off-cycle, the output of the comparator commands the h-bridge to switch to either fast or slow decay modes.  If the voltage on the RC pin at the moment is greater than the PFD voltage, the bridge is in fast decay mode.  If the RC voltage is lower than the PFD voltage, the bridge is in slow decay mode.

For example, let’s set the PFD voltage to 1/2 Vdd.  As a PWM off cycle starts, the RC pin is at 2/3 Vdd and the bridge is in fast decay.  As the capacitor discharges, the RC voltage drops below 1/2 Vdd and the bridge switches to slow decay mode.  When the RC voltage falls to 1/3 Vdd the off cycle is finished and bridge is switched back on.

As you can see, if the voltage on the PFD pin set above 2/3 Vdd or below 1/3 Vdd, you will have pure slow decay or pure fast decay, respectively.  A voltage in between, as in the above example, will result in a period of fast decay followed by a period of slow decay.  This is called “mixed decay”.

Now that you know how PFD is implemented in the A3977, you are probably interested in why and how you would want to use it.

During the portion of the microstepping waveform where the winding current is increasing, the A3977 automatically uses slow decay during the PWM off-time.  This makes sense, as we are fighting an uphill battle.  During the downhill portion of the waveform where current is decreasing, the chip gives the option to use slow decay, fast decay, or an adjustable period of fast decay followed by the remainder of the off time in slow decay, i.e. mixed decay.

Obviously, slow decay causes less current ripple than fast decay.  If the stepper motor only needs to turn at slow speeds, you may want to use slow decay to minimize unnecessary motor heating.  Unfortunately, as the step rate and motor speed increase, motor winding inductance and back-EMF conspire to prevent the current from decaying fast enough on the downward sloping portion of the microstepping waveform.  This distorts the ideal sinusoidal waveform, causing vibration and robbing torque.

If the application is a CNC machine or robot, for instance, the simplest answer is to always use fast decay on the downward sloping portion of the waveform.  This will give the maximum motor performance in nearly all systems.  The price to pay is slightly more motor heating at low speeds and therefore slightly less efficiency.

What if the motor needs to turn too fast for 100% slow decay, but never needs to turn so fast that 100% fast decay is needed?  If your application is something like a metering pump that will turn at a moderate speed that never varies very much, it may be worth the effort to tune the system to use the optimum combination of fast and slow decay.

To optimize the PDF setting, you’ll need to monitor the current in one of the windings with an oscilloscope.  Start with 100% fast decay and run the motor at the fastest speed you expect it to see in use.  Gradually increase the PFD voltage while watching the microstepping current waveform.  At some point you may notice that the waveform departs from the sinusoidal shape, forming a “tail” after the peak.  Back off on the PFD voltage until the distortion is gone and you have found the optimum PFD setting for those conditions.

By the way, switching to slow decay whenever the motor is stationary is a good trick to reduce idle power consumption and motor heating without reducing holding torque.