Driver ICs Elevate Design of Stepper-Motor Control

Aug. 1, 2007
Two-chip designs combining a microcontroller or DSP with a highly integrated driver IC simplify the design of a stepper-motor controller, while also enabling sophisticated control features that would be hard to implement discretely.

Stepper motors are now being used more frequently in industrial environments. Increased performance and reduced size make them increasingly attractive, and their application is no longer limited to accurate positioning. Applications such as dose pumps, valve control and even dynamic positioning (and other movements previously reserved for linear positioners) are becoming popular.

The drive electronics for such stepper motors are evolving accordingly. In the traditional way, the architecture typically includes a standard microcontroller or DSP, custom logic to provide the decoder inputs, several analog-to-digital and digital-to-analog converters (ADCs and DACs), and an H-bridge to drive the currents in the stator windings of the stepper motor.

The development of drivers and controllers spawned by automotive applications has yielded interesting products and building blocks. These functions move local intelligence close to the motor, creating a class of products known as mechatronics. Application-specific standard products (ASSPs) have become available to drive stepper motors directly from high-level position commands on a bus. Single-chip solutions integrate driver transistors, on-chip current regulation, a translation table between the exact rotor position and corresponding coil currents, a rotor positioner, speed and acceleration, and the physical layer and data-link protocol of a communication bus. The use of microstepping converts low-resolution motors into low-cost high-resolution actuators.

These single-chip motor-driver ASSPs are convenient for multi-axis positioning applications. However, system builders who want more flexibility on the control of the movement can choose dual-chip solutions. These solutions allow system designers to embed their knowledge in standard microcores or DSPs, and develop algorithms that produce the “next-step” signals to the stepper motor. The ASSP takes care of the rest and replaces the bulk, if not all, of the traditional motor-drive circuitry. This allows designers to concentrate on the programming of the motion, rather than concentrating on driving a current through a coil using complex PWM algorithms. The development time, and therefore the time-to-market, of new products reduces accordingly.

The ASSPs come with new features like embedded diagnostics and information on torque and motion. The designer can use these signals in programming the controller to detect rotor blockage and rotor position, and to perform automated adaptation of torque without the use of external sensors.

Applications

Dynamic positioning implies that an object is moved from one position to another at a speed that is designed specifically for that motion. In most cases, this motion is high speed. Acceleration and deceleration are adapted to the specific design of the motor and its specified load to avoid oscillations and resonances in the system (including the motor itself).

This demanding dynamic positioning is being used in dynamic headlight positioning and dynamic flap positioning for automotive climate control. In industrial applications, there is also a need for smooth dynamic motion in surveillance-camera positioning, air-flap and water-valve positioning in climate-control systems, and dose pumps in process control. Very high-speed dynamic motion is occurring in manufacturing equipment like weaving equipment, pick-and-place equipment, industrial robots, X-Y-Z tables and in the dynamic stage lighting of the entertainment business.

Control Architectures

The traditional architecture for stepper-motor-driver electronics is shown in Fig. 1. The core of the circuit is a microcontroller, usually with the program code embedded in Flash memory. For some applications, a DSP is more suitable. The microcontroller executes the motion-control algorithm based on feedback from the motion of the system, as well as the motor itself.

The first feedback is provided by a Hall sensor, which basically provides information on the rotor position. It can be used to keep track of the rotor position, or to monitor the motion and detect a possible stall condition or blocked rotor. In simple cases, an end-of-loop position switch is sufficient. Additional options include optical-position coding or a resistive potentiometer mounted on the motor shaft. All of these options increase system complexity, pc-board area and cost.

A resistor in series with the motor driver collects information on the motor current, and an ADC converts it to digital data, which is then fed to the controller. Other diagnostics are possible at the expense of additional analog circuitry. The microcontroller or DSP delivers a PWM signal to drive the motor coils. This signal is amplified by analog circuitry that drives the power stage, which in turn drives the coils of the motor.

An integrated controller/driver solution simplifies this architecture. A fully integrated solution takes care of everything done in the traditional way using a single device. An example of such a device, the AMIS-30624, is shown in Fig. 2. This device contains the controller, speed, position, current, diagnostics and power stage. This solution offers simple construction and is well suited to applications where the required current in the coils is close to the maximum operating current provided by the single-chip controller/driver.

There are basically two reasons for departing from the single-chip solution: the need for stepper-motor drive-current control and the need for controller flexibility. In a fully integrated solution, the controller is embedded by the chip manufacturer and can be a microcontroller or a programmable state machine. However, some users have developed a high level of expertise in these systems, developing motion-control algorithms designed for use on standard microcontrollers or DSPs. Even in such cases, an intelligent, integrated motor-driver chip, combined with the standard microcontroller, can bring a strong simplification of the architecture.

The type of chip requires, as an input, a next-step command and does all that is required to deliver the PWM drive signal at the coils of the motor (Fig. 3). One microcontroller can control more than one motor, because the PWM generation is done in the intelligent, integrated motor-driver device.

