Arduino Based Stepper Motor Speed Regulation For Robotics Applications
Arduino Based Stepper Motor Speed Regulation For Robotics Applications
Corresponding Author:
Khammampati R. Sreejyothi
Department of Electrical and Electronics Engineering, Teegala Krishna Reddy Engineering College
Medbowli, Saroornagar, Meerpet, India
Email: [email protected]
1. INTRODUCTION
The best methods and their microprocessor implementation for closed-loop control of hybrid stepper
motor drives were presented by the authors. The torque characteristics and ideal control angle of reluctant
stepper motor drives and hybrid stepper motor drives with additional series resistance have already been
covered in earlier research [1]. The primary contribution of the research is the analysis of the torque
characteristics and ideal control angle of hybrid stepper motor drives that are fitted with a current controller
and chopper amplifier [2]–[4]. The authors concentrated on the challenge of creating nonlinear controllers
synthetically to guarantee stable tracking of servo systems driven by stepper motors with permanent magnets.
To address the robust design, the authors make use of the admissibility idea, the Lyapunov-based design
framework, and electric machinery reasoning. Using nonquadratic Lyapunov candidates and investigating the
idea of nonlinear mapping, they present a novel nonlinear control technique [5]–[7]. The study also considers
the case where stepper motor parameters vary, necessitating thorough research to ensure the validity and
accuracy of the analytical, numerical, and experimental results [8]–[10]. The authors were presented on the
modeling, simulation, and control of a two-phase hybrid stepper motor (HSM). The authors develop a
simulation model using MATLAB to analyze the motor's transient performance under different excitation
schemes. The simulation results are validated for two specific HSM models: ST601 and ST1701, with step
angles of 1.8 degrees and torque ratings of 2 Kg.cm and 125 Kg.cm, respectively. To implement open-loop
control, the authors use National Instruments LABVIEW along with a DAQ card PCI 6221. They
experimentally observe and explain the resonance phenomenon in the motor system [11]–[12]. To maintain
speed under various loads, closed-loop current control is employed. Non-uniform motion in machines can be
achieved using linkage mechanisms or cams, which transform the uniform motion from a motor into the
desired non-uniform motion, alternatively, a servo motor can directly generate non-uniform motion under
computer control. Linkage mechanisms and cams can enable higher speeds in the machine's
operation [13]–[14]. They also allow for dynamic balancing to be incorporated without the need for
additional parts, and they generally exhibit a high degree of energy conservation during motion [15]–[16].
The paper addresses the limitations of widely used full-step open-loop stepping motor drive algorithms,
which suffer from a low torque/power ratio, large torque ripple, and resonance issues [17]–[18]. To improve
the performance of stepping motors for more demanding applications, closed-loop control is proposed [19].
The paper introduces a load angle estimation algorithm, which utilizes only voltage and current
measurements to provide the necessary feedback without requiring a mechanical position sensor [20]–[23].
Building upon this estimation, a novel closed-loop load angle controller is presented. The controller
optimizes the current level based on the estimated load angle. Developing this controller is challenging due to
the highly nonlinear current and load-angle dynamics [24]–[26]. This paper presents stepper motor control
drive by using Arduino controller. The simulations are verified by using MATLAB/Simulink software.
2. STEPPER MOTOR
The Figure 1 shows the basic principle of a stepper motor's operation involves a cycle of
electromagnets arranged around a rotor. These electromagnets are activated one after another in a specific
sequence using pulses of electrical energy. When an electromagnet is energized, it generates a magnetic force
that interacts with the rotor (typically made of iron). This interaction causes the rotor to move in incremental
steps. The direction of rotation (clockwise or counterclockwise) depends on the sequence in which the
electromagnets are activated. This controlled movement is widely used in applications requiring precise
positioning and controlled rotation.
𝑑𝑖𝑎
= [𝑣𝑎 − 𝑅𝑖𝑎 + 𝐾𝑚 𝜔 𝑠𝑖𝑛( 𝑁𝑟 𝜃)]/𝐿 (1)
𝑑𝑡
𝑑𝑖𝑏
= [𝑣𝑏 − 𝑅𝑖𝑏 + 𝐾𝑚 𝜔 𝑠𝑖𝑛( 𝑁𝑟 𝜃)]/𝐿 (2)
𝑑𝑡
The (1) and (2) are the a and b phase differential equations.
𝑑𝜔
= [−𝐾𝑚 𝑖𝑎 𝑠𝑖𝑛( 𝑁𝑟 𝜃) + 𝐾𝑚 𝑖𝑏 𝑐𝑜𝑠( 𝑁𝑟 𝜃) − 𝐵𝜔 − 𝑇𝐿 + 𝐾𝑑 𝑠𝑖𝑛( 4𝑁𝑟 𝜃)]/𝐽 (3)
𝑑𝑡
𝑑𝜃
=𝜔 (4)
𝑑𝑡
𝑐𝑜𝑠( 𝑁𝑟 𝜃) 𝑠𝑖𝑛( 𝑁𝑟 𝜃)
𝑀=( ) (5)
− 𝑠𝑖𝑛( 𝑁𝑟 𝜃) 𝑐𝑜𝑠( 𝑁𝑟 𝜃)
𝑑𝑖𝑑
= [𝑣𝑑 − 𝑅𝑖𝑎 + 𝑁𝑟 𝜔𝐿𝑖𝑞 )]/𝐿 (6)
𝑑𝑡
𝑑𝑖𝑞
= [𝑣𝑞 − 𝑅𝑖𝑞 + 𝐾𝑚 𝜔 − 𝑁𝑟 𝜔𝑖𝑑 )]/𝐿 (7)
𝑑𝑡
The (6) and (7) are the d-axis and q-axis first-order differential equation currents.
𝑑𝜔
= [𝐾𝑚 𝑖𝑞 − 𝐵𝜔] (8)
𝑑𝑡
𝑑𝜃
=𝜔 (9)
𝑑𝑡
𝑑𝑖𝑏_𝑓𝑏 𝑅 𝐾𝑚 𝑣𝐵+−𝑣𝐵−
=− 𝑖 − 𝜔𝑓𝑏 𝑐𝑜𝑠( 𝑁𝑟 𝜃𝑓𝑏 ) + (11)
𝑑𝑡 𝐿𝑜 𝑏_𝑓𝑏 𝐿𝑜 𝐿𝑜
𝑇 = 𝐾𝑚 [−𝑖𝑎_𝑓𝑏 𝑠𝑖𝑛( 𝑁𝑟 𝜃𝑓𝑏 ) + 𝑖𝑏_𝑓𝑏 𝑐𝑜𝑠( 𝑁𝑟 𝜃𝑓𝑏 )] − 𝐾𝑑4 𝑠𝑖𝑛( 4𝑁𝑟 𝜃𝑓𝑏 ) (12)
Int J Appl Power Eng, Vol. 13, No. 3, September 2024: 695-702
Int J Appl Power Eng ISSN: 2252-8792 697
3. CONTROL SCHEME
Figure 2 shows the closed loop control of stepper motor. The servo system model consists of a
motor with position feedback obtained from an optical encoder. Current control is achieved through a digital
PI current loop with proportional gain (Kp) and integration gain (Ki). An external torque is applied to the
motor shaft for testing. The identified constants, after tuning, include Kd4, Kd2, and Kd1 for torque ripple
reduction, along with phase angles φ2 and φ1, and Fs values for clockwise and anticlockwise motion.
Surprisingly, the first- and second-harmonic torque ripples are more significant than the fourth-harmonic
ripple, despite conventional expectations. Additionally, static friction contributes to damping motor
vibrations.
Arduino based stepper motor speed regulation for robotics applications (Khammampati R. Sreejyothi)
698 ISSN: 2252-8792
Figure 4 shows the stepper motor input voltage the magnitude of the voltage is 25 volts. This
voltage determines the strength of the magnetic field generated within the coils, which in turn controls the
movement of the motor's rotor. The input wave is a square wave. A square wave is a type of two distinct
voltage levels, typically a high voltage level and a low voltage level. The red color shows the A phase and the
blue color shows the B phase. Figure 5 shows the stepper motor input current wave from the magnitude of
the current is 2.5 Amps. The amount of electric current flowing through the coils of the stepper motor. In this
waveform, the A phase and B phase operate in a complementary manner. One phase is energized with
current, and the other phase is de-energized. When one phase is energized, the current rises to the specified
magnitude, and when the phase is de-energized, the current drops back down.
Int J Appl Power Eng, Vol. 13, No. 3, September 2024: 695-702
Int J Appl Power Eng ISSN: 2252-8792 699
Figure 6 shows the stepper motor input torque waveform the torque waveform looks like a
chattering. "Chattering" describes irregular torque behavior in a stepper motor due to resonance, low torque,
missed steps, noise, and incorrect current or mechanical issues. Figure 7 shows that we compared all the
input motor voltage, current, torque, and speed. Speed and torque look like an inverse proportion in this
waveform. Figure 7(a) shows the input voltage and the magnitude of voltage is 25 volts. The input waveform
is a square wave.in Figure 7(b) current is 0 to 1 sec. The current is steady state after 1 sec the current is
dynamic state. The waveform takes time 2 cycles for stability. The Figure 7(c) shows the torque wave form.
In Figure 7(d) the speed waveform increases from 0 to 6000. Time taken for the increase is 0.005 sec.
(a) (b)
(c) (d)
Figure 7. Stepper motor waveforms (a) source voltage, (b) source current, (c) torque, and (d) speed
Figure 8 shows the stepper motor design in tinker cad. The major components in this diagram are
the motor, battery, and IC ULN2004A. The Arduino is used for generating pulses for the stepper motor. The
battery gives a supply to the motor. The resister controls the current. Figure 9 This hardware implementation
of the stepper motor. In this hardware Arduino Uno board 5 k ohm stepper motor: the primary actuator that
converts electrical pulses into rotational movement. It has coils or phases that need specific signals to move.
Battery: provides the power supply to the motor. Ensure it's suitable for the motor's voltage and current
requirements. IC ULN2004A: A motor driver IC that acts as a buffer between the Arduino and the motor
coils. It amplifies the signals and handles the higher current requirements. The Arduino is to generated pulses
that control the stepper motor's movement. It sends step and direction signals to the ULN2004A. The resister
Arduino based stepper motor speed regulation for robotics applications (Khammampati R. Sreejyothi)
700 ISSN: 2252-8792
might be used to control the current flowing through the motor coils. It helps prevent excessive current that
could damage the motor. The widely used and adaptable Arduino platform is ideal for managing stepper
motors. Numerous applications, such as robotics, CNC machines, 3D printers, and others frequently use
stepper motors.
5. CONCLUSION
This paper presented speed control of stepper motor using Arduino. There are many special purpose
motors are available in market, like brush less dc motor, switched reluctance motor and servo motor.
Comparing to all this special purpose motors stepper motor has special features, this is highly reliable and
there no contact brushes in motor. This paper stepper motor simulation results are verified in
MATLAB/Simulink. The verified results are speed, torque, and current. The steady-state simulation results
are shown in results section.
REFERENCES
[1] C. Zheng and Z. Zhang, “Implementation of 4-axis stepper motor control system based on TC5540,” in 2011 International
Conference on Electrical and Control Engineering, IEEE, Sep. 2011, pp. 210–212, doi: 10.1109/ICECENG.2011.6057015.
[2] K. R. Sreejyothi, P. V. Kumar, and J. Jayakumar, “SRF theory-based PI controller applied to micro grid interfaced with hybrid
sources for power quality improvement,” in 2022 8th International Conference on Advanced Computing and Communication
Systems (ICACCS), IEEE, Mar. 2022, pp. 01–06, doi: 10.1109/ICACCS54159.2022.9785173.
[3] M. Onsal, Y. Demir, M. Aydin, and M. . Guven, “Impact of airgap on the performance of 3-phase permanent magnet hybrid
stepper motor,” in IECON 2021 – 47th Annual Conference of the IEEE Industrial Electronics Society, IEEE, Oct. 2021, pp. 1–5,
doi: 10.1109/IECON48115.2021.9589260.
[4] K. R. S. Jyothi, P. V. Kumar, and J. Jayakumar, “A review of different configurations and control techniques for DSTATCOM in
the distribution system,” E3S Web of Conferences, vol. 309, p. 01119, Oct. 2021, doi: 10.1051/e3sconf/202130901119.
Int J Appl Power Eng, Vol. 13, No. 3, September 2024: 695-702
Int J Appl Power Eng ISSN: 2252-8792 701
[5] P. Prodanov and D. Dankov, “Reliability of low-power stepper motor drivers,” in 2022 XXXI International Scientific Conference
Electronics (ET), IEEE, Sep. 2022, pp. 1–5, doi: 10.1109/ET55967.2022.9920214.
[6] I. C. Stika, L. Kreindler, and A. Sarca, “A robust method for stepper motor stall detection,” in 2013 8th International Symposium
on Advanced Topics in Electrical Engineering (ATEE), IEEE, May 2013, pp. 1–5, doi: 10.1109/ATEE.2013.6563391.
[7] C.-K. Lai, J.-S. Ciou, and C.-C. Tsai, “FPGA-based stepper motor vector control system design,” in 2017 International Automatic
Control Conference (CACS), IEEE, Nov. 2017, pp. 1–5, doi: 10.1109/CACS.2017.8284269.
[8] B. Aranjo, P. K. Soori, and P. Talukder, “Stepper motor drives for robotic applications,” in 2012 IEEE International Power
Engineering and Optimization Conference, IEEE, Jun. 2012, pp. 361–366, doi: 10.1109/PEOCO.2012.6230890.
[9] N. F. B. Filho, “Numerical and experimental analysis on the planar force and the magnetic field in a DC Linear Stepper Motor,”
in 2013 Brazilian Power Electronics Conference, IEEE, Oct. 2013, pp. 884–889, doi: 10.1109/COBEP.2013.6785219.
[10] K. R. Sreejyothi, K. Chenchireddy, N. Lavanya, R. M. Reddy, K. Y. G. Prasad, and R. Revanth, “Level-shifted PWM techniques
applied to flying capacitor multilevel inverter,” in 2022 International Conference on Electronics and Renewable Systems
(ICEARS), IEEE, Mar. 2022, pp. 41–46, doi: 10.1109/ICEARS53579.2022.9752074.
[11] K. Thadkapally, F. T. Josh, J. J. Joseph, and J. Jayakumar, “The hybrid solar energized back-to-back high voltage direct current
modular converter for distributed networks,” Bulletin of Electrical Engineering and Informatics, vol. 13, no. 1, pp. 88–97, Feb.
2024, doi: 10.11591/eei.v13i1.5771.
[12] S. Gong and B. He, “LabVIEW-base automatic rising and falling speed control of stepper motor,” in 2009 International
Conference on Electrical Machines and Systems, IEEE, Nov. 2009, pp. 1–4, doi: 10.1109/ICEMS.2009.5382704.
[13] W. Kim, C. Yang, and C. C. Chung, “Design and implementation of simple field-oriented control for permanent magnet stepper
motors without DQ transformation,” IEEE Transactions on Magnetics, vol. 47, no. 10, pp. 4231–4234, Oct. 2011, doi:
10.1109/TMAG.2011.2157956.
[14] A. H. Ahmed, A. E. S. B. Kotb, and A. M. Ali, “Comparison between fuzzy logic and PI control for the speed of BLDC motor,”
International Journal of Power Electronics and Drive Systems (IJPEDS), vol. 9, no. 3, p. 1116, Sep. 2018, doi:
10.11591/ijpeds.v9.i3.pp1116-1123.
[15] M. A. Ibrahim, A. K. Mahmood, and N. S. Sultan, “Optimal PID controller of a brushless dc motor using genetic algorithm,”
International Journal of Power Electronics and Drive Systems (IJPEDS), vol. 10, no. 2, p. 822, Jun. 2019, doi:
10.11591/ijpeds.v10.i2.pp822-830.
[16] S. J. Hammoodi, K. S. Flayyih, and A. R. Hamad, “Design and implementation speed control system of DC Motor based on PID
control and matlab simulink,” International Journal of Power Electronics and Drive Systems (IJPEDS), vol. 11, no. 1, p. 127,
Mar. 2020, doi: 10.11591/ijpeds.v11.i1.pp127-134.
[17] M. S. Amiri, M. F. Ibrahim, and R. Ramli, “Optimal parameter estimation for a DC motor using genetic algorithm,” International
Journal of Power Electronics and Drive Systems (IJPEDS), vol. 11, no. 2, p. 1047, Jun. 2020, doi:
10.11591/ijpeds.v11.i2.pp1047-1054.
[18] F. A. Hasan and L. J. Rashad, “Fractional-order PID controller for permanent magnet DC motor based on PSO algorithm,”
International Journal of Power Electronics and Drive Systems (IJPEDS), vol. 10, no. 4, p. 1724, Dec. 2019, doi:
10.11591/ijpeds.v10.i4.pp1724-1733.
[19] B. Ramesh, K. Chenchireddy, B. N. Reddy, B. Siddharth, C. V. Kumar, and P. Manojkumar, “Closed-loop control of BLDC
motor using hall effect sensors,” International Journal of Applied Power Engineering (IJAPE), vol. 12, no. 3, p. 247, Jul. 2023,
doi: 10.11591/ijape.v12.i3.pp247-254.
[20] J. Yu, Y. Wang, H. Kang, and G. Lu, “A control system of three-axis stepper motor based on the FPGA,” in Proceedings 2013
International Conference on Mechatronic Sciences, Electric Engineering and Computer (MEC), IEEE, Dec. 2013, pp. 3334–
3337, doi: 10.1109/MEC.2013.6885593.
[21] M. A. Vernezi, D. V. Nazarenko, and E. H. Abderrazzak, “Vibration suppression of stepper motors by the electric method,” in
2021 International Conference on Industrial Engineering, Applications and Manufacturing (ICIEAM), IEEE, May 2021, pp. 566–
570, doi: 10.1109/ICIEAM51226.2021.9446366.
[22] T. A. Khan, T. A. Taj, and I. Ijaz, “Hybrid stepper motor and its controlling techniques a survey,” in Proceedings of the 2014
IEEE NW Russia Young Researchers in Electrical and Electronic Engineering Conference, IEEE, Feb. 2014, pp. 79–83, doi:
10.1109/ElConRusNW.2014.6839207.
[23] K. P. Soneji, H. K. Patel, and S. Karkari, “Vacuum linear feed through drive using stepper motor and lead screw,” in 2013 Nirma
University International Conference on Engineering (NUiCONE), IEEE, Nov. 2013, pp. 1–4, doi:
10.1109/NUiCONE.2013.6780185.
[24] D. Ceulemans, N. van Oosterwyck, J. Demetsenaere, J. de Viaene, J. Steckel, and S. Derammelaere, “Time-optimal stepper motor
motion profile through a novel load-angle-based step-command optimization,” in 2021 IEEE International Electric Machines &
Drives Conference (IEMDC), IEEE, May 2021, pp. 1–7, doi: 10.1109/IEMDC47953.2021.9449522.
[25] K. Chenchireddy, V. Kumar, and K. R. Sreejyothi, “Investigation of performance vector control single-phase induction motor,” in
2021 7th International Conference on Advanced Computing and Communication Systems (ICACCS), IEEE, Mar. 2021, pp. 887–
891, doi: 10.1109/ICACCS51430.2021.9441773.
BIOGRAPHIES OF AUTHORS
Arduino based stepper motor speed regulation for robotics applications (Khammampati R. Sreejyothi)
702 ISSN: 2252-8792
Int J Appl Power Eng, Vol. 13, No. 3, September 2024: 695-702