You are on page 1of 10

International Journal of Electronic Engineering Research

ISSN 0975 - 6450 Volume 2 Number 2 (2010) pp. 219–228


© Research India Publications
http://www.ripublication.com/ijeer.htm

An Open-loop Stepper Motor Controller


Based on CPLD

Zoonubiya Ali1 and R.V Kshirsagar2


1
Senior Lecturer Electronics & Telecommunication Department,
DIMAT, Raipur (C.G.), India
E-mail: zoonubiyakhan@yahoo.co.in
2
Prof. & Head Electronics & Telecommunication department. PCEA, Nagpur, India

Abstract

In motion control systems, stepper motors are widely used and the stepper
motor driver is mainly implemented using a DSP (Digital Signal Processor).
Using the DSP allows the control algorithm to be easily applied. Both coding
and debugging processes can be rapidly performed. The DSP based driver's
exhibit good performance; they are reliable, precise, and responsive. However,
when mass production is needed, CPLD (complex programmable logic device)
based drivers are preferred since the CPLD based design is compatible with
conversation to an ASIC(Application Specific Integrated Circuit). Previous
studies proposed CPLD based drivers but the quality is still limited because of
the difficulty of handling complex computations in the CPLD. Nowadays,
with the improvement of CPLD techniques, it is possible to perform various
computations in the FPGA so it can be used instead of the DSP in motor driver
design. This paper presents an open loop driver based on the CPLD. This
driver can perform stable, precise control and is responsive. The experimental
results verify the performance of the control driver algorithm.

Keywords: Stepping modes, CPLD, Open loop driver, Stepper motor.

Introduction
Stepper motor is a marvel in simplicity and hence it finds wide spectrum of industrial
application. It is used in process control and machine tool applications as well as in
computer peripherals, typewriters, telex machines, business machines, motion control,
and robotics. Stepper motor has very good low speed control and can hold a position
without application of power. The most valuable and interesting feature of a stepper
motor is the ability to position the shaft in fine predictable increments. Stepper motor
220 Zoonubiya Ali and R.V Kshirsagar

can run 'open-loop' without the need for any kind of encoder to determine the shaft
position. Moreover, the rotation speed of a stepper is independent of load, provided it
has sufficient torque to overcome slipping. These characteristics made stepper motor a
popular choice for electronics designers and professionals.
The accurate control of stepper motor for various applications is the major issue of
concern. Earlier attempts to control the stepper motors made use of microprocessors.
With a vast array of features and packages, abundance of software development tools,
and huge library of application code, the ubiquitous microprocessor has found
application in every stepper motor controller. Despite of various advantages,
microprocessor based stepper motor control algorithms cannot be changed frequently.
Moreover, microprocessor needs milliseconds to power up which delays the switching
sequence in the stepper motor. In view of these disadvantages posed by
microprocessor, this work attempts to implement CPLD for development of VHDL
based stepper motor controller.

Working principle of stepper motor


Stepper motors have become popular in motion control systems because of their
simplicity and reliability. Precise positioning operation is easier by using a stepper
motor without a gear system. It is void of brushes and contacts. It is a synchronous
motor with the magnetic field electronically switched to rotate the armature magnet
around. Stepper motor is an electromechanical device, which converts electrical
pulses into discrete mechanical movements. The shaft or spindle of a stepper motor
rotates in discrete step increments when electrical command pulses are applied to it in
the proper sequence. The sequence of the applied pulses is directly related to the
direction of motor shafts rotation. The speed of the motor shafts rotation depends on
the frequency of the input pulses and the length of rotation relies on the number of
input pulses applied
The stepper motor consists of permanent magnet rotor and wound stator. The coils
of wound stator are called control windings. The rotation of stepper motor is
controlled by switching ON/OFF the current through control windings. Normally the
control windings are excited through driver transistors. The stepper motor controller
generates sequences of digital data which is known as switching sequence at a
particular clock rate. This switching sequence is adopted to switch the transistors used
for driving the motor. The controller can generate the switching sequences at
variables rate to drive the motor at variable speed. The direction of rotation of motor
can be reversed by generating the switching sequences in reverse order.

