Integrated stepper driver control interfaces
Resources
[MUSIC PLAYING]
Welcome to the fourth chapter in the TI Precision Labs series on Stepper Drivers. My name is James Lockridge. In this video, I discuss common interfaces used on integrated stepper drivers. Integrated stepper drivers come with a variety of control interface options. This slide shows three main ones, step-direction, phase-enable, and PWM.
A step-direction interface uses rising edges of pulses on the STEP control pin to move the motor. When the driver receives a rising edge on the STEP pin, it moves the motor to the next full step or microstep position. A series of step pulses will spin the motor continuously. The direction pin, or DIR pin, chooses the direction the motor will turn. The step-direction interface is only useful for driving stepper motors.
The phase-enable interface is a type of parallel interface for controlling brushed DC and stepper motors. The enable, or EN pin, controls when the driver outputs energize the stepper motor. The phase, or PH pin, selects the direction of the current flows through the windings. The VREF pin selects the current level that the driver regulates in the stepper windings. The current levels in the stepper windings determine the rotor position.
The PWM interface is another type of parallel interface for controlling brushed DC and stepper motors. The motor driver outputs depend on the state of the input pins. Drivers with a PWM control interface may also have a VREF pin for current regulation.
Integrated stepper drivers with a step-direction interface contain an indexer table that determines what current level to regulate in each stepper winding. The current level at each step in the indexer table is a percentage of the full scale current. Full scale current is the maximum current the stepper driver will regulate in the motor windings. Typically, a reference voltage, internal or external to the stepper driver, sets the full scale current.
Here is a typical indexer table from the stepper driver datasheet. When the indexer table is at index 1, the driver regulates the current in the A-phase winding to 0% of the full-scale setting and the B-phase winding to 100%. When the step pin receives a rising edge, the indexer moves to the next state in the table.
If the driver is configured to 1/4 micro-stepping, the second state will be one where the driver regulates 38% of the full-scale current in the A-phase winding and 92% in the B-phase winding. In the case 1/8 micro-stepping, a rising edge on the step pin will regulate the A-phase and B-phase currents to 20% and 98%, respectively. This produces a rotor movement that is half of the displacement of the 1/4 micro-step mode for each rising edge of the step pin. Depending on the micro-step setting, the indexer may not necessarily start at index 1. The red box shown on the indexer table indicates the starting point of the stepper driver indexer at power on.
This animation shows how the current in the motor winding changes with each rising edge on the STEP pin. The state of the DIR pin determines the direction that the motor moves. If the DIR pin is low, the indexer will iterate in reverse through the indexer table. Some drivers have indexer tables that can accommodate microstep modes down to 1/256 micro-stepping. The voltage on the VREF pin determines the full scale current of the driver.
Drivers with a step direction interface automatically regulate the current in the motor windings using current chopping. The type of current chopping technique is chosen by selecting the decay mode on the stepper driver. In this example, a digital to analog converter, or DAC, on a microcontroller sets the voltage on the VREF pin. To create the positive sinusoidal current, the face pin is set to logic HIGH.
The microcontroller may use sinusoidal microstep values stored in a lookup table to set the voltage on the VREF pin from the DAC output. To create the negative sinusoidal values, the phase pin is set to logic LOW. The VREF pin can reuse the same values from the lookup table since the phase pin controls the direction of the current.
To properly drive the stepper motor, the sinusoidal voltage references for the AV REF and BV REF pin must be 90 degrees out of phase. The PWM interface can also drive stepper motors in a similar way to the phase-enable interface. The input pins configure the direction of the current, and the VREF pin sets the current regulation levels.
By switching the states of the input pins, the current also changes direction. Just like the phase-enable interface, the sinusoidal voltage reference of the BV REF pin must also be 90 degrees out of phase with the AV REF signal. By using current regulation on the PWM and phase-enable interface, microstep resolution is fundamentally limited by the DAC resolution. For instance, a 10-bit DAC can potentially implement 1,023 microstep levels.
Voltage control is a method of driving the stepper motor without using current chopping. To do this on a phase-enable interface, a PWM signal with a sinusoidal duty cycle on the EN pin controls the magnitude of the voltage on the motor terminals. To recreate the whole sine wave, the phase pin must switch its state halfway through the sine wave to change polarity of the voltage applied to the motor terminals. This example only shows the inputs for the A-phase. The B-phase control is similar, but the sinusoidal PWM signal on the inputs needs to be 90 degrees out of phase with the A-phase.
When implementing voltage control on a PWM interface, the firmware designer must be mindful of the state table of the input pins. In order to create a positive voltage across the coil, set N1 logic HIGH and N2 logic LOW. Typically, PWM for motor driving switches between the driving and slow decay states. From the table shown here, the N2 pin will need to be logic LOW for the PWM on time and logic HIGH for the PWM off time.
Here is a block diagram of a stepper driver with a PWM interface. The animation shows how to provide PWM signals to the input pins to create the positive part of the sinusoidal voltage on the outputs. To create the negative part of the sine wave, the N2 pin is held logic HIGH while the PWM signal is on the N1 pin.
For voltage control, phase-enable interface may be easier to use than PWM interface since it only requires two GPIO with the PWM output peripherals of a microcontroller. However, the PWM interface offers more options for output states. The system designer can decide which interface is best for their application by looking at the control input state table.
The table on this slide compares the step-direction interface with two types of parallel interfaces. The step-direction interface helps to simplify the complexity of the control signals from the microcontroller by using the indexer table integrated in the driver. This allows the system designer to choose a lower cost microcontroller with fewer features or reduce the complexity of the firmware.
Although the parallel interfaces may require more microcontroller resources to control the motor, they provide more flexibility for microstep modes or the option for voltage control. Sometimes parallel interfaces can achieve smaller microstep modes or custom microstep levels using current regulation. Voltage control may be used for low voltage motors when the supply voltage is also low.
Sometimes a simple dual H-bridge driver is lower cost than one that integrates current regulation. However, current regulation and micro-stepping are often useful when the motor voltage rating is low, but the available supply voltage is high. In this case, current regulation helps keep the average voltage on the motor terminals within the voltage rating of the motor, as long as the current through the motor windings is less than the motor's rated current. With each of these interface options, system designers can select the proper interface to achieve best performance with respect to system cost and complexity.
For more information on stepper motors and TI Integrated stepper drivers, please visit the stepper driver page on TI.com.
This video is part of a series
-
Precision labs series: Stepper motors
video-playlist (10 videos)