Design of acceleration and deceleration control chip for stepper motor

Publisher:SerendipityLoveLatest update time:2016-06-16 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  A stepper motor (pulse motor) is an actuator that converts electrical pulses into angular displacement. It is an actuator of digital control. It can control the speed and acceleration of the motor by controlling the pulse frequency, thereby achieving the purpose of speed regulation. Stepper motors have the advantages of large torque, small inertia, and high response frequency, so they have the superior characteristics of instant start and rapid stop. The biggest advantage of stepper motors in various applications is that they can be controlled in an open-loop manner without feedback to control position and speed, but it is precisely because the load position has no feedback to the control circuit that the stepper motor must respond correctly to each excitation change. If the excitation frequency is not selected properly, the motor cannot move to a new position, then the actual load position will have a permanent error relative to the position expected by the controller, that is, a loss of step or overshoot will occur. Therefore, in the open-loop control system of the stepper motor, how to prevent loss of step and overshoot is the key to the normal operation of the open-loop control system.

  This design uses SPMC75F2413A as the controller of this system design. SPMC75F2413A is a new member of μ'nSPTM series products and a 16-bit microcontroller newly launched by Lingyang Technology. In this design, the pulse signal is generated by SPMC75F2413, and the drive circuit uses the two-phase stepper motor dedicated driver SLA7042M produced by Allergo to form the stepper motor drive circuit, and the actuator is a two-phase hybrid stepper motor.

  1 Stepper motor acceleration and deceleration control principle

  S-curve acceleration and deceleration changes the traditional three-stage acceleration and deceleration process into a seven-stage acceleration and deceleration process, forming an S shape, as shown in Figure 1. The acceleration section consists of the acceleration section (T1), the uniform acceleration section (T2), and the deceleration section (T3); the deceleration section consists of the acceleration and deceleration section (T5), the uniform deceleration section (T6), and the deceleration and deceleration section (T7); and the uniform speed section is (T4).

  

  In the control system of the stepper motor, when an electric pulse signal is given, the stepper motor rotates an angle or moves forward one step. If the input pulse number N is given, its frequency is f within the specified time T. The frequency f of the driving pulse changes with time t:

  

  Where fm is the maximum continuous frequency of the stepper motor, and τ is the time constant that determines the speed of the acceleration. It can be determined by experiments in actual work. The speed at which the system reaches a uniform speed and the time it takes for the system to reach the maximum speed are known.

  This system uses the microcontroller timer interrupt method to control the speed of the stepper motor. When controlling the speed, it actually continuously changes the size of the timer load value.

  The speed-up process is processed discretely, and the acceleration time is fixed as T=T1+T2+T3 in the design. For the convenience of explanation, T2=0. At this time, the acceleration section changes from 3 to 2, namely the acceleration section and the deceleration section. T is divided into 40 time periods of equal time, that is, the acceleration time T1 is divided into 20 equal parts, and the acceleration and deceleration time T3 is divided into 20 equal parts. The interval time between two speed changes is △t=T/40, and the frequency of each gear can be calculated by formula (1), and the number of steps performed by the stepper motor at each frequency can also be calculated.

  2 System Hardware Design

  Figure 2 is a block diagram of the system hardware design.

  

  In Figure 2, SPMC75F2413A is a

  The 16-bit microcontroller of the series products. The operating speed is 0-24 MHz within the operating voltage range of 4.5-5.5 V, with 2 K words of SRAM and 32 K words of flash ROM; IOA~IOD4 groups of 64-bit programmable I/O ports, 5 general-purpose 16-bit timers/counters. The system uses IOB0~IOB3 bits of the IOB port of S17MC75F2413A as the output port of the control signal, and IOB4 bit as the input port of the photoelectric sensor.

  Stepper motors are easy to interface with digital circuits, but the signal energy of general digital circuits is far from enough to drive the motor. Therefore, a matching driver must be used to drive the stepper motor. The driver tells the motor how many microsteps to run by providing a specific excitation current to the motor windings. When the stepper motor runs in full-step mode, it coincides with the mechanical design characteristics of the motor. At this time, the stator and rotor teeth are perfectly aligned, the current flowing through the winding is the largest, and the step angle is also the largest. As the number of subdivisions increases, the step angle decreases accordingly.

  The system uses the driver SLA7042M produced by Allergo, which essentially uses digital input to control the output current. Its two internal 4-bit shift registers receive the motor phase information and excitation current ratio data input by the SerialData pin respectively. The first bit of the 4-bit shift register first loads the phase information, then serially loads the lowest bit, the second lowest bit, and finally the highest bit of the excitation current ratio data. The driving circuit is shown in Figure 3.

  

  3 System Software Design

  The frequency of each frequency range and the number of steps taken by the stepper motor in the range can be calculated by formula (1), and the frequencies of the 40 ranges and the number of steps taken in each range are stored in two array variables respectively. The system software program first determines whether the stepper motor can reach the maximum speed. When the number of steps of the stepper motor is small, the stepper motor cannot reach the maximum speed and the speed will begin to decrease. At this time, the number of steps and frequency that can be achieved by increasing the speed, and the number of steps and frequency that can be achieved by decreasing the speed should be calculated first. The deceleration process is exactly the opposite of the acceleration process, that is, the data stored in the two arrays are output in the opposite order. Figure 4 is the software flow of the S-curve acceleration and deceleration of the stepper motor.

  

  4 Conclusion

  Using the Sunplus SPMC75F2413A microcontroller, the S-curve acceleration and deceleration method is used to effectively control the step loss and overshoot phenomenon that is easy to occur during the start and stop of the stepper motor. This control method is effective and practical, and has been verified in the CNC cutting system, and the results are stable and feasible.

Reference address:Design of acceleration and deceleration control chip for stepper motor

Previous article:Register operation method
Next article:Application of Single Chip Microcomputer in AC Induction Motor System

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号