This paper describes a multi-axis controller for stepper motors based on SOPC . This controller is used in semi-automatic biochemical analyzers to control the sampling needle displacement system. It can also be used in other multi-stepper motor applications such as multi-axis linkage dot matrix printers and robots.
The stepper motor is a fully digital electric actuator. In principle, its angular displacement is proportional to the number of driving pulses. Under normal circumstances, the stepper motor has the characteristics of simple use, precise movement, and continuous operation without cumulative errors. Therefore, it is widely used in various position control systems. At present, due to the increasing complexity of the mechanical system inside the instrument, its movement is often multi-degree-of-freedom, so it is usually necessary to use the motion synthesis of multiple stepper motors to realize various actions of the system. For example, for the sampling needle displacement system of the semi-automatic biochemical analyzer shown in Figure 1, the action execution of the system is composed of two parts: one is the stepper motor on the fixed base to control the sampling cross arm to perform vertical lifting movement; the other is the stepper motor on the slider to control the sampling cross arm to perform horizontal rotation movement. The synthesis of these two movements realizes the position change of the sampling cross arm.
The traditional stepper motor multi-axis controller is based on a microcontroller (MCU)/microprocessor (MPU)/application-specific integrated circuit (ASIC)/digital signal processor (DSP) as the core, supplemented by other peripheral discrete devices. The advantage of this structure of the stepper motor multi-axis controller is that its hardware structure is clear and easy to copy and reproduce. For similar applications, only the application software needs to be modified. However, for most practical applications, relying solely on software modification is usually not enough to meet the requirements of other applications, and when the system is upgraded, the entire circuit usually needs to be redesigned, which not only prolongs the upgrade cycle, but also increases the upgrade cost. Therefore, it is subject to certain restrictions in practical applications. Due to the rapid development of programmable logic device (PLD) technology, the functions of multiple discrete components can be integrated into a single FPGA/CPLD chip. Therefore, in the improvement of traditional controllers, an FPGA/CPLD chip is usually used to integrate the digital circuit part of the traditional controller together, thereby forming a controller with a processor-FPCA/CPLD-analog circuit structure. Compared with traditional controllers, the scalability of the hardware structure of this type of controller has been greatly improved. This is because the FPGA/CPLD chip has the characteristic of reconstructing its internal logical relationship without changing its pin definition. Therefore, for different applications, the internal structure of the FPGA/CPLD chip can be changed to meet certain special application requirements, which makes the system development and upgrade easier and cheaper to a certain extent. Therefore, the application scope of this improved multi-step motor controller has also been greatly expanded. However, this structure of the controller also has the following problem: there is still a processor outside the FPGA. This not only increases the size of the controller, but also when upgrading the processor, the hardware circuit needs to be redesigned, so the upgrade cost is still relatively high.
In recent years, as the concept of IP resource reuse has been widely recognized and has become the main design method, embedded processor IPs such as MCU, DSP, and MPU have become the core of FPGA applications. As the processor core is embedded in the FPGA in the form of IP, there may be only two circuits on the circuit board in the future: the analog part (including power supply) and the FPGA chip and some large-capacity memory . All this shows that the system on a programmable chip (SOPC) is becoming the most important development direction of FPGA. Compared with the traditional multi-axis controller. This SOPC-based stepper motor multi-axis controller has the characteristics of small size, high integration, stable hardware structure, easy development and upgrading, and low cost, and is especially suitable for the design of internal control systems of instruments and meters. The stepper motor multi-axis controller discussed in this article is a stepper motor multi-axis controller based on SOPC.
1 Hardware structure of stepper motor multi-axis controller based on SOPC
The block diagram of the SOPC-based stepper motor multi-axis controller is shown in Figure 2. Its external circuit consists of two parts: analog circuit and digital circuit. The analog circuit includes power supply and power drive. The digital circuit is mainly FPGA chip and its related circuits.
As shown in Figure 2, the SOPC-based stepper motor multi-axis controller consists of two parts: the digital part of the FPGA chip and its configuration chip, and the motor control and position feedback part. The dashed box represents the internal structure of the FPGA chip, the hollow arrow represents the data connection inside the FPGA chip, and the solid arrow represents the external connection. The FPGA chip is composed of MPU module, communication module, RAM module, ROM module, counter module, motor control module, etc. When the controller loses power, the information of these modules is stored in the configuration chip. When the system is powered on again, the FPGA chip reads its configuration information from the configuration chip and reconstructs the internal module structure. The MPU module is the core of the entire controller, and its function is equivalent to a microprocessor in fact. It exchanges data with the external host through the communication module and stores the data in the RAM module. The RAM module is also used to temporarily store some intermediate process values when the MPU module executes the program segment stored in the ROM module, and the MPU outputs the corresponding control signal to the motor control module according to the result of the program execution in the ROM module. The output of the motor control module is connected to the actual chip pin to drive the corresponding power drive circuit to work, thereby realizing the operation of the stepper motor. During closed-loop control, the encoder module at the shaft end of the stepper motor outputs an encoding signal. After the signal is isolated and processed by the encoder feedback circuit, it is counted by the counter module inside the FPGA chip and the result is transmitted to the MPU module for processing, thereby forming a closed-loop control of position/speed. Figure 2 only shows the block diagram of the closed-loop control of a single stepper motor. For multi-axis stepper motors, the FPGA chip only needs to add the corresponding power drive circuit and encoder feedback circuit. The motor control module and the counter module are integrated inside the FPGA, so the structure of the hardware circuit is relatively stable.
Due to the rapid development of IP technology, in the internal modules of the FPGA chip in Figure 2, the IP cores of MPU, ROM, RAM, counting module, etc. can be easily obtained, while the motor control module is actually related to the specific power amplifier circuit, so it usually needs to be designed by the user. The design of this module is introduced below.
2 Two-phase stepper motor control module structure
The structure of the stepper motor control module is described by taking a two-phase stepper motor with small inertia as an example. The stepper motor is driven by two PBL3717a chips. Its driving sequence and control module are shown in Figures 3 and 4.
In the control module, mtr_cp is the pulse input terminal of the stepper motor. Each pulse drives the stepper motor forward and backward one step. The pulse frequency is the speed of the stepper motor. Therefore, this pulse signal is output by the MPU module according to the execution result of the internal program of the ROM. mtr_dir is the forward/reverse switching signal of the stepper motor, mtr_mode is the full/half step operation mode selection of the stepper motor, and mtr_on_off is the start and stop position of the motor. When this position is 1, mtr_cp can drive the stepper motor to work; when it is 0, the mtr_cp pulse is blocked. The purpose of setting this position is to control the start and stop of each motor separately when multiple stepper motors are working without affecting the operating status of other motors. mtr_reset is the reset signal of the control module, A_out is the control signal of the driver chip with the subscript A in Figure 3, and B_out is the control signal of the driver chip with the subscript B in Figure 3. The simulation waveform of the control module of the stepper motor is shown in Figure 5. As can be seen from Figure 5, the simulation waveform fully conforms to the drive timing of the stepper motor in Figure 2, that is, the design of the control module meets the predetermined design requirements.
From the above analysis, by using the above-mentioned multiple stepper motor control modules to be properly connected in the manner shown in Figure 6, the SOPC-based stepper motor multi-axis controller discussed in this article can be constructed. Since the MPU, ROM, RAM, motor control module, etc. are all integrated into the FPGA chip in the form of functional modules, the size of the SOPC-based stepper motor multi-axis controller is greatly reduced. These functional modules can be added or deleted according to the actual application (i.e., the internal logic structure of the FPGA chip is reconstructed), which greatly enhances the flexibility of the system design and can better meet the needs of different application fields.
The rapid development of IP technology has made it easy for developers to obtain reusable IP cores for most common modules, thereby reducing the burden on developers and shortening the development cycle. When the system needs to be upgraded, there is no need to redesign the hardware circuit, only to modify the configuration file of the corresponding module in the FPGA, thus saving the upgrade cost of the controller. At the same time, since the function of the MPU module is the same as that of the actual microprocessor, the control program that can be run on the microprocessor can also be easily transplanted to the MPU module for operation. In order to facilitate the description of the multi-axis controller of the stepper motor based on SOPC, this article focuses on the situation where multiple stepper motors run at the same speed and constant speed. For the situation of variable speed operation, it can be obtained by inserting an MPU-controllable frequency division module between the pulse output end of the MPU and the pulse input end of each motor control module. At the same time, an interpolation module is added to realize the linkage function between different motors.
The SOPC-based stepper motor multi-axis controller described in this article is applied to the sampling needle displacement system of a semi-automatic biochemical analyzer. It can realize all the control functions of a traditional stepper motor multi-axis controller, and the size of the controller is smaller than that of a traditional controller. When the digital circuit part of the controller needs to be modified, there is no need to replace the actual hardware circuit of the controller, which greatly facilitates the research and design work of the controller and saves the corresponding development costs.
Previous article:BASCOM-8051 development environment single chip microcomputer programming system based on BASIC language
Next article:Method for reliable oscillation of load capacitor of clock chip DS1302 applied to crystal oscillator
Recommended ReadingLatest update time:2024-11-23 09:45
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- MSP FRAM MCUs Reduce Volatility for the IoT
- micropython update: 2021.2
- The highest prize for celebrating the Chinese New Year at home is 5,600 yuan! Where are you celebrating the Chinese New Year this year?
- 5 years of experience in MCU development, looking for sponsor
- MSP430 FAQ: Instruction System
- Smart Instruments
- Repair a Bull socket
- TI CCS & controlSUITE Troubleshooting Log
- 7-inch capacitive screen, 4.3-inch resistive screen, plus WLE200N2-23 PCIE 2.4G wireless network card
- Several issues about high frequency transformers