High Performance, Low Cost…

Motion Control Systems Using Stepper Motors

A stepper motor is an electro-mechanical device that converts electrical pulses into discrete and very precise angular movements of a rotor. Commonly, stepper motors make 200/400 steps per revolution, implying step angles of 1.80/0.90.

Internally, the rotor has a permanent magnet surrounded by electromagnets located in the stationary part of the motor assembly called the stator. Motion is achieved by energizing these electromagnets in a repeating and carefully timed sequence, causing the rotor to take a series of steps until it eventually returns to its original position. In this mode of operation each motor “step” is the result of a 4-step electrical sequence.

Stepper motor resolution can be increased by "half-stepping" the motor. This involves energizing first one, then two adjacent electromagnets alternately during an 8-step electrical sequence.

Micro-stepping allows individual stepper motor steps to be further divided down by powers of 2, resulting in much smoother operation. In this case, the currents in the stepper motor’s windings are controlled by sine and cosine excitation waveforms. In practice, micro-stepping down to 128 microsteps per full step is possible.

Operation of stepper motors in both full and half-step modes is easily carried out by toggling a dedicated group of four microprocessor pins (set as digital outputs) in the correct sequence. These outputs must be routed via a driver chip such as the ULN2003 in order to manage the higher currents typical of most stepper motors.

A micro-stepped controller design is more complex, requiring a lookup table containing a sinusoidal function and an offset register holding a phase index (to generate a cosine), two DAC’s to generate the excitation waveforms as the lookup table is scanned, and power amplifiers to supply motor current. Fortunately, there is a fully integrated solution, the STMicroelectronics L6470 motor driver IC, which is described in more detail below.

In both polarimeter designs described here, a stepper motor is used to spin a thin disk of polaroid sheet material - this is the analyzing polarizer. By passing light from a linearly polarized light source through the second, spinning analysing polarizer and measuring the transmitted light intensity, we have the basis for a polarization measurement system that can measure a sample’s optical rotation.

One of the polarimeters described here uses a half-stepping motor drive, while the other employs micro-stepping using the L6470 chip.
The STMicroelectronics L6470 is a complete, single chip solution for driving stepper motors in micro-stepping mode - at up to 128 steps per normal step. In that case a motor with a 0.90 step angle (i.e. 400 steps/revolution) will make 51200 microsteps per revolution !

The L6470 greatly simplifies the whole process, and the user has access to a large array of parameters to control exactly how the motor is operated, including things such as the motor speed, acceleration and deceleration rates etc.

A motion control system can be constructed using an L6470 evaluation board (pictured opposite) plus a Propeller board (the Activity Board or the Quickstart PCB are both suitable options) and of course a stepper motor. Similar L6470 breakout boards to the one shown are available from Sparkfun and other vendors.

Two pieces of software are also required - a spin program that gets loaded into the on-board P8X32 Propeller chip - L6470.spin and a LabVIEWTM vi ( that allows you to load parameters into the L6470's internal register stack and execute motion commands. The connection between your host PC and the Propeller board is via a mini-USB cable.
L6470 Pin
Propeller Pin
The table opposite shows typical connections that are required between the Propeller board and the L6470 board.

Power (external Vdd of 3.3V) and GND from the Propeller board are also needed to power the L6470, while a separate supply is required to power the motor.

The LabVIEWTM Microstepper GUI

The LabVIEWTM front panel for a motion control system is shown below. On the right hand side of the screen is a control array giving access to the full set of L6470 internal registers - these can be copied into a local array and then downloaded to the L6470 using pushbuttons at the bottom of screen. During operation the L6470 registers are polled continuously, giving access to motor position information "on-the-fly". These polled registers are displayed in the indicator column at far right.

At the top of screen are some simple movement controls to set the motor home position, to go to a nominated position, to move a user-specified number of steps and to run the motor continuously at a nominated speed.

Below this are some controls for stopping the motor, and also some LED-style controls to indicate the L6470 status.

Since the Propeller chip has 8 separate cores, it would be a relatively simple matter to extend the design and produce a multi-axis control system using multiple L6470 boards to separately control each axis.