IEEE Access (Jan 2023)

Implementation in Microcontrollers of an Algorithm for the Simple Generation of Speed Profiles in a Stepper Motor and Their Associated Kinematics

  • Jorge Fonseca-Campos,
  • Israel Reyes-Ramirez,
  • Juan L. Mata-Machuca,
  • Leonardo Fonseca-Ruiz,
  • Paola N. Cortez-Herrera,
  • Luis Bernardo Flores-Cotera,
  • Ricardo Aguilar-Lopez

DOI
https://doi.org/10.1109/ACCESS.2023.3343638
Journal volume & issue
Vol. 11
pp. 143782 – 143803

Abstract

Read online

Electric motors are the most widely used actuators for converting electrical to mechanical energy. Stepper motors perform various automated tasks because their position control is accurate. The operation of these devices at high speeds reduces the time required to perform automated operations. However, this can create inconveniences such as loss or excess of steps, with a consequent positioning error. Controlling the motor using a speed profile is the most commonly employed technique for avoiding this problem. Its generation usually requires hardware with high computing power, such as digital signal processors or field programmable gate arrays, and algorithms requiring specifications not published in the motor datasheet. In this study, we implemented an algorithm to simplify the generation of speed profiles. In the acceleration and deceleration regions, the velocity follows a logarithmic, quasi-linear, quadratic, or sinusoidal pattern. The algorithm provides position and time arrays. The speed and acceleration can be calculated in terms of time using numerical derivatives. The simulation results were validated using two microcontrollers to control a stepper motor programmed on Arduino and Micropython platforms. Experimental measurements using an encoder, gyroscope, and accelerometer validated the kinematic response of the stepper motor. These values are in a good agreement with the simulation results.

Keywords