FPGA-based constant current control system and control method for stepper motor
By combining an FPGA unit with a Hall effect angular displacement sensor, constant current control of a stepper motor without introducing a current loop is achieved, solving the problems of limited microcontroller resources and high complexity, and improving the reliability and control accuracy of the system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHANGZHOU UNIV
- Filing Date
- 2022-11-29
- Publication Date
- 2026-07-07
AI Technical Summary
In traditional stepper motor control systems, the microcontroller has limited input/output interface resources and weak anti-interference capabilities, which increases system complexity, weakens the advantages of open-loop control, and the existing current loop control further increases complexity.
An FPGA unit is used for constant current control of the stepper motor. The stepper motor is driven by a level conversion unit and a power amplifier circuit unit. The rotor position information is read in real time using a Hall effect angular displacement sensor to achieve current subdivision control without introducing a current loop. Constant current control is achieved by combining the preset duty cycle method.
It improves system reliability and driving capability, reduces hardware complexity, enhances the advantages of open-loop control, improves control accuracy and motion stability, and reduces noise and oscillation.
Smart Images

Figure CN116015121B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of constant current control technology for stepper motors, and in particular to a constant current control system and control method for stepper motors based on FPGA. Background Technology
[0002] Traditional stepper motor control methods use microcontrollers and other devices, but microcontrollers have relatively few input / output interface resources and relatively weak anti-interference capabilities; while FPGAs have relatively more input / output interface resources, relatively stronger anti-interference capabilities, and their parallel computing capabilities can improve the operation speed and reduce latency, giving them a strong advantage in control.
[0003] The common practice for implementing stepper motor current microstepping control is to introduce a current loop into the control circuit. This increases the complexity of the control system by adding hardware and software modules for current sampling and comparison, thus diminishing the inherent open-loop control advantage of stepper motors. To improve the reliability of stepper motor control systems, an FPGA-based constant current control system and method for stepper motors are proposed. Summary of the Invention
[0004] To address the shortcomings of existing control schemes, this invention provides a stepper motor constant current control system and control method based on FPGA, which features a simple system, strong driving capability, high control accuracy, and high motion stability.
[0005] The technical solution adopted in this invention is: an FPGA-based constant current control system for a stepper motor, comprising: an FPGA unit, a level conversion unit, a power amplifier circuit unit, a differential drive circuit unit, a differential receiver circuit unit, a Hall effect angular displacement sensor, and a stepper motor; the FPGA unit is used to generate a PWM control signal, which is converted by the level conversion unit and then transmitted to the power amplifier circuit unit; the power amplifier circuit unit is used to amplify the PWM control signal to drive the stepper motor; the FPGA unit is also used to generate a drive signal, which is converted by the level conversion unit and then transmitted to the differential drive circuit unit; the differential drive circuit unit is used to generate a differential drive signal to drive the Hall effect angular displacement sensor; the rotor position information of the stepper motor is acquired by the Hall effect angular displacement sensor, received by the differential receiver circuit unit and transmitted to the level conversion unit, converted by the level conversion unit and then transmitted to the FPGA unit, and the FPGA unit reads the rotor position information of the stepper motor in real time.
[0006] Furthermore, the stepper motor is a two-phase four-wire bipolar hybrid stepper motor.
[0007] Furthermore, the specifications of the power amplifier circuit unit are matched with the power of the stepper motor.
[0008] Furthermore, the Hall effect angular displacement sensor is coaxially mounted with the stepper motor. The Hall effect angular displacement sensor has a resolution of n bits, and the FPGA unit reads the stepper motor rotor position information in digital form as D. The stepper motor rotor position θ is:
[0009]
[0010] Furthermore, an FPGA-based constant current control method for stepper motors achieves constant current control of the stepper motor by implementing current subdivision control through a preset duty cycle without introducing a current loop.
[0011] Furthermore, given the crystal oscillator frequency is f, the number of microsteps per beat is N, the microstepping interval count is Q, and the rotor rotation frequency υ of the stepper motor is:
[0012]
[0013] Furthermore, motions at different speeds include: uniform rotational motion and stationary motion.
[0014] The beneficial effects of this invention are:
[0015] 1. The system has low design cost, low hardware circuit complexity, and high reliability, which enhances the inherent advantages of open-loop control of stepper motors.
[0016] 2. It improves the driving capability, control accuracy and motion stability of the stepper motor, and reduces or eliminates problems such as noise, oscillation and torque fluctuation of the stepper motor. Attached Figure Description
[0017] Figure 1 This is a block diagram of the FPGA-based constant current control system for stepper motors according to the present invention.
[0018] Figure 2 This is a circuit diagram of the H-bridge driving circuit for the single-phase winding of the stepper motor of the present invention.
[0019] Figure 3 This is a schematic diagram of the control signal waveforms between the gate and source of the four MOS transistors in the single-phase winding of the present invention when the current direction is path 1;
[0020] Figure 4 This is a schematic diagram of the control signal waveforms between the gate and source of the four MOS transistors when the current direction is path 2 in the single-phase winding of the present invention.
[0021] Figure 5 This is a functional block diagram of the FPGA program of the present invention. Detailed Implementation
[0022] The present invention will be further described below with reference to the accompanying drawings and embodiments. The drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0023] like Figure 1 As shown, an FPGA-based constant current control system for a stepper motor includes an FPGA unit, a level conversion unit, a power amplifier circuit unit, a differential drive circuit unit, a differential receiver circuit unit, a Hall effect angular displacement sensor, and a stepper motor. The FPGA unit generates a PWM control signal, which is converted by the level conversion unit and then transmitted to the power amplifier circuit unit. The power amplifier circuit unit amplifies the PWM control signal to drive the stepper motor. The FPGA unit also generates a drive signal, which is converted by the level conversion unit and then transmitted to the differential drive circuit unit. The differential drive circuit unit generates a differential drive signal to drive the Hall effect angular displacement sensor. The rotor position information of the stepper motor is acquired by the Hall effect angular displacement sensor, received by the differential receiver circuit unit, transmitted to the level conversion unit, converted by the level conversion unit, and then transmitted to the FPGA unit. The FPGA unit can read the rotor position information of the stepper motor in real time.
[0024] The stepper motor is a two-phase four-wire bipolar hybrid stepper motor. The constant current control system is only applicable to the drive control of two-phase four-wire bipolar stepper motors.
[0025] The specifications of the power amplifier circuit unit must be matched with the power of the stepper motor. The stepper motor is the actuator in the system. When driving and controlling stepper motors with different power, the specifications of the power amplifier circuit unit need to be changed to meet the requirement of matching the power of the two.
[0026] The Hall effect angular displacement sensor is coaxially mounted with the stepper motor. If the resolution of the Hall effect angular displacement sensor is n bits, the digital value of the stepper motor rotor position information read by the FPGA unit is D (decimal value). The rotor position θ (unit: °) of the stepper motor is expressed as:
[0027]
[0028] This specific embodiment also discloses a method for driving control of a stepper motor using an FPGA-based constant current control system. Without introducing a current loop, current subdivision control is achieved by setting a duty cycle, thereby realizing constant current control of the stepper motor.
[0029] like Figure 2As shown, the single-phase winding requires a driver chip in the power amplifier circuit unit for control. Each driver chip can control the upper and lower bridge arms on one side of the H-bridge. The PWM control signal generated by the FPGA unit is applied between the gate G and source S of the N-type MOS transistors Q1 to Q4 after passing through the level conversion unit and the driver chip. This can control the conduction and cutoff between the drain D and source S, thereby enabling subdivided control of the winding current.
[0030] like Figure 3 and Figure 4 As shown, Q1-PWM, Q2-PWM, Q3-PWM, and Q4-PWM are the drive signals for controlling the on and off of the four MOSFETs, respectively. Unipolar drive control is used, meaning that only the two MOSFETs in the upper bridge arm are continuously switched on and off, while one MOSFET in the lower bridge arm is always on and the other is always off. The waveforms of Q1-PWM and Q2-PWM are roughly complementary, and similarly, the waveforms of Q3-PWM and Q4-PWM are also roughly complementary. To prevent the MOSFETs in the upper and lower bridge arms from burning out due to simultaneous on-time without passing through the motor windings, the dead time in the PWM waveforms needs to be controlled. That is, after the upper bridge arm MOSFET is turned off, there needs to be a delay before the lower bridge arm MOSFET is turned on; after the lower bridge arm MOSFET is turned off, there needs to be a delay before the upper bridge arm MOSFET is turned on. Here, Δt is the dead time.
[0031] when Figure 2 When the current direction in the motor winding is path 1, the control waveform diagram of the four MOSFETs is shown below. Figure 3 As shown; when Figure 2 When the current direction in the motor winding is path 2, the control waveform diagram of the four MOSFETs is shown below. Figure 4 As shown.
[0032] Taking the A-phase winding of a stepper motor as an example, increasing the duty cycle of the PWM wave lengthens the winding's energizing time, increases the phase current, and strengthens the load-carrying capacity; decreasing the duty cycle of the PWM wave shortens the winding's energizing time, decreases the phase current, and weakens the load-carrying capacity. In other words, by adjusting the duty cycle, the driving current of the stepper motor can be adjusted, thereby achieving constant current drive control of the stepper motor and adjusting its load-carrying capacity.
[0033] In this embodiment, the specific models of each unit module are as follows: FPGA unit model: A3PE3000-FG484I; level conversion unit model: B54ACS164245SARH; power amplifier circuit unit models: IR2110L4SCB and LCS7587U3RH; differential drive circuit unit model: JSR26C31AF
[0034] The differential receiving circuit unit model is JSR26C32F-S; the Hall effect angular displacement sensor model is CJW-HE-1103A.
[0035] This specific embodiment also discloses a method for drive control using this system, where ω (unit: rad / s) is the angular velocity of the stepper motor, and θ s (Unit: rad) is the step angle, υ (unit: Hz) is the rotor rotation frequency of the stepper motor, N is the microstepping value per beat, and ΔT (unit: s) is the interval time between microstepping points. The interval time ΔT can then be expressed as:
[0036]
[0037] If f (unit: Hz) is the crystal oscillator frequency and Q (decimal value) is the subdivision interval count value, then the subdivision interval count value Q can be expressed as:
[0038] Q=ΔTf (3)
[0039] Combining formulas (2) and (3), we can obtain the subdivision interval count value Q as:
[0040]
[0041] From formula (4), the rotor rotation frequency υ of the stepper motor can be obtained as:
[0042]
[0043] From formula (5), the microstepping interval count value Q of the stepper motor at different rotation frequencies υ can be obtained, such as Figure 5 As shown, the stepper motor is driven by constant current through preset interval count value Q, direction, duty cycle and rotor position. Combined with the rotor position information collected by Hall effect angular displacement sensor, the stepper motor can achieve two main working modes: uniform rotation and positioning motion at different speeds.
[0044] Uniform rotational motion at different speeds: The stepper motor can achieve uniform rotational motion at a speed not exceeding the rated speed of the stepper motor by setting preset parameters.
[0045] Positioning motion at different speeds: The stepper motor stops after reaching the predetermined rotor position by setting preset parameters.
[0046] The preset parameters include: preset interval count value, direction of rotation, duty cycle and rotor position.
[0047] Based on the above-described preferred embodiments of the present invention, and through the foregoing description, those skilled in the art can make various changes and modifications without departing from the inventive concept. The technical scope of this invention is not limited to the contents of the specification, but must be determined according to the scope of the claims.
Claims
1. A constant current control method for a stepper motor based on FPGA, characterized in that, Includes the following steps: Without introducing a current loop, current subdivision control is achieved by preset duty cycle, thereby realizing constant current control of the stepper motor; like ω The angular velocity of the stepper motor is... θ s The step angle, υ The rotor rotation frequency of the stepper motor. N Δ is the subdivision number per beat. T Let Δ be the interval between subdivision points. T Represented as: (2) like f The crystal oscillator frequency, Q To subdivide the interval count value, then subdivide the interval count value. Q Represented as: (3) Combining formulas (2) and (3), we can obtain the subdivision interval count value. Q for: (4) The formula for calculating the rotor rotation frequency of a stepper motor is: (5) in, f The crystal oscillator frequency, Q To subdivide the interval count value, N The number of subdivisions per beat; The stepper motor is driven by constant current through preset interval count value Q, direction, duty cycle and rotor position, and combined with rotor position information collected by Hall effect angular displacement sensor to realize two main working modes of stepper motor at different speeds: uniform rotation and positioning. A system based on FPGA for constant current control of stepper motors includes: The system comprises an FPGA unit, a level conversion unit, a power amplifier circuit unit, a differential drive circuit unit, a differential receiver circuit unit, a Hall effect angular displacement sensor, and a stepper motor. The FPGA unit generates PWM control signals, which are converted by the level conversion unit and then transmitted to the power amplifier circuit unit. The power amplifier circuit unit amplifies the PWM control signals to drive the stepper motor. The FPGA unit also generates drive signals, which are converted by the level conversion unit and then transmitted to the differential drive circuit unit. The differential drive circuit unit generates differential drive signals to drive the Hall effect angular displacement sensor. The Hall effect angular displacement sensor collects the rotor position information of the stepper motor, which is received by the differential receiver circuit unit and transmitted to the level conversion unit. After conversion by the level conversion unit, the information is transmitted to the FPGA unit, which reads the rotor position information of the stepper motor in real time.
2. The FPGA-based constant current control method for stepper motors according to claim 1, characterized in that: The stepper motor is a two-phase four-wire bipolar hybrid stepper motor.
3. The FPGA-based constant current control method for stepper motors according to claim 1, characterized in that: The specifications of the power amplifier circuit unit are matched with the power of the stepper motor.
4. The FPGA-based constant current control method for stepper motors according to claim 1, characterized in that, The Hall effect angular displacement sensor is mounted coaxially with the stepper motor. The formula for calculating the rotor position of the stepper motor is: (1) in, D The digital quantity used by the FPGA unit to read the rotor position information of the stepper motor. n This represents the resolution bits of the Hall effect angular displacement sensor.