Designing more efficient stepper motor control subsystems

Tom Hopkins

September 18, 2010

Tom Hopkins

Typically, stepper motor drives have been designed to operate in current mode with the current controller sensing and controlling the winding current. This allows designers to maintain the desired torque over a wide range of speed and power supply voltage fluctuations.

This works very well for full step and half step drives and is pretty simple to implement. Most designers have avoided doing microstepping drives with voltage mode since the peak current could vary widely due to variations the power supply voltage and the increasing back EMF from the motor as the speed increases. However, both of these factors can be compensated for with a digital control.

To implement the voltage mode drive, the output pulse width is controlled by a PWM counter/timer circuit that digitally sets the output duty cycle. The L6470 controls the phase current by applying a voltage to motor windings.

The phase current amplitude is not directly controlled but depends on phase voltage amplitude, load torque, motor electrical characteristics and rotation speed. The effective output voltage is proportional to the motor supply voltage multiplied by a co-efficient (KVAL). KVAL ranges from 0 to 100 percent of the supply voltage.

In microstepping, this peak value is then multiplied by the modulation index to generate a sine wave with the selected number of steps. The peak voltage value is given by the equation:

VOUT = VS * KVAL

The value for KVAL can be calculated

from the formula:

KVAL = (Ipk x R)/VS

Where

Ipk = Desired peak current

VS = Typical power supply voltage

R = Motor winding resistance

The device includes registers that allow setting different KVAL settings for acceleration, deceleration, running at constant speed and holding position to easily allow different torque settings in each part of the motion profile.

BEMF compensation

If the same peak voltage is supplied to the motor over the entire speed range, the current would go down as the speed increases since the BEMF of the motor effectively reduces the voltage applied to the coil. The waveforms on the left of Figure 4 below show the operation of the motor without BEMF compensation.

 

Figure 4: Shown are the phase currents with and without BEMF compensation.

As the speed increases, the BEM increases linearly and since the voltage across the coil is effectively the applied phase voltage minus the BEMF voltage, the current decreases.

To compensate for the increase in BEMF, the device includes an additional factor to the KVAL that compensates for the BEMF. Essentially, this is a compensation that is added to the initial KVAL setting to offset the BEMF (Figure 5, below).

 

Figure 5: Shown is the BEMF compensation curve.

Since the BEMF is directly proportional to the speed, this compensation factor is given as a slope so that the real time compensation can be calculated from the slope and the current speed. The device has different values for the compensation.

The first is the standard value that is applied to the motor starting at zero speed up until the speed reaches a threshold set by the intersect speed parameter, INT_SPEED. Above the intersect speed, the slope can be adjusted by two additional slope terms, one used during constant speed operation and acceleration, and one used during deceleration.

When the BEMF compensation is properly set, the peak current will be essentially constant over the entire operation speed range as shown in Figure 4. Figure 6 below shows the actual current waveform for a motor as it accelerates.

 

Figure 6: Shown is phase current with BEMF compensation.

Power supply, phase resistance

Two other major factors that affect the phase current are the motor supply voltage and phase resistance. Since the device operates in voltage mode, controlling the output duty cycle, variations in either will directly affect the phase current.

When operating on an unregulated power supply, there may be a significant amount of ripple on the supply voltage to the motor driver circuitry.

As the supply voltage varies, the motor current also varies. If the ripple on the supply voltage is significant, there is a risk of stalling the motor if the motor current falls too low. The device includes a compensation for the power supply variation (Figure 7 below).

 

Figure 7: The device includes a compensation for the power supply variation.

In this circuit, an internal ADC measures the power supply voltage, and then the compensation algorithm implemented in the digital core calculates an appropriate compensation factor that is applied to the PWM duty cycle to maintain a constant output voltage magnitude over the variations in supply voltage.

Variations in the phase resistance as the motor heats also directly affect the phase current. The KTHERM setting is used to compensate for the variation in phase resistance due to the internal heating of the motor.

Software in the driving microcontroller can monitor or estimate the motor temperature rise and set the KTHERM value to compensate for the increase in motor resistance due to the temperature increases. For example, a simple algorithm can be used to measure the motor resistance during the time that the motor is stopped between moves and then adjust the value of KTHERM based on the measured resistance.

Conclusion

The features implemented in the L6470 allow the designer to implement a voltage mode microstepping drive and compensate for the typical system variations that, in the past, have been overcome using current mode drives.

Overall the system can operate much smoother and without the typical limitations common with current mode drives. Using the digital based voltage mode PWM, microstepping drives up to 128 microsteps per step can easily be implanted.

The sinewave profile is more accurate and allows higher position resolution than with current mode implementations and the resonances in the system are greatly reduced by the voltage mode operation.

In addition, the digital motion engine implemented in the device greatly reduces the loading on the system microcontroller and eliminates the need for a dedicated microcontroller that was sometimes needed in multiple motor applications.

Tom Hopkins is director of engineering at the Schaumburg Competence Center, STMicroelectronics

< Previous
Page 2 of 2
Next >

Loading comments...

Most Commented

  • Currently no items

Parts Search Datasheets.com

KNOWLEDGE CENTER