Fig. 4 shows a controller/driver reference design incorporating two integrated driver chips. This design provides a highly integrated solution for driving two stepper motors using a single microcontroller, which is programmed via a CAN bus. The motor driver internally generates all required information on motor speed, position, coil current and diagnostics on open or shorted coils or overheating.

Benefits of Integration

The AMIS-30522 is a microstepping stepper-motor driver for bipolar-stepper motors. The IC can be interfaced via I/O pins and the SPI bus to an external microcontroller or a DSP. This external controller can be very simple, as the AMIS-30522 contains a current translation table and advances the rotor a single microstep on every rising (or falling) edge on the NXT input pin.

On this chip, the DIR register, or input pin, defines the direction of rotation. This implies that the PWM signal is generated in the driver chip and uses a proprietary PWM algorithm for reliable current control. The NXT step can be a full step or a microstep down to 1/32 of a full step. Microstepping operation overcomes the design trade-offs between minimum speed, audible noise and step losses from resonance phenomena. It also increases torque at low velocities.

Furthermore, several parameters can be controlled via the SPI bus, including current amplitude (5-bit DAC), step mode, PWM frequency, EMC slope control, enabling and disabling of the driver, and sleep-mode entry. The intelligent-driver device also provides information to the external controller through the SPI bus, such as thermal warning and shutdown status flags, detection of winding coil open circuits, detection of shorts and overcurrents, and rotor position data generated by the internal translator table.

The most interesting feature, however, is the speed-and-load-angle (SLA) output signal. This signal measures and interprets the back electromagnetic force (EMF) induced in the motor. The SLA output signal enables the running of stall-detection algorithms on the external microcontroller, which offers silent, yet accurate position calibrations during the referencing run, without an external sensor.

In addition, the microcontroller can be programmed with control loops based on the load-angle information provided by the SLA output to adjust torque and speed accordingly. This feature can be used to avoid step loss or to temporarily boost the motor current and torque.

The AMIS-30522 has an on-chip voltage regulator able to deliver power to externals, a reset output, and a watchdog circuit reset to supply and monitor the external microcontroller. When interfaced to a simple microcontroller, the intelligent, integrated stepper-motor driver completes it to a fully integrated stepper-motor driver/controller circuit without need for either external current or position sensors, or external drivers. The designer can fully concentrate on the driver algorithm on his preferred platform and use the SLA feature to design even better algorithms.

Integration can go a step further. The AMIS-30624 stepper-motor driver/controller is similar to the AMIS-30522 but also contains an integrated programmable state machine. The state machine translates a target position into the required sequence of microsteps to get to the target rotor position with desired acceleration, speed and deceleration.

The target position and other high-level positioning information is dictated by a remote host, which communicates with the intelligent stepper-motor driver/controller through an I2C bus (used in the AMIS-30624) or LIN bus (used in the AMIS-30623). The high abstraction level of the product's command set reduces the load of the processor on the master side. Scaling of the application toward the number of axes is straightforward. Hardware and software designs are extended in a modular way, without severely affecting the demands on the master microcontroller. The bus structure simplifies pc-board layout and wiring architectures.

In this case, the SLA output is internally connected to the integrated state machine, and its use is limited to the generation of stall detection. The on-chip position controller is configurable with one-time programmable (OTP) default settings and RAM to override the defaults through the I2C interface. These parameters have to be set to adapt the circuit for the specific motor type used, for the positioning ranges, and for setting the maximum speed, acceleration, deceleration, and stall detection.

The intelligent integrated stepper-motor driver/controller acts as a slave on an I2C bus or LIN bus, and the master (host) can fetch specific status information such as the actual rotor position, or error flags, from each individual slave node.

The key advantage of intelligent, integrated drivers and drivers/controllers is their ease of use. The designer can choose an embedded controller or use a simple low-cost controller. The designer can concentrate on designing the motion algorithm using a proven and reproducible translation of the motion to the driving of the coils. This translation depends on the specific mechanics of the application and involves the running of a characterization algorithm that returns the required parameter setting.

For designing the motion algorithm, the designer has a range of features available that are difficult if not impossible to achieve with a discrete solution or with simple standard products. The most important are micro-stepping for low acoustic noise, and the detection of rotor speed and load angle without external sensors. The latter can be used for stall detection, and to adapt the motor speed and drive current interactively with the feedback from the motion.

The communication is limited to a position command for the motor driver/controller or a next-step pulse for the intelligent motor driver. The low speed of the communications bus causes very little EMI. The high-speed PWM signals are limited to the short tracks between driver and motor coils, and those signals are slope controlled to further reduce any radiated emission.

The end solution is small and has a specific advantage for small-step positioning applications and mechatronics; it can even be built inside a small stepper motor or actuator. No sensors (and few other external component types) are needed. Even the current-sense resistor for the winding current is integrated. Fig. 5 shows an example of such an integrated module combining the motor with the controller/driver electronics.

