Control of Stepper Motor by Microcontrol
Control of Stepper Motor by Microcontrol
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
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.
α= (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.
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
S
N
N
S
N
S
N S
The usual ways of stepper motor control are wave mode,
S
N
N
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.