Choosing the right driver/controller combination for your stepper motor design

This “Product How-To” article focuses how to use a certain product in an embedded system and is written by a company representative.

Stepper motors have become the dynamic positioning solution of choice in applications ranging from vehicle climate control to industrial dose pumps and theatrical stage lighting. Better performance, decreasing size and lower cost have all contributed to their move into mainstream use.

Just as the motors and their applications have evolved, so have the drive electronics needed to control them. In particular, automotive designers have implemented distributed processing strategies that inject increasing levels of intelligence close to the motor.

This kind of control approach has permeated into more general-purpose application areas, making the typical motor/driver combination more akin to a mechatronic subsystem than a simple actuator.

Designers have three fundamental choices when settling on an architecture for stepper motor drive electronics. The traditional approaches are to use a general- purpose microcontroller or a DSP, in combination with analog driver electronics and a sensor-based feedback loop.

Increasingly, however, cost, time-to-market and complexity constraints are leading engineers to use ASSPs dedicated to motor control. Such solutions themselves fall into two types: single-chip or two-chip implementations.

Design considerations
Although the traditional microcontroller- based approach is gradually being superseded by the use of ASSPs, it is informative to first consider such a basic architecture to understand the typical design constraints and requirements of such a design.

In this case, the core controller with program code typically in flash memory delivers a PWM signal to drive the motor coils. Analog circuitry amplifies this signal and drives the power stage, which in its turn drives the coils of the motor.

Figure 1: Controller/driver solutions combine the controller, speed, position current, diagnostics and power stage in one chip.

The microcontroller needs to obtain a range of information from the outside world to calculate the correct PWM outputs. In particular, it needs feedback on the rotor position.

This function is usually fulfilled by a Hall sensor, which not only provides positional information, but can also sense a stall or blocked rotor. In very simple cases, it may be possible to replace the Hall sensor with a simple end-of-loop position switch.

Other options include optical position coding or even a resistive potentiometer mounted on the motor shaft. In addition to positional data, the controller needs information on the motor current. This is sensed via a resistor in series with the motor driver and presented via an ADC as a digital input to the controller itself.

ASSP solutions integrate most of these functions into one or two devices, in the process implementing sensorless control strategies. The highest level of component integration is provided by controller/driver solutions, such as the AMIS-30624 (Figure 1 above), which combine the controller, speed, position current, diagnostics and power stage all in one chip.

Maximizing existing IP
Although such complete integrated solutions provide the smallest system size and lowest cost of construction, many designers prefer to opt for an intermediate stage, retaining the core controller but relying on an intelligent driver chip such as the AMIS-30522 (Figure 2 below) for other functions.

Figure 2: Some designers prefer to retain the core controller together with an intelligent driver chip for other functions.

The motivation behind this twochip strategy is two-fold. First, some applications require more current drive than can be provided from a single chip. But much more commonly, designers opt for a two-chip solution because they are aiming to maximize the value of their existing IP.

They may have developed a high level of expertise and associated software that they use with their preferred standard microcontroller or DSP. Quite naturally, they wish to re-use and improve that resource.

The intelligent integrated motor driver chip is designed for such users. It requires only a next micro-step command from a microcontroller as its input, and delivers the required PWM at the coils of the motor. BOM is dramatically reduced, and the loading on the microcontroller is minimized, potentially to such a degree that one micro-step command can control more than one motor.

The use of an integrated driver allows the host controller functions to be as simple – or as complex – as required. The driver directly implements microstepping, reducing audible noise and step-loss due to resonance, while improving torque at low speeds.

Processing burden is further off-loaded from the host controller by the integration of a current translation table and incorporation of a proprietary PWM algorithm for reliable current control.

Interfacing is via I/O pins and a simple SPI, providing control over a wide range of parameters, including current amplitude, step-mode, PWM frequency, EMC slope control and sleep mode. The driver can also be chosen to provide the controller (again via SPI) with all of the information it requires on speed, position and coil current as well as diagnostics such as open and short detection or overheating.