Stepper motor control using CPLD:


In this work, the control of the rotation and speed of the stepper motor is done by
using CPLD (Complex programmable logic device) instead of Microprocessor. The
characteristic of non volatility makes the CPLD the device of choice in modern digital
designs to perform the function before handing over control to other devices not
having this capability.
An Open-loop Stepper Motor Controller 221

A complex programmable logic device (CPLD) is a programmable logic device


with complexity between that of PAL,s and FPGA,s, and architectural features of
both. . With a vast array of features and packages the microcontroller has found a
home in nearly every type of portable application. However, with the arrival of low-
power CPLDs, designers now have new options for implementing many of the
functions traditionally performed by microcontrollers. It is advantages to use CPLD
instead of microprocessor or microcontroller because its coding can change as it has
platform independent code. Moreover, it can power up in microseconds which is most
advantageous for controlling switching sequence. A simplified description of CPLD
design flow is as follows:
(1) The design is written in a high-level language, such as Verilog or VHDL,
using a software development tool.
(2) The design is simulated for functional correctness.
(3) The design is “fit” to a particular CPLD, providing the physical aspects such
as resource utilization and timing paths.
(4) The design is simulated for timing correctness.
(5) The design is programmed into the physical device.

START/STOP
CONTROL
SWITCH LATCH STEPPER STEPPE
CPLD MOTOR R
BUFFER DRIVER MOTOR
DIRECTION CIRCUIT
CONTROL
SWITCH

CLOCK
GENERATOR

Why stepper motor?


• A stepper motor can be a good choice whenever controlled movement is
required.
• They can be used to advantage in applications where control on rotation angle,
speed, position and synchronism is required.
• Because
– A stepper motor is an electromechanical device which converts electrical
pulses into discrete mechanical movements.
– The shaft or spindle of a stepper motor rotates in discrete step increments
when electrical command pulses are applied to it in the proper sequence

Open Loop Operation


One of the most significant advantages of a stepper motor is its ability to be
accurately controlled in an open loop system. Open loop control means no feedback
222 Zoonubiya Ali and R.V Kshirsagar

information about position is needed. This type of control eliminates the need for
expensive sensing and feedback devices such as optical encoders. Your position is
known simply by keeping track of the input step pulses.
Literature review

1. Variable Reluctance Stepper Motor


• Easiest to understand from a structural point of view.
• This type of motor consists of a soft iron multi-toothed rotor and a wound
stator.
• Stator windings are energized with DC current the poles become magnetized.
• Rotation occurs when the rotor teeth are attracted to the energized stator poles.
• That is, all the phases are arranged in a single stack, or plane.
• The disadvantage of this design for a stepper motor is that the steps are
generally quite large (above 15°).

Cross Section of Variable Reluctance Stepper Motor

2. Permanent Magnet (PM)


• Often referred to as a “tin can” or “canstock” motor.
• It is low cost and low resolution type motor with typical step angles of 7.5° to
15°. (48 – 24 steps/revolution).
• It has permanent magnets added to the motor structure.
• The rotor has no teeth as with the VR motor. Instead the rotor is magnetized
with alternating north and south poles situated in a straight line parallel to the
rotor shaft.
• These magnetized rotor poles provide an increased magnetic flux intensity.
• PM motor exhibits improved torque characteristics when compared with the
VR type.
An Open-loop Stepper Motor Controller 223

3. Hybrid Stepper Motor


• More expensive but better performance with respect to step resolution, torque
and speed.
• Typical step angles for the HB stepper motor range from 3.6° to 0.9° (100 –
400 steps per revolution). The hybrid stepper motor
• It combines the best features of both the PM and VR type stepper motors.
• The rotor is multi-toothed like the VR motor and contains an axially
magnetized concentric magnet around its shaft.
• The teeth on the rotor provide an even better path which helps guide the
magnetic flux to preferred locations in the air gap.

Torque Generation in Stepper Motor

The torque produced by a stepper motor depends on several factors.


• The step rate
• The drive current in the windings
In a stepper motor a torque is developed when the magnetic fluxes of the rotor and
stator are displaced from each other.
• The stator is made up of a high permeability magnetic material.
224 Zoonubiya Ali and R.V Kshirsagar

