0% found this document useful (0 votes)
107 views4 pages

Control of Stepper Motor by Microcontrol

Uploaded by

Crispy Jelly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
107 views4 pages

Control of Stepper Motor by Microcontrol

Uploaded by

Crispy Jelly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Journal of Automation and Control, 2015, Vol. 3, No.

3, 131-134
Available online at http://pubs.sciepub.com/automation/3/3/19
© Science and Education Publishing
DOI:10.12691/automation-3-3-19

Control of Stepper Motor by Microcontroller


Ivan Virgala*, Michal Kelemen, Alexander Gmiterko, Tomáš Lipták

Department of Mechatronics, Technical University of Košice, Faculty of Mechanical Engineering, Košice, Slovakia
*Corresponding author: [email protected]

Abstract The paper deals with stepper motor control using microcontroller ATmega8-16PU. In the paper are
mentioned two ways of control, namely full-step mode and half-step mode control. At first, bipolar stepper motor is
introduced. For stepper motor control it has to be used H-bridge as well as amplifier in one module. Next, there is
created measuring stand consisting of bipolar stepper motor SY28STH32-0674A with one step angle 1.8° and
revolute encoder ISC3004 with 360 CPR. During the experiment were measured angular velocities by I/O measuring
card MF624 cooperating with Matlab/Simulink. The results show differences between used two stepping modes of
stepper motor.
Keywords: encoder, Matlab, microcontroller, stepper motor
Cite This Article: Ivan Virgala, Michal Kelemen, Alexander Gmiterko, and Tomáš Lipták, “Control of
Stepper Motor by Microcontroller.” Journal of Automation and Control, vol. 3, no. 3 (2015): 131-134. doi:
10.12691/automation-3-3-19.

where α motor step angle, spr is number of steps per


round, θ is position, n is number of steps, � is angular
1. Introduction velocity. The difference of stepper motor in comparison
with DC motor is that it doesn´t need encoder, because it
The main utilization of stepper motor is positioning of operates with open loop, while DC motor operates with
stepper motor rotor with required precision. Stepper motor closed loop. On the other side, stepper motor positioning
is suitable primarily for tasks where the precision is very is limited to step size of rotor. Disadvantages of stepper
important factor. Application areas are computer art (hard motor is for example lower torque in comparison with DC
disks, printers), tool machines, automobile industry, motor [4]. Principle of stepper motor can be seen in the
actuators of industry robots and manipulators etc. For Figure 1.
stepper motor control it is necessary control unit, which
generates steps of motor. [1]
The stepper motor is special type of synchronous motor.
Difference between synchronous and stepper motor is that
stepper motor can reaches certain amount of defined
positions. The step of motor is reached by suitable activity
of control unit. The basic principle of motion is very
simple. Electric current flowing through the coil generates
magnetic field. This magnetic field pulls opposite pole of
rotor magnet, see Fig.1. By suitable generating of pulses
to coils, the rotor starts to rotate. [2]
The angular velocity of motor is limited because of
transient performance magnetic field. By overshooting of
maximum motor speed the motor starts to lose its step. [3]
One of the first advantage of stepper motor is effective
positioning. For precise positioning can be determined
specific step and motor rotates to required position
without encoder. The basic relations of stepper motor are
following:

Figure 1. Stepper Motor

α= (1)
spr
θ = nα
2. Bipolar Stepper Motor
(2)
α
ω=
Bipolar stepper motors are composed of two windings
(3) and have four wires. Unlike unipolar motors, bipolar
dt motors have no center taps. The advantage to not having
Journal of Automation and Control 132

center taps is that current runs through an entire winding Full-step mode and half-step mode are in the Figure 3
at a time instead of just half of the winding [5]. shown.
The torque of bipolar stepper motor is proportional to Thick lines in the Figure 3 denote difference in voltage
the magnetic field intensity of the stator windings, which polarity. By considering Figure 2 and Figure 3, the stepper
is proportional to the number of turns and the current in motor control is following: the signal above the thick line
the winding [6,7,8]. The motor torque can be increased by (Figure 3) represents switching of transistor bases T1 and
increasing of number of turns or by increasing electric T4 while T2 and T3 are grounded (Figure 2). When the
current. [9] signal falls below thick line (Figure 3) the transistor bases
For bipolar control it is necessary to ensure changing of T2 and T3 are switched on, while T1 and T3 are grounded.
voltage polarity so, that coil current can flow to both
directions.

Figure 3. Full step mode and half-step mode


Figure 2. Control of Stepper Motor by H-Bridge

Changing voltage polarity can be reached by H-bridge, In the Figure 4 and Figure 5 the full step and half-step
mode are shown with clockwise rotation.
see Figure 2. By suitable switching of transistors bases T1,
T2, T3 and T4 can stepper motor performs rotational
motion. As can be seen on the Figure 2, there are

N
S
N

necessary two H-bridges. For our purposes will be used

S
N

circuit L298N which contains two independent H-bridges


S

as well as amplifier. Amplifier is necessary because of


microcontroller´s pins can produce electric current
roughly 20 - 40 mA. L298 receives control signals from Figure 4. Full step mode and half-step mode
the system’s controller, usually a microcomputer chip, and
provides all the necessary drive signals for the power
N

stage. Additionally, it includes two PWM chopper circuits S N


to regulate the current in the motor windings.
S

N
S

3. Control of Stepper Motor


S

N
S

N S
The usual ways of stepper motor control are wave mode,
S
N
N

