introduction
In modern industrial control, vehicle motion and medical equipment systems, the application of suspension motion systems is increasing. In these systems, the suspension motion parts are usually specific actuators, so the motion accuracy of the suspension parts is the determining factor of the working efficiency of the entire system. In practice, it is very difficult to achieve precise control of the suspension motion control system. The suspension motion control system that controls the motion trajectory of the controlled object by changing the length of the rope that suspends the controlled object has a wide range of applications in production control and other fields, but due to technical constraints, its use is also limited. The traditional suspension control system design uses a single-chip microcomputer as the system controller and implements various algorithms and logic controls through software programming. However, due to its limited chip resources, slow computing speed and susceptibility to interference, it is limited in the development of larger systems. FPGA can realize various complex logic functions, with high density, small size, high stability, fast computing speed, and can also perform software simulation and debugging. It is suitable as the control core of large-scale real-time systems. This paper uses Verilog FPGA to design the controller of the suspension motion control system, transmits control parameters through the input module, and uses the control algorithm implemented by HDL language programming to drive the stepper motor to accurately control the suspended moving object.
1 System Design
The specific design goal of this design is that the control system can set the object coordinate point parameters arbitrarily through the keyboard or other means, and the object can make self-set movements within the range of 80 cm × 100 cm. The motion trajectory has both curves (circles) and straight lines (any two points and fixed points). The object can draw a motion trajectory on the board when it moves, which is limited to a certain time. According to the design indicators, it is necessary to realize the function of drawing the set trajectory and searching the set trajectory, and to display the coordinates of the brush position in the object in real time. The system solution block diagram is shown in Figure 1.
The control module is the core of the entire system. The keyboard input module generates key signals, which are sent to the FPGA to set and calibrate the object and set the trajectory parameters. The FPGA analyzes, calculates and processes the signals sent, and sends the control signals to the motor drive module to control the speed of the motor so that the movement trajectory of the object can be controlled. At the same time, the display module displays the coordinates of the brush in the object.
2 Design and implementation of system modules
2.1 Control Module
The system structure diagram is shown in Figure 2. Among them, the control module is the core of the system design and is implemented by FPGA. This module is controlled and designed through the HDL hardware description language on the hardware platform of the intelligent programmable logic device development test system KH-310. The FPGA chip can realize the control function of the stepper motor. The functions include: forward, reverse, positioning and speed regulation of the stepper motor. The FPGA calculates the distance the object needs to move based on the input data, and directly sends out control pulses to control the rotation of the motor, thereby controlling the direction of movement of the object. Due to the lack of feedback circuit, the accuracy of the system is only related to the accuracy of the algorithm used by the FPGA. This method has a simple circuit structure, low cost, and is easy to adjust and maintain. It is an ideal method.
2.2 Keyboard module
The keyboard is a device for human-computer communication. In this system, a 4×4 matrix keyboard common anode connection is used. Each key on the keyboard is actually a switch circuit. When a key is pressed, the contact of the key will present a state of 0; conversely, when it is not pressed, it will present a state of logic 1. The layout and function of each key on the keyboard are shown in Figure 3.
"0" to "9": digital input, used to set the X, Y values of a coordinate point; and key 1, key 2, key 3, key 4, key 5, key 6 and key 9 have a second function.
"A": Start button, used to start the selected operation mode.
“B”: Reset, used for initialization of various items.
“C”: Confirm key, used to confirm the setting and mode input values.
“D”: Stop, used to stop the stepper motor from rotating.
"E": Setting key, manual alignment or arbitrary setting of coordinate point parameter key, press the up, down, left, and right keys to control manual alignment, and then press the confirmation key to confirm (as shown in Figure 4).
"F": Mode key: First press the mode key, then press the number keys to select the mode and confirm (as shown in Figure 5). There are several modes:
Method 1: Home, let the object return to its origin by itself.
Method 2: Do self-set exercises.
Method 3: To draw a circle, first use the numeric keys to set the circle radius and confirm, then press the start key to run.
Method 4: Fixed-point motion, first use the numeric keys to set the X and Y values of a coordinate point, confirm it, and then press the start key to run.
Method 5: Tracking. First, let the object run at the starting point of the track and press the start button to start tracking.
2.3 Motor drive module
The power drive circuit L298 contains a 4-channel logic drive circuit to control whether the four coils A, /A, B, and /B of the stepper motor are energized. The excitation signal of the stepper motor is controlled by the signal input of JP4 on the KH-310 test platform of the intelligent programmable logic device development test system, which drives the A, /A, B, and /B coils of the stepper motor respectively, using a two-phase excitation method.
2.4 Motor Circuit
The motor is one of the main carriers for the whole system to realize its functions. Its main function is to realize the movement of the suspended object by stretching and retracting the rope wrapped around it. The stepper motor is an actuator that converts electrical pulses into angular displacement. This system uses the 42BYG stepper motor, which works on the principle of converting electrical pulse signals into angular displacement. The rotation angle of its rotor is proportional to the number of input electrical pulses, the speed is proportional to the frequency of the input electrical pulses, and the direction of rotation is determined by the order of pulse distribution. The angular displacement of the stepper motor can be controlled by controlling the number of pulses, thereby achieving the purpose of accurate positioning. [page]
2.5 Display module
Liquid crystal display is a display that places liquid crystal between two pieces of conductive glass. It is driven by the electric field between two electrodes to cause the electro-optical effect of twisted nematic liquid crystal molecules. The light source is controlled to be transmitted or shielded between the power switch to produce two effects of light and dark. This system uses a 16×2 LCD display as a friendly interface for human-computer dialogue. The system design realizes the dynamic display of the coordinates of the object and the length of the line segment drawn by the brush, and has humanized functions such as input cursor following and power-on waiting prompt.
3 System Software Design
The overall process of designing the system is relatively simple, using VerilogHDL language. In order to achieve the control accuracy and response time of the design indicators, corresponding control algorithms are designed for each function. The system flow chart is shown in Figure 6.
3.1 Two-point motion algorithm and implementation
Mathematical modeling is adopted, and geometric knowledge is used to link the object's motion trajectory with the position of the two motors. The coordinates are expressed by mathematical expressions, and converted into the offset that the motor needs to rotate, and finally the offset is converted into the speed that the motor needs to rotate. Combined with Figure 7, let L1 be the line length of the left rope at point d, L2 be the line length of the right rope at point d, L1\' be the line length of the left rope at point e, and L2\' be the initial line length of the right rope at point e. The vertex coordinates of the restricted area of the controlled object are a(xa, ya), b(xb, yb), c(xc, yc), o(0, 0), respectively. When the suspended object moves from point d to point e, the length of the left and right ropes must change. The length of the retractable line of motor M1 is △L1. When △L1<0, the motor rotates forward; when △L1>0, the motor rotates reversely. The length of the retractable line of motor M2 is △L2. When △L2<0, the motor rotates reversely; when △L2>0, the motor rotates forward. The calculation is as follows:
H=100 cm, x=15 cm, y=15 cm)
Input the starting coordinate value (xd, yd) from the keyboard, substitute (xd, yd) into equation (1) and equation (2) to calculate L1 and L2, and then input the end coordinate value (xe, ye) from the keyboard and substitute it into equation (3) and equation (4) to calculate L1\' and L2\'. The two-point (fixed-point) motion algorithm flow chart is shown in Figure 8.
3.2 Algorithm and implementation of circular motion
The design index of this system is that the hanging object can draw a circle. The differential curve straight line approximation method is used. First, the circumference is divided into N parts, and each arc segment is equivalent to a straight line segment. The larger N is, the smoother the curve is. Assume that the coordinates of the center of the circle are (x0, y0), the radius is 25 cm, and (x, y) is any point on the circumference. The equation of the circle is determined as: (x-x0)2+(y-y0)2=252. If the equation is used directly to calculate the coordinates of the points on the circle, the algorithm is complicated; if the parametric equation of the circle is used: X=x0+25cosθ, Y=y0+25sinθ, the coordinates of the circle are only related to the parameter θ. Therefore, the angle is accumulated with a certain set angle step ω of θ, so that θ+pω changes within the period [θ, θ+2π], where p is the accumulated value. In this way, uniform points on the circle can be sampled. Obviously, the smaller the angle step ω, the more points are obtained on the circumference, and the control will be more precise. According to the parametric equation of the circle, the coordinates of the points on the circle are calculated by calling the fixed-point program. The flow chart of drawing a circle is shown in Figure 9.
4 Conclusion
The system hardware is integrated and developed in the intelligent programmable device experimental system KH-310, and the software is designed in the QuartusⅡ environment. The various components of the system are simulated by Modelsim, and the synthesizer Synplify with good optimization efficiency and compatibility is selected to synthesize the program. A1tera's EPEC6Q24OC8L is used as the programming chip. The system works at 1 MHz. After field experiments, the results show that the system can set the position of the suspended moving object arbitrarily through the keyboard; under the condition of specified time and movement area, the movement distance can be completed quickly; the display of the movement coordinate point and the motor start/stop function can be completed.
The FPGA-controlled stepper motor suspension motion control system designed in this paper has reliable hardware and excellent software design support, which can achieve precise positioning of suspension motion. By utilizing the real-time control capability of FPGA and the precise positioning capability of stepper motors, it is entirely possible to design a high-performance and high-precision control system, such as improving the dangerous situation of manual cleaning of high-rise curtain walls by setting the suspension as a cleaning mechanism. In modern industry, agriculture and national defense construction, the use and promotion of this system has very important practical significance.
Previous article:Creation and application of Flash programming design based on SoPC target board
Next article:IP core protection technology based on EDA software and FPGA
Recommended ReadingLatest update time:2024-11-16 17:57
- Popular Resources
- Popular amplifiers
- Analysis and Implementation of MAC Protocol for Wireless Sensor Networks (by Yang Zhijun, Xie Xianjie, and Ding Hongwei)
- MATLAB and FPGA implementation of wireless communication
- Intelligent computing systems (Chen Yunji, Li Ling, Li Wei, Guo Qi, Du Zidong)
- Summary of non-synthesizable statements in FPGA
- Huawei's Strategic Department Director Gai Gang: The cumulative installed base of open source Euler operating system exceeds 10 million sets
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- C language algorithm 19: Prime factorization
- EEWORLD University - The principle and use of oscilloscope
- F12 debugging, no need to worry about the essence watermark being blocked anymore
- Qorvo will meet you in Beijing
- Has anyone used the MS41909 lens driver chip for network cameras and surveillance cameras?
- 【BLE 5.3 wireless MCU CH582】5. Hardware I2C drive 0.96-inch OLED
- [Top Micro Smart Display Screen Review] 2.2 SGTools Graphics Editing Software: Keyboard, Curve, QR Code Application
- [Topmicro Intelligent Display Module Review] 8. How to download the Lua script for the smart display?
- 【Home Smart Dashboard】Use GUI Guider to design the interface
- Siemens Industrial Automation Data Collection (September 4, 2020)