• The presence of this high permeability material causes the magnetic flux to be
confined for the most part to the paths defined by the stator structure in the
same fashion that currents are confined to the conductors of an electronic
circuit.
• This serves to concentrate the flux at the stator poles.
• The torque output produced by the motor is proportional to the intensity of the
magnetic flux generated when the winding is energized.

• Magnetic flux path through poles of the stepper motor


• Phases, Poles and Stepping Angles
• Stepper motors have two phases, but three- and five-phase motors also exist.
• A bipolar motor with two phases has one winding/phase.
• Unipolar motor has one winding, with a center tap per phase. Sometimes the
unipolar stepper motor is referred to as a “four phase motor”, even though it
only has two phases.
• Motors that have two separate windings per phase also exist—these can be
driven in either bipolar or unipolar mode.

Stepping Modes
• The following are the most common drive modes.
• Wave Drive (1 phase on)
• Full Step Drive (2 phases on)
• Half Step Drive (1 & 2 phases on)
• Microstepping (Continuously varying motor currents)
An Open-loop Stepper Motor Controller 225

Table 1: Excitation sequences for different drive modes.

Important Characteristics of the Stepper Motor


Torque Vs. Angle Characteristics
• The torque vs angle characteristics of a stepper motor are the relationship
between the displacement of the rotor and the torque which applied to the
rotor shaft when the stepper motor is energized at its rated voltage.
• An ideal stepper motor has a sinusoidal torque vs displacement characteristic
as shown in figure

Torque Vs. Rotor Angular Position Angular Position at Different Holding Torques
Step Angle Accuracy
• One reason why the stepper motor has achieved such popularity as a
positioning device is its accuracy and repeatability.
• Typically stepper motors will have a step angle accuracy of 3 – 5% of one
step.
• This error is also noncumulative from step to step.
• The accuracy of the stepper motor is mainly a function of the mechanical
precision of its parts and assembly.
226 Zoonubiya Ali and R.V Kshirsagar

Typical Plot of the Positional Accuracy of a Stepper Motor


Torque Vs. Speed characteristic
• The torque vs speed characteristics are the key to selecting the right motor and
drive method for a specific application.
• These characteristics are dependent upon (change with) the motor, excitation
mode and type of driver or drive method

A typical “speed – torque curve”

Necessity of Stepper motor control

CRUCIAL CONTROL

Position Time

Stepper motors can be found in For those applications that demand


printers, disk drives, X-Y plotters, and the controlled objects moved with
many others which are required to designated time to prearranged
move controlled objects to accurate positions; such as those used in
positions within nominated time. The autonomous cars, robotic arms with
precision positioning is a top priority low moment of inertia, industrial
than others consideration plants, etc. In such cases, time should
dominate among others
An Open-loop Stepper Motor Controller 227

Work Done in Past for the Controller Side of Stepper Motor


Petrov (1988) proposed a system by a microcomputer achieved a variable speed
controller. On account of processing speed restrictedly, high resolution could not be
provide. In order to approach the linear acceleration, the digital-to-analog converter
(DAC) is used to increase resolution.
Kenjo (1994) advanced a theory that derived the formulas of linear acceleration.
Kang (1994) developed a new method using single microprocessor to control
stepper motor at the same time.
 The advantage of microprocessor is that it is easy for design the control mode
of stepper motor by user, including start, stop, and clockwise or counter-
clockwise indeed.
Nevertheless, it cannot make a breakthrough in variable speed controller of
stepper motor for limited capability of microprocessor.
However, microprocessor can only control by constant speed.
Although the capability of microprocessor is limited, it has taken some important
steps in automation.
To control the stepper motor, the driver can apply an open loop control algorithm
or closed loop algorithm.
With applications where load torque is stable and operations are at low speed, an
open loop driver is preferred since it needs a simple control algorithm and an encoder
is not required.
Bae and Krishnan (1996) reported that when the open loop driver is implemented
with a DSP in the C programming language, the coding and debugging is
straightforward.
As the IC industry boomed over the recent decade, large amounts of data process
more and more fast in digital system. Because of this, the system on chip (SOC) and
DSP are popular with designers.
Kos (2006) presented an algorithm to realize the linear variable speed controller
by adjusting the torque corresponding current.
Le (2006), proposed variable speed controller using close-loop control. He used
an optical encoder coupling with motor. This encoder can check the angle of motor. If
angle exceed the range between winding and rotor, it will switch to close-loop,
whereas open loop. This system is implemented on DSP, and velocity profile stored in
memory.