Parameterization Mode

A major concern of every system designer using a stepper motor is how to drive this actuator without losing steps. Many parameters influence the correct motion, and it is not always easy to find the right combination.[1] Randomly changing settings to find the optimum set of parameters can lead to a long development time.

Using highly integrated stepper-motor-driver positioners eases the programming of the key parameters without compiling and requalifying the software. A step-by-step guide is available to help designers.[2]

In the first programming step, the required torque is calculated. This is a system-level requirement in most cases. Knowing the velocity and the required corresponding torque, one can determine the required current, also called the run current, which can be selected from a table containing 16 values varying from 59 mA up to 800 mA by sending a 4 bit in a single I2C command. The same principle is applied when setting the holding torque, which is generated in the motor by supplying a small dc current in the coils. In a separate table, a holding current is selected using a similar 4-bit word.

In the second step, the motor dynamics are considered. Every stepper motor has its own resonance frequency, also called the forbidden or Eigen-frequency (Fig. 6). During acceleration and deceleration, this forbidden frequency zone should be crossed as quickly as possible. A solution offered by the AMIS-30624 is the selection of two velocities and two corresponding acceleration and deceleration profiles. The first velocity, the minimum velocity (VMIN), is chosen above the forbidden zone. The second velocity, the maximum velocity (VMAX), is the nominal speed of the motor. Both velocities can be selected from two velocity tables.

The motion starts at VMIN, which means that the acceleration to reach VMIN, is theoretically infinite. A second acceleration determines the time to reach the VMAX value, and can be set. Because the deceleration is symmetrical, these settings are also used to set the time to slow the rotor to a complete stop. These timings are part of the system requirements in most cases. Based on these timings, the minimum acceleration can be calculated. The upper limit is, as explained in Application Note AN_AMIS-3062x_04,[2] a function of the Eigen frequency of the motor. Again, the acceleration/deceleration can be set by simply sending a 4-bit word using a simple I2C command.

Once all parameters have been calculated, they are sent on the I2C bus to the motor driver/positioner. When they are proven to be stable, the system designer has the option to burn this set of values into a nonvolatile memory embedded in the IC.

Sensorless Stall Detection

Stepper motors are mostly used in open-loop systems. This has the advantage of being a simple and, by definition, stable concept. The major disadvantage, however, is the absence of direct position feedback. If the motor is blocked, the driver/positioner continues driving the coils as if the motor is still moving. This creates noise, and more importantly, the link between real and actual position stored in the positioner is lost. However, the AMIS-30624 is able to detect when the motor is blocked using the stall detection function.

Every motor is based on the basic principle that a current in a conductor in the presence of a magnetic field creates a torque (or force). This causes this conductor to move. Conversely, a moving conductor in a magnetic field creates an EMF in the opposite direction given by

where Φ is the magnetic flux of the field. If the motion is circular with an angular speed ω(as it is in a motor), the back EMF is given by: e=EMFMOTOR=EMcos(ωt), where EM=-NωΦM.

The amplitude EM is a linear function of the speed. As a result, the back EMF is zero when the motor is blocked.

Some motor drivers are able to measure a motor's back EMF. For instance, the AMIS-30522 makes this voltage available on the SLA pin, which can be fed into an ADC inside an external microcontroller. It is then possible to detect a stalled motor with a simple algorithm in the microcontroller.

The AMIS-30624 has its detection circuit embedded. A simple I2C command sets the different threshold levels. An application explains the different steps to parameterize these levels.[2]

Dynamic Torque Control

As previously discussed, the back EMF is a function of the rotor velocity. The phase between this voltage and the current in the coils is influenced by the mechanical load on the motor axis. If this mechanical load increases, the phase difference increases as well. As a result, the sampled voltage level will decrease with increasing mechanical load if the back EMF is always sampled at the same time relative to a fixed time in the winding current cycle (Fig. 7). This phenomenon is called the load angle and can be used to compensate for overload situations.

Usually system designers parameterize the run current to cope with potential load variations. The torque delivered should be higher than the expected peak load. This leads to overdriving (and oversizing) the motor.

The load angle can be observed on the SLA pin of the AMIS-30522. If for a given velocity the voltage on this pin starts to drop, it indicates the mechanical load is increasing. This can be compensated by selecting a higher current to increase the delivered torque of the motor. With this dynamic torque generation, it is no longer necessary to dimension the system for the expected peak loads. As a result, the stepper motor can be smaller and thus less expensive.[3]

References

  1. Jones, Douglas W. “Stepping Motor Physics,” www.cs.uiowa.edu/~jones/step/

  2. Application Note AN_AMIS-3062x_04. www.amis.com/products/motor_controllers

  3. Application Note AN_AMIS-3052x_01 www.amis.com/products/motor_controllers

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!