full-step mode, half-step mode and micro-step mode.


Ideally stepper motor is controlled by sinusoidal current.
Using full-step mode the motor can exhibit vibration, Figure 5. Half-step mode and half-step mode
which are in some applications very ineligible. On the
other hand, using full-step mode motor can reach higher
torque. It depends on particular application what is more 4. Experiment and Results
important point.
Very frequently used method for stepper motor control The aim of the experiment is to compare full-step mode
are just full-step and half-step mode. This way of control and half-step mode of stepper motor control. For
is very simply and easy to realizable by any control unit. experiment is used bipolar stepper motor SY28STH32-
However, the problems arise in area of resonant zone and 0674A with 200 steps per revolution, what is 1.8° to one
motor can lost step. One way how can be this problem step. For measuring of angular velocity as well as position
solved is to distribute motor step into micro-steps. This of motor is used encoder ISC3004 with 360 count per
method causes better precise in positioning as well as it revolution. The measuring stand for experiment in the
limits angular velocity pulsation of rotor in the zone of Figure 6 is shown.
low step frequencies.
133 Journal of Automation and Control

Figure 6. Measuring stand

The motion of stepper motor is controlled by 8-bit


microcontroller ATmega8 with frequency of CPU 16 Figure 9. Angular velocity of stepper motor depending on control phase
MHz. ATmega8-16PU controls the motor using dual full As can be seen from the Figure 9 using half-step mode
bridge driver L298. This circuit was working on DC motor could start with lower value of phase time. Some
voltage of 7 V. The measuring of angular velocity as well problems occurred using phase time 1400 – 1900 µs and
as position of stepper motor is measured by I/O measuring motor couldn´t work. On the other hand, using full-step
card MF624 which cooperates with Matlab / Simulink. mode motor worked using all phase times between 780 –
Frequency of angular velocity measuring is 1 kHz. The 3400 µs. Step of phase time was 20 µs. Also the angular
measuring chain in the following figure is shown. velocity of motor was higher using full-step mode in
comparison with half-step mode.
During measuring of angular velocities there was also
measured electric current. The electric power for both
modes is shown in the Figure 10.

Figure 7. Measuring chain

Example of measured angular velocity is shown in the


following figure.

Figure 10. Electric power of stepper motor depending on control phase

Using full-step mode there was used higher amount of


electric power. So the motor torque was higher using full-
step mode. At the end there is also shown positioning of
stepper motor rotor to one round.

Figure 8. Example of measured angular velocity using time of phase


1500 µs

From all measured data was removed extreme peak


values. Also for all velocities was determined average
values. Then analysis were done from these average
values.
In the following figures there are shown results of
measurements. Figure 11. Positioning of stepper motor to one round
Journal of Automation and Control 134

5. Conclusion References
In the paper was experimentally analyzed bipolar [1] M. Kelemen, I. Virgala, Ľ. Miková, P. Frankovský, Experimental
stepper motor SY28STH32-0674A connected to encoder Identification of Linear Actuator Properties, Acta Mechanica
Slovaca (2015), Vol. 19, No. 1, pp. 42-47.
ISC3004 with 360 CPR. Motion was controlled by [2] M. Dababneh, W. Emar, I. TTrad, Chopper Control of a Bipolar
microcontroller ATmega8-16PU and dual full bridge Stepper Motor, International Journal of Engineering, Vol. 7, No. 2,
driver L298 working on 7V. As control method were used pp. 61-73, 2013.
full-step mode and half-step mode. Using full-step mode [3] F. Duchoň, M. Dekan, A. Babinec, L. Chovanec, A. Vitko,
were reached higher angular velocities. Also, rotor was Detection of Welds in Automated Welding, Applied Mechanics
and Materials, Vol. 611 (2014), pp. 519-528.
able to rotate using full range of phase time from value [4] A. Morar, The modelling and simulation of bipolar hybrid
780 up to 3400 µs. Using half-step mode there were stepping motor by Matlab/Simulink, Procedia Technology, 8th
occurred some problems using certain phase times from International Conference Interdisciplinarity in Engineering (2015),
the value 1400 up to 1900 µs and motor was unusable. By pp. 576-583.
measuring of electric current was found out that using [5] R. Condit, Stepping Motors Fundamentals, Microchip Technology
Inc., (2004).
full-step mode there is higher electric energy consumption [6] T. Hopkins, Stepper motor driving, Application note (2012).
and torque is higher like torque of half-step mode. [7] Stepanov P., Lagutkin S., Nikitin Y., Development of the
Algorithm for Definition of Residual Service Life by a
Comprehensive Diagnosis of the Electromechanical Drive, Acta
Acknowledgement [8]
Mechanica Slovaca. Volume 19, Issue 2, Pages 52-56.
P. Stepanov, S. Lagutkin, P. Božek, Y. Nikitin: Comprehensive
Approach to Technical Conditions of Electromechanical Units in
The authors would like to thank to Slovak Grant Mechatronic Systems, American Journal of Mechanical
Agency KEGA project no. 048TUKE-4/2014 “Increasing Engineering (2014).
of knowledge base of students in area of application of [9] Kollár, P., Nikitin, Y., Straka, M.: The determination of the shelf
embedded systems in mechatronic systems”. mass in the universal shelving stacker by measuring the frequency
converter torque generating current of the main drive,
Manufacturing technology, Vol. 15, No. 3, p. 363-366.

You might also like