Conclusion
This paper presented an open loop stepper motor driver using a CPLD.The basics of
stepper motor was described, the CPLD is used to build a high performance open loop
driver without using a DSP or microcontroller. Furthermore it is compatible with
ASICs and mass production methods.
228 Zoonubiya Ali and R.V Kshirsagar

References
[1] J. Petrov and S. Strmik, “A Microcomputer-Based Speed Controller for Lift
Drives”, IEEE Transactions on Applications, Vol. 24, No. 3, pp. 487 - 498,
1988.
[2] T. Kenjo and A. Sugawara, “Stepping Motors And Their Microprocessor
Controls Second Edition”, Oxford University Press, 1994.
[3] Bae and Krishnan (1996) H. K. Bae and R. Krishnan, “A Study of Current
Controllers and Development of a Novel Current Controller for High
Performance SRM Drivers,” IEEE Industry Applications Conference, vol. 1,
pp. 68-75, Oct.1996.
[4] D. Kos, A. Kapun, M. Curkovic, and K. Jezernik, “Efficient Stepper Motor
Torque Ripple Minimization Based on FPGA Hardware Implementation”,
IEEE Industrial Electronics, IECON 2006-32nd Annual Conference, pp. 3916
–3921, in Paris, France, Dec. 2006.
[5] N. Q. Le, J. U. Cho, and J, W, Jeon, ”Application of Velocity Profile
Generation and Closed-Loop in Step Motor Control System”, SICE-ICASE
Internation Joint Conference, pp. 3593 –3598, in Bexco, Busan, Korea, Oct.
2006.
[6] D. O. Carrica, S. A. González, and M. Benedetti, “A high speed velocity
control algorithm of multiple stepper motors”, Elsevier, Mechatronics, Vol.
14, Issue 6, pp. 675 – 684, 2004.
[7] Xiaoyin Shao and Dong Sun, “Development of an FPGA-Based Motion
Control ASIC for Robotic Manipulators,” IEEE Proceedings of The Sixth
World Congress on Intelligent Control and Automation, vol. 2, pp. 8221-8225,
Jun. 2006.
[8] Ngoc Quy Le and Jae Wook Jeon An Open-loop Stepper Motor Driver Based
on FPGA, International Conference on Control, Automation and Systems
2007, Oct. 17-20, 2007 in COEX, Seoul, Korea, 1322-1326.
[9] Brown and Rose, (1996) Architecture of FPGAs and CPLDs: A Tutorial ,
Survey published by University of Toronto.
[10] Gayakwad,(year of publication) Analog & Digital control systems, Prentice
Hall Publications, ISBN 0- 13- 033028.
[11] Ngoc Quy Le and Jae Wook Jeon, (2007), An Open-loop Stepper Motor
Driver Based on FPGA, International Conference on Control, Automation and
Systems, Oct. 17-20, 2007 , Seoul, Korea, pp. 1322-1326.
[12] Tzung-Cheng Chen and Yung-Chun Su, (2008), High Performance Algorithm
Realization on FPGA for Stepper Motor Controller, SICE Annual Conference,
August 20-22, 2008, The University Electro- Communications, Japan.
[13] Daniel Carrica, Marcos A. Funes, and Sergio A. González,(2003), Novel
Stepper Motor Controller Based on FPGA Hardware Implementation,
IEEE/ASME Transactions on Mechatronics, vol. 8, no. 1,pp 120-124.
[14] Robert Dueck, (2004), Digital design with CPLD Applications & VHDL, 2nd
edition , Thomnson Delmar Learning, ISBN 1-1401840302.
[15] IEEE standard VHDL Language reference manual, IEEE STD 1076-2002.

You might also like