Stepping motor control system
Through the real-time adjustment of duty cycle by the closed-loop control system, the problem of difficult to accurately control the current magnitude under the open-loop control of stepper motors is solved, and the rapid and precise adjustment of current is achieved, improving the reliability and control performance of the system.
Patent Information
- Application Number
- CN202510553119.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-29
- Publication Date
- 2025-08-12
AI Technical Summary
The open-loop control method of existing stepper motors is difficult to accurately control the current magnitude, resulting in the motor vibration, heating or stalling, especially when the motor parameters and usage conditions change. The traditional calibration method is time-consuming and cumbersome.
A closed-loop control system is adopted to form a closed-loop control through the combination of command devices, sine wave generation devices, adjustment devices, choppers, power drive devices, measurement devices and adjustment modules, and the duty cycle is adjusted in real time to accurately control the current magnitude.
It realizes rapid and precise control of the current magnitude when the motor parameters and usage conditions change, improves the reliability and control performance of the system, and reduces the risks of motor vibration and heating.
Smart Images

Figure CN120474397A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of H-bridge drive circuits, in particular to a stepping motor control system. Background Art
[0002] Stepper motors are widely used in real-world applications due to their simple control methods and fast response times. They often operate under open-loop control, achieving high-precision stepper control without the need for a feedback system. They are particularly well-suited for low-speed, high-torque requirements. A common type of stepper motor is a two-phase, four-wire hybrid. In open-loop control, a specific voltage duty cycle is typically applied to two coils, generating sine and cosine voltage modulation waves with a 90-degree phase difference. These modulation waves are compared with a triangular carrier to generate a corresponding PWM drive signal to control the H-bridge, thereby regulating the stepper motor's motion.
[0003] However, this open-loop control approach presents potential issues. The main issue is that the current magnitude is difficult to predict due to variations in motor parameters and operating conditions (such as resistance, inductance, back-EMF constant, speed, and external load). Uncertain current can lead to numerous problems: If the current is too high, the motor may experience excessive vibration and heat generation, affecting the effective operation of the mechanical system; if the current is too low, the motor may stall, especially under high loads or with drastic load fluctuations. Furthermore, as the motor speed changes, the back-EMF also causes current variations, typically manifesting as higher current at low speeds and lower current at high speeds.
[0004] In this situation, the traditional approach is to pre-calibrate the selected stepper motor. This method requires calibrating the current for different duty cycles in specific application scenarios, allowing manual selection of the appropriate duty cycle for control. However, this calibration process is time-consuming and cumbersome, especially when application conditions (speed and load) change or the motor is replaced, requiring recalibration. This fails to fundamentally address the aforementioned issues. Summary of the Invention
[0005] In order to solve the above technical problems, the present invention provides a stepper motor control system, which can accurately control the magnitude of the current without relying on motor parameters and usage conditions.
[0006] The technical solution is as follows: a stepping motor control system, characterized in that it includes: Command device, used to set the parameters of the stepper motor; A sine wave generating device, configured to receive the parameter signal output by the instruction device, generate a corresponding sequence according to the parameter signal, and generate a unit sine wave signal; an adjustment device for receiving a unit sine wave signal from the sine wave generating device and a duty cycle signal output by the adjustment module, and scaling the unit sine wave signal according to the duty cycle signal to form a modified sine wave signal; The chopper converts the modified sine wave signal to generate a PWM control signal for driving the motor; The power drive device includes a pre-driver module and an H-bridge. The pre-driver module processes the PWM control signal from the chopper to drive the H-bridge, which controls the magnitude and direction of the motor current. A measuring device for collecting current and sending it to the regulation module; The regulating module is used to receive the current measured by the measuring device and the target current output by the instruction device, and output a duty cycle signal.
[0007] After adopting the present invention, the regulation module outputs the duty cycle value to the adjustment device. The adjustment device scales the unit sine wave signal according to the duty cycle signal output by the adjustment module to form a final duty cycle instruction voltage signal, which further acts on the chopper module, power drive module and motor to form a closed-loop control. Ultimately, by controlling the duty cycle, the output current amplitude can be made close to the target current, thereby achieving precise control of the two-phase current. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] Figure 1 This is a schematic diagram of the system of the present invention; Figure 2 A-phase and B-phase current diagram. DETAILED DESCRIPTION
[0009] See Figure 1 As shown, a stepper motor control system includes a command device 1, a sine wave generating device 2, an adjustment device 3, a chopper 4, a power driving device 5, a motor 6, a measuring module 7 and a regulating module 8.
[0010] Command device 1 is used to set parameters such as the stepper motor's rotation direction, microstepping, microstep length, number of steps, and target current. The microstepping number, which represents the number of pulses corresponding to one 90° electrical angle, can be 2, 4, 8, 16, 32, 64, 128, or 256. A higher microstepping number results in finer and smoother motor rotation. The command device can also receive external pulses to determine the motor's stepping speed and number of steps.
[0011] Sine wave generator 2 receives the signal output by command device 1, generates a corresponding sequence based on the command parameters, and generates a corresponding first unit sine wave signal. As mentioned above, a higher subdivision number results in a sine wave that is closer to an ideal sine wave, and the motor rotates more smoothly. Specifically, for a two-phase, four-wire stepper motor, the generator also generates a second sine wave signal, 90° out of phase, to drive the other phase.
[0012] The adjustment device 3 is used to correct the sinusoidal wave signal, receives the unit sinusoidal wave signal from the sinusoidal wave generator 2 and the duty cycle signal output by the adjustment module 8, and scales the unit sinusoidal wave signal according to the duty cycle signal output by the adjustment module 8 to form a final duty cycle command voltage signal. It can be understood that the signal finally output by the adjustment device 3 is a corrected sinusoidal wave signal.
[0013] Chopper module 4 converts the modulated sine wave signal into a PWM control signal for driving the motor. Internally, the modulated wave signal is compared with a triangular carrier signal, and the corresponding high and low level signals are output as the PWM signal. The frequency of the carrier signal determines the frequency of the PWM signal. When the duty cycle is 0, the output is low throughout the cycle, while when the duty cycle is 1, the output is high throughout the cycle.
[0014] The power drive device 5 includes a pre-driver module and an H-bridge. The pre-driver module processes the pulse PWM signal from the chopper 4 and amplifies the lower voltage signal to the voltage level required by the H-bridge, ensuring sufficient driving power to drive the H-bridge. The H-bridge achieves precise control of the current magnitude and direction of the motor 6 by controlling four switching elements (such as MOSFETs or transistors). As mentioned above, for a two-phase four-wire motor, the power drive device 5 includes two sets of pre-driver modules and H-bridges, each set controls one coil, and the current in the coil also has a current waveform with a phase difference of 90 degrees, thereby driving the movement of the stepper motor. Figure 2 Phase A and phase B current.
[0015] Measuring device 7 is an analog-to-digital conversion module that collects the currents of phases A and B at the same moment and sends a digital signal representing the current magnitude to regulation module 8, located in the digital control unit. The analog-to-digital conversion module collects the current value once during each PWM cycle. Regulation module 8 receives the current magnitude measured by measuring device 7 and the target current magnitude output by command device 1, and outputs a duty cycle signal. Within regulation module 8, module 8 first calculates the current amplitude—the root sum of the squares of the currents of phases A and B—to obtain the current amplitude at that moment. The difference between this calculated value and the desired target current is then input into the PI regulation module, which performs a PI operation and outputs the duty cycle value to sine wave adjustment device 3. Based on the duty cycle signal output by adjustment module 8, adjustment device 3 scales the unit sine wave signal to form a final duty cycle command voltage signal, which is then applied to the chopper module, power drive module, and motor, forming a closed-loop control system. By controlling the duty cycle through PI regulation, the closed-loop system can keep the output current amplitude close to the target current, thereby achieving precise control of the two-phase current magnitude.
[0016] In summary, the stepper motor control system uses the aforementioned method to measure and feedback each phase current, calculate the current amplitude, and generate a new voltage duty cycle signal, which is then applied to the next operating cycle. This forms a fast current closed-loop regulation system, accurately and quickly controlling the motor current amplitude to the target current. Because the analog-to-digital conversion module collects current values once per PWM cycle, the system can quickly control and adjust the current by properly designing the PI parameters and bandwidth, making it ideal for applications with drastically changing operating conditions.
[0017] The stepper motor current regulation and control system disclosed in the present invention has the following advantages: the control loop has a fast regulation speed and can accurately control the current; the feedback regulation circuit is not affected by motor parameters and operating conditions, and even if the external load and motor speed change, the system can still accurately regulate the current, thereby improving the system reliability and control performance.
Claims
1. A stepper motor control system, characterized in that: It includes: Command device, used to set the parameters of the stepper motor; A sine wave generating device, configured to receive the parameter signal output by the instruction device, generate a corresponding sequence according to the parameter signal, and generate a unit sine wave signal; an adjustment device for receiving a unit sine wave signal from the sine wave generating device and a duty cycle signal output by the adjustment module, and scaling the unit sine wave signal according to the duty cycle signal to form a modified sine wave signal; The chopper converts the modified sine wave signal to generate a PWM control signal for driving the motor; The power drive device includes a pre-driver module and an H-bridge. The pre-driver module processes the PWM control signal from the chopper to drive the H-bridge, which controls the magnitude and direction of the motor current. A measuring device for collecting current and sending it to the regulation module; The regulating module is used to receive the current measured by the measuring device and the target current output by the instruction device, and output a duty cycle signal.