[ieee 2013 brazilian power electronics conference (cobep 2013) - gramado, brazil...

6

Click here to load reader

Upload: maria-emilia

Post on 27-Jan-2017

218 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: [IEEE 2013 Brazilian Power Electronics Conference (COBEP 2013) - Gramado, Brazil (2013.10.27-2013.10.31)] 2013 Brazilian Power Electronics Conference - Stepper motor drive for computer

STEPPER MOTOR DRIVE FOR COMPUTER

NUMERICAL CONTROL MACHINES

Paulo Augusto Sherring da Rocha Junior, Maria Emilia de Lima Tostes Universidade Federal do Pará – Centro de Excelência em Eficiência Energética da Amazônia – Laboratório de Sistemas

Motrizes.

[email protected]

Abstract – This work presents a open loop stepper

motor driving, with configurable parameters, such as

driving schema and nominal current. The developed

system is based on microcontroller, monolithic switches

and discrete analog electronics, aiming to reduce the

overall cost. The building blocks employed on the system

are briefly presented and are divided into: Digital

Electronics, Analog Electronics and Power Electronics.

Experimental results with the assembled system

suggested the well behavior of current regulation for

various driving schemas, such as half step and micro step

¼. The performance parameters from the experimental

results were found to be reasonable and within expected.

The system presented in this paper is part of a CNC

routing system.

Keywords – Computer Numerical Control, Hybrid

Stepper Motor, Motor Drive.

I. INTRODUCTION

Stepper motors are a particular variation of variable

reluctance machines and are designed to achieve higher

compatibility and ease of use when interfacing with digital

electronics systems. Its mechanical design has a main

purpose: achieve a high positioning resolution. Both stator

and rotor are built with a castle like structure, with tooth

along their circumference and the final resolution of the

system is proportional to this number of tooth. General

purpose stepper motors are rated with resolutions as low as

0.9 ˚. Precision, high end stepper motors are able to achieve

up to 0.05 ˚. Increasing the resolution by means of

mechanical design only also increases drastically the final

cost of the machine. It is worth noting that stepper motors'

weight and power ratio is high, from where arises a

maximum achievable power as well.

Due to its conception, stepper motors are one of the most

employed mechanical drivers for positioning systems in

various systems. Its application varies from low power

systems, where only a few tenths of watts are necessary, to

more power demanding systems, from a few watts to up to

hundred of watts are needed. On low power systems, such as

hard disk drives, CD, DVD and BD units, and ink-jet printer,

these motors perform flawlessly and its application probably

will not fade on next decades, because of the ease of

development and use.

Concerning to more power demanding applications,

stepper motors are also employed on productive units,

ranging from desktop, low productivity, units to industrial,

entry level, units. On these systems, stepper motors have

more issues on performing as well, due to issues that are not

easy to address when using low-end electronics. Problems

such as low-speed and high speed performance discrepancies

and electro-mechanical resonance usually arises when

dealing with higher power systems.

The academic community put some effort towards better

driving techniques to overcome these issues. On [1] and [2],

it is explained a couple of modern and classic control

techniques, based on Kalman Filters, Fuzzy control and

Proportional-Integral, both being applied in a closed loop

approach, based on high end electronics, i.e. FPGA. On [3],

an open loop approach is presented, using micro step

technique to reduce vibration - and, in consequence,

resonance - and to enhance positioning precision.

The purpose of this paper is to present a stepper motor

drive system, which was applied for positioning control on a

Computer Numerical Controlled router machine, which was

briefly presented on [4] and [5]. This paper aims to provide

basics insight on stepper motor driving technique and present

the main elements of the developed system.

II. STEPPER MOTOR THEORY AND ITS DRIVERS

Stepper motors are quite different from usual electrical

machines. It can be regarded as a brushless DC motor, whose

rotor rotates in discrete angular increments when its stators

windings are programmatically energized [6]. The rotor has

no electrical windings and can have: salient poles, relating to

a variable reluctance machine; magnetized poles, relating to

a permanent magnet DC motor; or can have both, in which

case the motor is regarded as a hybrid stepper motor, being

this the most common topology among the machines with

higher power ratting. This work aims mostly at hybrid

stepper motors and only this design will be regarded from

now on.

These motors are usually made of two or more stator

windings, being more common two, four and five windings

design. Each phase can be seen as a variable inductance,

�(�), varying with the mechanical shaft angle, �. This

relation between � and �(�) arises from the very conception

of the motor. Figure 1 presents an example of the relation for

a motor with the following characteristics: two phase, 90˚ per

step, 41� nominal inductance.

As can be seen in Figure 1, the inductance of each phase

has a periodic peeks in well-defined angular positions. That

happens because the tooth of the stator align with tooth of

rotor, hence, reducing the air gap and increasing accordingly

the inductance.

978-1-4799-0272-9/13/$31.00 ©2013 IEEE 909

Page 2: [IEEE 2013 Brazilian Power Electronics Conference (COBEP 2013) - Gramado, Brazil (2013.10.27-2013.10.31)] 2013 Brazilian Power Electronics Conference - Stepper motor drive for computer

Fig. 1 - Typical inductance profile plotted against �, for each phase

of a two phase stepper motor.

It can be seen on Figure 1 that in no time the inductance

falls to zero. Torque generated by such a motor is given by:

�� = ��2 ∙ ��(�)�� (1)

where � is the current on the winding, �(θ) is the inductance

of the phase and � is the angular position of the shaft.

Figure 2 presents the torque generated by the previously

described stepper motor and such waveform is obtained by

taking the derivative of inductance with respect to �. It

should be noted that magnetic saturation effect was not

considered.

Fig. 2 - Typical torque exerted by a two phase stepper motor.

The behavior seen in Figure 2 justifies why stepper motors

are inherently used for position control: when a given

winding is energized, the rotor aligns with the respective

stator energized winding; if some external load torque tries to

move the rotor from that position, an opposing torque will

act in such a way to move back the rotor to the original rest

position; if the load torque is higher than any opposing

torque that the motor can generate, the shaft will enter an

instability region and will move the rotor to another stable

position.

From Figures 1 and 2, it can be seen that stepper motors'

resolution is related to its mechanical complexity, in a sense

that the smaller distance between peeks for an inductance

waveform, the higher will be its mechanical resolution.

General purpose motors, with cylindrical rotor, the resolution

can be as low as 0.9˚. Application specific motors, with disk

rotor structure, resolution can be as low as 0.05˚.

From that previous analysis, it can be observed that to

control the position of a stepper motor, one only have to keep

a constant current flowing through a stator winding.

However, this position control is limited by three elements:

its maximum torque driving capacity, known as holding

torque; the number of phases a motor has; and the number of

tooth that both stator and rotor have.

A. Driving Schemas

Besides the mechanical design, the final resolution of a

stepper motor is also dependent on how the stepper motor is

driven. These machines are digital like actuators, in a sense

that only one of its windings is energized at a time. But, if

one drives the motor with smoother signals, a smoother

motion is yielded. So, instead of driving a winding at a time

to its nominal current, a discretized sine-squared (sin²) wave

can be applied in order to achieve smoother motion.

Traditional driving schema is known as full step. If one

breaks the transitions in 2, it is known as half step. For more

fractional driving schema, it is named n-th micro step, were n

is the number of subdivisions on the signal. The Tables 1, 2

and 3 illustrates the three driving schemas, respectively. On

those Tables, the symbols ½, ¼ and ¾ actually are shorted to

the values ���, ��

� e ���, respectively.

TABLE I

Lookup table used for full step driving schema.

Index � � �̅ �

1 1 0 0 0

2 0 1 0 0

3 0 0 1 0

4 0 0 0 1

TABLE II

Lookup table used for half step driving schema.

Index � � �̅ �

1 1 0 0 0

2 ½ ½ 0 0

3 0 1 0 0

4 0 ½ ½ 0

5 0 0 1 0

6 0 0 ½ ½

7 0 0 0 1

8 ½ 0 0 ½

910

Page 3: [IEEE 2013 Brazilian Power Electronics Conference (COBEP 2013) - Gramado, Brazil (2013.10.27-2013.10.31)] 2013 Brazilian Power Electronics Conference - Stepper motor drive for computer

TABLE III

Lookup table used for micro step 1/4 driving schema.

Index � � �̅ �

1 1 0 0 0

2 ¾ ¼ 0 0

3 ½ ½ 0 0

4 ¼ ¾ 0 0

5 0 1 0 0

6 0 ¾ ¼ 0

7 0 ½ ½ 0

8 0 ¼ ¾ 0

9 0 0 1 0

10 0 0 ¾ ¼

11 0 0 ½ ½

12 0 0 ¼ ¾

13 0 0 0 1

14 ¼ 0 0 ¾

15 ½ 0 0 ½

16 ¾ 0 0 ¼

Those tables are used as current reference for a controlled

current source, which is better explained in the next subtopic.

B. Controlled Current Source

From Equation (1), the torque exerted by the motor is

related by the displacement from the rest position and also to

the current flowing on the winding. For a constant holding

torque, a controllable constant current source must be

implemented.

In order to do so, H-Bridge circuit along with comparators

and logic circuitry can be used. Such a circuit is depicted on

Figure 3.Transistors Q1 through Q4 are power transistors and

carry the load current. Diodes D1 through D4 are free-

wheeling diodes. !"#$%&. is a low resistance resistor in series

with load current, generating a small voltage signal, (()), which is filtered with a low pass filter, in order to remove

high frequency noise, and compared to a current reference,

finally switching on and off Q1 through Q4.

The values applied to the inputs In1 and In2 are the values

of the current index of the active index table, presented in

last subsection. The active index table depends on which

driving schema is being used.

III. IMPLEMENTATION OF THE SYSTEM

The circuit presented by Figure 3 relies on analog devices,

such as comparators, and sources, such as the adjustable

current reference. Pure analog circuits usually are harder to

implement and are more expensive. The developed system

employs digital, analog and power circuits implement the

functionalities of the blocks previously described.

A. Digital Circuit

The digital portion circuit is the core of the developed

system and it is based on a microcontroller, produced by

Microchip, namely dsPIC33FJ12GP201, which is a general

purpose 16-Bits microcontroller, with several built-in

peripherals, such as Timers, Analog Digital Converter

(ADC), Universal Synchronous/Asynchronous Serial

Receiver/Transmitter (USART) and others.

Fig. 3 – Diagram illustrating a controllable current source.

The main functionalities executed by the microcontroller

are: Selectable drive schemas, being available full step, half

step and microstep 1/4 and 1/8; Current reference, controlled

according to the active drive scheme; Digital interface for

pulse, direction and enable signals; signal comparison;

Digital control of power transistors. Figure 4 presents some

variables and services that run within the microcontroller in

order to implement such functionalities.

There are four lookup tables, one for each available

driving schema and only one can be active at a time. Current

reference comes from the active lookup table in a given

index, stored at the variable Npos.

Fig. 4 – Block diagram of variables and services that run on

dsPIC33FJ12GP201.

An Acquisition service runs at 50 kHz. After acquisition

cycle, outputs that control the power switches are turned on

911

Page 4: [IEEE 2013 Brazilian Power Electronics Conference (COBEP 2013) - Gramado, Brazil (2013.10.27-2013.10.31)] 2013 Brazilian Power Electronics Conference - Stepper motor drive for computer

and off according to the comparison result of the current

reference and the read current.

A Pulse monitoring service runs whenever the state of the

pulse digital signal changes from high to low - the falling

edge - and increments or decrements the variable Npos,

according to the state of the direction digital input. The

variable Npos is bounded according to the size of the active

table and wraps around whenever it reaches its upper or

lower limits.

The real change on the stepper motors' position will take

place on the next acquisition cycle, where the switches are to

be controlled according to the new index on the active

lookup table.

B. Power Circuits

At the power stage, it was employed and monolithic IC,

namely L298, which integrates two H-Bridges and its

transistors drives circuits. The H-Bridge is based on Bipolar

Junction Transistor (BJT). Its maximum voltage is 40 V and

is capable of carrying 2 A by each bridge. External free-

wheeling, fast recovery diodes were used, to allow current

flow on the opposite direction of the BJT’s orientation.

The switches are controlled by digital inputs, turning them

on and off according to the drive’s logic. In series with the

load, more exactly under the low voltage side transistor, a

low resistance resistor was placed, generating a voltage

signal proportional to the load current. Such voltage is used

as input to the analog conditioning circuit.

C. Analog Circuit

There are a few operations needed to be carried out on the

current-proportional voltage signal before it can be used as

input to the ADC. These operations are: scaling and filtering.

Signal shifting was not necessary on this case, since the

signal of interest is positive only.

Filtering is necessary to preserve the spectral content of

the interest signal on the sampling process. Scaling is

necessary to reduce the error introduced on the discretization

process and to allow the signal to swing through the entire

range of the ADC.

The circuit on Figure 5 presents this functionality.

!*+,�-* forms a first order, low pass filter, with a cutoff

frequency given by:

./0&#** = 1!* . -* . 2. 1 (2)

The op-amp 231 along with the resistive network

!1+,�!2 forms a non-inverting amplifier, whose gain is

given by:

� = 4!�!�

+ 16 (3)

The transfer function, with respect the output voltage, (#,

and the load current, 78 , is given by:

9#(:)78(:) = 1

;!"#$%& + !*<. -* . : + 1. !"#$%& ∙ � (4)

Since !"#$%&. ≪ !*, equation (4) can be approximated to:

9#(:)78(:) = 1

!* . -* . : + 1. !"#$%& ∙ � (5)

Fig. 5 – Schematics of the current conditioning circuit.

Since the conditioned signal is sampled at 50 kHz, 15 kHz

band limiting would work just fine to avoid aliasing. Since

15 kHz cutoff frequency is hard to achieve with regular

discrete components, the cutoff frequency was approximated

to 15.157 kHz. To yield such frequency, along with an

overall gain of 0.5 V/A, the employed values were:

!* = 7?Ω !� = 40?Ω

-* = 1,5,D !� = 10?Ω

!"#$%& = 0.1Ω

IV. RESULTS

The system was built in a printed circuit board and is part

of a CNC milling/router system. The built system is

illustrated by Figure 6.

Two tests were carried out with the system: current

regulation; and the overall current waveform for three of the

driving schemas. All measurements were made with an

oscilloscope, with the gain of 0.47 V/A. The current signal

could not be directly measured, due to lack of correct

instrumentation – a high performance Hall Effect current

clamp –, so the current was measured through !"#$%&. itself.

Due to this fact, all the negative current swing was reflected

and observed as a positive swing, i.e. its absolute value was

observed.

Fig. 6 – Whole CNC system built.

Figure 7 shows the current ripple for one of the phases

with a set-point of 2A. The output voltage, given a 2� load

current, is 0.949, which is close to the mean value shown in

912

Page 5: [IEEE 2013 Brazilian Power Electronics Conference (COBEP 2013) - Gramado, Brazil (2013.10.27-2013.10.31)] 2013 Brazilian Power Electronics Conference - Stepper motor drive for computer

Figure 7. The value of 0.9509FGH was read, that yields a

load current of 2.0212�, that in turns corresponds to an

absolute error of IJKL = 0,0212� and a percentual error of

I% = 1,1%. The peak-to-peak load current ripple read was

7N%��OP = 0,097� and, percentually, 7N%��OP% = 4,888%.

Fig. 7 – Ripple of load current.

Next, the results achieved with two driving schemas are

shown. Figures 8 and 9 presents the actual current waveform

measured and the ideal current waveform, respectively, for a

half-step driving schema.

Fig. 8 – Measured current waveform for half step driving schema.

Fig. 9 – Ideal current waveform for half step driving schema.

Figures 10 and 11 present the actual current waveform

measured and the ideal current waveform, respectively, for a

micro step 1/4 driving schema.

Fig. 10 – Measured current waveform for micro step ¼ driving

schema.

Fig 11 – Ideal current waveform for micro step ¼ driving

schema.

V. CONCLUSION

The stepper motor drive is base of the low cost positioning

system. Currently, this topology is being largely employed

on low cost CNC systems, whose applications are as varied

as possible, being successfully applied to machining, pick-

and-place, 3D plastic printing and many others.

A stepper motor driving system was developed described

in this paper. The designed system is based on low cost

devices and performed as expected, with its performance

parameters within the expected. The experimental results

913

Page 6: [IEEE 2013 Brazilian Power Electronics Conference (COBEP 2013) - Gramado, Brazil (2013.10.27-2013.10.31)] 2013 Brazilian Power Electronics Conference - Stepper motor drive for computer

obtained from the developed system are presented. As

indicated by the measured current waveform plots, the

developed system could regulate the load current according

to the selected driving schemas.

ACKNOWLEDGEMENT

The authors would like to acknowledge: CNPq, for

supporting this research; Oyamota do Brasil, for supporting

the manufacturing of mechanical system; CEAMAZON, for

supporting high-end research and continuously effort on

producing human resources.

REFERENCES

[1] N. Dahm, M. Huebner, and J. Becker, "Approach of an

FPGA based adaptive stepper motor control system,"

Reconfigurable Communication-centric Systems-on-Chip

(ReCoSoC), 2011 6th International Workshop on, pp. 1-

6, Jun. 2011.

[2] N. Dahm, M. Huebner, and J. Becker, "FPGA system-

on-chip solution for a field oriented hybrid stepper motor

control," Systems, Signals and Devices (SSD), 2012 9th

International Multi-Conference on, pp. 1-6, Mar. 2012.

[3] G. Baluta and M. Coteata, "Precision microstepping

system for bipolar stepper motor control," Electrical

Machines and Power Electronics, 2007. ACEMP '07.

International Aegean Conference on, pp. 291-296, 2007.

[4] P. A. S. Rocha Jr., R. Diogne de Silva e Souza, and M.

E. de Lima Tostes, "Prototype CNC Machine Design,"

Journal of Energy and Power Engineering , pp. 1884-

1890, Nov. 2012.

[5] P. A. S. Rocha Jr., V. S. Kataoka, R. D. S. E. Silva, and

M. E. L. Tostes, "Planejamento de Trajetória Aplicado a

uma Máquina de Controle Numérico Computadorizado,"

Anais do XIX Congresso Brasiliero de Automática,

2012, 2012.

[6] V. V. Athani, Stepper Motors : Fundamentals,

Applications And Design, 1st ed. Daryaganj: New Age

International, 1997.

914