A method of using field programmable gate array (FPGA) to complete multi-axis stepping motor controller is proposed. Using IP planning thinking, the motion control of stepping motor is completed by hardware circuit (IP core of stepping motor), and the trajectory calculation is completed by the microprocessor (NiosII soft core) on the same chip. Then the programmable on-chip system (SoPC system) of multi-axis stepping motor controller can be constructed. LPM-ROM is composed of embedded array block (EAB) in the chip of FPGA to store the data of Subdivision Current of each phase of stepper motor, and the chopper control circuit is integrated into the internal of the FPGA, which improves the integration and stability of the system.
VHDL speech control can be used to control different types of stepper motors according to the different stepper motors. By changing the parameters of the module program, the control of different types of stepper motors can be completed, which is conducive to the wide application of stepper motors. Stepping motor is a kind of converter of electric pulse angular displacement. Because of its advantages of low price, easy operation and no accumulated error in operation, it is widely used in the field of industrial control. However, it also has some defects such as low frequency oscillation, high noise, etc. Selecting subdivision constant torque drive technology can solve the above shortcomings perfectly. Sink. In this paper, Field Programmable Gate Array (FPA) is selected to replace the MCU or digital logic in the stepping motor subdivision control system. Software can complete this interpolation algorithm. Software manipulation has many advantages, but its interpolation operation is serial, so the operation speed is not high, in high speed and high precision system, it is difficult to achieve the request.
Traditional stepper motor control mostly uses single-chip computer control method. This method is serial control, which is limited in speed and real-time direction. With the development of new technology of the device and development system of the FPGA, the stepper motor linkage control based on the chip of the FPGA has shown great advantages. The planning of FPGA is parallel and multi-threaded, so hardware control becomes more suitable for real-time and high-speed operation occasion. After setting its internal register value, the stepper motor is controlled by IP nuclear energy to work according to the set speed curve method. The IP core has three main functional modules. Avalon Bus Interface: It enables the IP core to have Avalon Bus Interface, which can be interconnected with other IP cores with the same interface. QEP Circuit: It is used to connect a photoelectric encoder to obtain information such as motor rotor orientation. It is used to differentiate whether the motor is out of step, so that the system can become a closed-loop control system according to user’s needs. Velocity profile generation: According to the set speed curve parameters, the step cycle of each step pulse is calculated, and the step pulse sequence is output to the stepper motor driver, then the stepper motor is driven to work according to the set speed curve method. It consists of state machine, step cycle calculation module and PWM circuit. In this paper, incremental photoelectric encoder is selected as azimuth viewing device. Its output is three channels of signal, in which two channels are orthogonal A and B pulse signals, and one path is zero bit viewing pulse signal Z. In normal operation, thermostatic element it is very important to accurately look at the rotor orientation. Usually, the rotor orientation can be obtained by counting the quadruple frequencies of orthogonal A and B pulses.
The QEP circuits planned in this paper are shown in Figure 2, including digital filters, directional discrimination circuits, quadruple frequency circuits and add/subtract counters. In the meantime, the digital filter is used to filter the digital signal noise generated at the three-phase output terminals of encoder A, B and Z when the motor rotates. Direction discrimination and quadruple frequency circuit can obtain the rotation direction and quadruple frequency output of the motor rotor, and then (n 1) potential rotor azimuth signal can be obtained by adding/subtracting counter. According to the working principle of stepping motor, taking the three-phase and four-phase motor controller as an example, it mainly contains three functional modules.
The data distributor chooses the signal se(1) and se(2) in form to send the external pulse to the corresponding functional control module; the functional module is the central module of successful application, and it completes different forms of operation through the functional module. Control; Data selector chooses the signal by form, and chooses the signal output of the function module according to different form functions. Four data selectors are used. Data selector outputs stepper motor material output signal selectively. Data selector B and C outputs stepper motor B phase and C phase signal selectively. Connection method is the same as data selector a, which is omitted here. Data selector figured out that the stepper motor’s clear eye pulse was only used for four-phase stepper motor, so only D3 and D4 signals of four-phase motor control module were input, and other input terminals were grounded directly. This design can complete eight forms of stepper motor control. If more forms of stepper motor control are to be completed, only 1-4 data distributor is changed to 1-4 data distributor.
8 data distributor, change 4-1 data selector to 8-1 data selector, and then add the corresponding form control module to expand to 16 forms of operation. The display module shows the number of control pulses, and through trans signal, shows the number of turns the motor turns. When the pulse generated by the frequency divider is input to the display module, the counting begins.
There are only four digital display tubes in the experimental channel DEO development board. Therefore, the first one is removed as 0-3 of the speed gear, and the other three bits are used to display the counting value. The scale is 1-999. When it reaches 1000, it is cleared and counted again. Reset and start are the reset and start signals of body system one, Trans is the signal of switching pulse display/circle number display, clk-in is the control pulse announced by the control module, speed_in [1.0] is the signal of gear, digt1, digt2, digt3 and digt4 are four digital display control signals respectively, led [2.0] is the LED prompt when transforming the display form. Output signal. With the successful compilation and planning of Quartus2 software, Altera equipment can be programmed or equipped. (Assemble module of Quartus2 compiler actively converts the equipment, logic unit and pin assignment information in the process of adaptation into programming drawings of equipment, and saves these drawings as compiled files in the way of SRAM object file (. SOF). (Programmer of Quartus2 software uses this file to program and install BYteBlasteMV of equipment.) Ready. The equipment can be downloaded to FPCTA equipment for debugging. Engineering debugging is completed on the GW48SOPC/EDA development system. The program is downloaded to EP-ICQ240C8, the FPCTA equipment in the development system. The input pulse is participated in, and the signal is selected to be replaced by the analog switch on the developer. The output signal of the module is driven by a first-level power, which can be used to complete the various forms of three-phase and four-phase small power stepping motors perfectly. Operating function, to achieve the role of satisfaction. A method of using FPGA to complete multi-axis stepper motor controller is proposed.
A high performance stepper motor IP core based on specific speed control strategy is developed, including Avalon bus interface, position check, velocity profile generation, pulse signal generation and other algorithm modules. On this basis, the microprocessor, memory and communication modules are further integrated, and the SoPC system of multi-axis stepping motor controller is constructed. The experimental results show that the multi-axis stepping motor controller has good dynamic characteristics and steady-state accuracy. The planned IP core with independent intellectual property rights has passed abundant software and hardware simulation and test, and can be transplanted to different technology of the FPGA platform.