Further integration
As we have already observed, however, further integration is possible. A device such as the AMIS-30624 implements all of the capabilities of an intelligent driver. It also has the capability of a programmable state machine that translates a target position into the sequence of (micro) steps required to get to that position with the specified acceleration, speed and deceleration.

The target position and other high level information is dictated by a remote host and is communicated via a bus-level interface such as I2C or LIN. Such an architecture has the particular advantage that it scales well to accommodate more axes of movement: the hardware and software design are extended in a modular way, and bus-based communication is inherently scalable.

In addition to simplifying hardware design, the use of integrated controllers significantly eases development and implementation of an appropriate motion control algorithm. In practice, this often boils down to running a characterization algorithm that returns the required parameter setting.

Motor dynamics
Working out how to drive the motor without losing steps follows a defined sequence. Torque and velocity are generally defined system requirements that can be used to determine the required motor current.

The next step is to consider the motor dynamics. Of particular interest is the resonance or forbidden frequency. During acceleration and deceleration, this must be crossed as quickly as possible. The AMIS-30624 allows the configuration of “minimum” and “normal” operating velocities as well as acceleration and deceleration times to achieve the correct motion profile for the motor being used.

Once all of the relevant parameters have been calculated, they are sent to the device via I2C bus. They can be iteratively honed to demonstrate stability and finally burned into non-volatile memory as the final operating parameters.

Besides reducing BOM and simplifying design, the ASSP approach to stepper motor control yields more sophisticated control strategies and designs that are more closely tailored to application requirements. Two of the key techniques for achieving such improvements are sensorless stall detection and dynamic torque conditioning.

Stepper motors are mostly used in open loop systems. Although such systems are simple and – by definition – stable, they have the disadvantage of lacking absolute positional feedback.

If the motor is blocked, there is a danger that the driver/positioner will continue to drive the coils as though the motor were still moving. This creates noise, and more importantly, breaks the link between the real position and the information stored in the positioner.

Using BEMF feedback
Devices such as the AMIS-30522 and AMIS-30624 can be used to detect when such blocks occur. They do so by sensing the back EMF (BEMF) created as the motor coils move within the magnetic field of the motor.

BEMF detection relies on the fact that, just as a current-carrying conductor in a magnetic field will be subjected to a force (causing it to move), a conductor moving in a magnetic field will create an opposing EMF. The amplitude of this EMF is a linear function of the speed of the motor: most important for stall detection implementations, it is zero when the motor is blocked.

Like most features, the exact implementation depends on the selected driver architecture. An intelligent driver like the AMIS- 30522 makes the BEMF voltage available on an external pin, allowing feedback to a microcontroller.

A more highly-integrated device such as the AMIS-30624 has detection circuitry embedded, with threshold levels set via simple I2C commands. BEMF can also be used to implement dynamic torque conditioning, allowing potential reductions in motor size and cost, and improvements in energy efficiency.

BEMF is a time-varying function of the velocity of motion of the motor. The phase difference between the BEMF voltage and the current in the coils is influenced by the mechanical load on the motor axis: as mechanical load increases, the phase difference also increases. The sampled BEMF level will therefore decrease with increasing mechanical load if the BEMF is always sampled at the same time – a phenomenon known as load angle.

Load angle can be observed via an external pin on the AMIS- 30522 device. Increased mechanical Loading – indicated by a voltage Drop – can be compensated by selecting a higher current, and hence increasing the torque of the motor. Such a dynamic torque conditioning strategy means that the designer no longer needs to initially dimension the system for the “worst-case scenario” of the peak expected load. Instead, a smaller, less expensive motor can be used.

Integrated motor control ASSPs ease the task of designing stepper motor subsystems – reinforcing the existing trend towards use of such motors in increasingly diverse applications. They reduce BOM, simplify design and cut time-to-market. Moreover, they allow design engineers to focus on adding value rather than implementing low-level control strategies, and simultaneously enable more sophisticated control strategies and richer feature sets.

Guido Remmerie is director and Peter Cox is Engineering Product/ Account Manager of Industrial Products at AMI Semiconductor Inc.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.