1 Composition of APT control system
The APT control system consists of PWM pulse control and generation module, RS 232 serial communication interface module, photoelectric encoding interface module and human-computer interaction module. The system block diagram is shown in Figure 1.
The core control chip is the dedicated industrial control ARM chip LPC2124 produced by Philips. The serial port first receives the light spot coordinate value obtained by the beacon light image processing part, calculates the output and the PWM control value through the position tracking algorithm, and then the PWM generation module sends the PWM pulse to the motor driver to drive the motor, and finally drives the turntable to the target position. The photoelectric encoder feeds back the motor speed information to the processor, and the corresponding control algorithm can be used to stabilize the running speed of the turntable at the set value to prevent the motor from being disturbed due to unstable speed. During the control process, the running status, speed and position of the turntable can be displayed on the LCD, and the running speed and scanning step of the turntable are set by keyboard input.
2 Hardware Design
2.1 Introduction to LPC2124 Processor
LPC2124 is based on a 32-bit ARM7TDMI-S CPU that supports real-time simulation and tracing. It is the world's first encrypted ARM chip and has 256 KWord embedded high-speed FLASH memory and 16 KB SRAM, which can fully meet the system storage space requirements, so no external storage expansion is required, making the system simpler and more reliable. It has many application components such as UART, hardware I2C, SPI, PWM, ADC, timer and comparison capture unit, which are very powerful and can far meet the functional design requirements of APT control system. 3.3 V and 1.8 V power supply voltage can keep the system low power consumption, 128-bit memory interface and unique acceleration structure can make 32-bit code run at the maximum clock rate, improve the code running speed, and the unique 16-bit Thumb mode can reduce the code size by more than 30%, while the system performance loss is very small, improve the code running efficiency, and greatly reduce the difficulty of program optimization. It is particularly suitable for industrial control, medical system and access control system.
2.2 Power supply circuit
The power supply voltage of the LPC2124 core and on-chip peripherals is 1.8 V, the voltage required by the I/O port is 3.3 V, and the power supply of the entire digital circuit is 5 V, and the 5 V power supply is stabilized by 78M05. Therefore, LDO chips LM1117MPX-3.3 and LM1117MPX-1.8 are selected to stabilize the output of 3.3 V and 1.8 V voltages. The circuit is shown in Figure 2.
2.3 RS 232 interface module
The coordinate value of the light spot is obtained through the serial port. Since the system chip is a 3.3 V system, MAX 3232 is used for RS 232 level conversion. The circuit schematic is shown in Figure 3.
[page]
The working mode and baud rate are set by setting the LPC2124 control registers U0LCR, UODLM and U0DLL.
2.4 JTAG interface circuit design
The standard 20-pin JTAG proposed by ARM is used as the simulation debugging interface. The definition of JTAG signals and the connection with LPC2124 are shown in Figure 4. In the figure, the signals nRST and nTRST on the JTAG interface are connected to the reset circuit of the entire system to achieve the purpose of resetting together with the control system.
2.5 Motor control and drive design
The output PWM cycle and duty cycle are set by setting the PWMMR0 and PWMMR6 registers of LPC2124 to control the running speed of the turntable. The motor drive adopts the DMD402 two-phase stepper motor driver, which can provide three operating modes: full step, half step, and 8-16 gear subdivision. In addition, the orthogonal encoding signal generated by the feedback of the photoelectric encoder is received by the comparison capture unit, and the current running speed of the motor is obtained after program processing, and then the speed is adjusted.
2.6 LCD display and keyboard design
The Chinese prompt interface is realized by using a dot matrix LCD display, which enhances the human-computer interaction. The design uses a 128×64 dot matrix LCD and uses the built-in T6963C as the controller. In addition, a 4×4 matrix keyboard is used as user input.
3 Software Design
The APT control system mainly consists of three parts: scanning, capturing and tracking. The following is an introduction to the program design of these parts.
3.1 Scanning and capturing part
After power-on reset, the program first completes the initialization of each part, displays the welcome interface, and prompts the user to enter the turntable running speed and scanning step length. Then the program starts to execute the grating spiral scanning algorithm. The schematic diagram of the grating spiral scanning algorithm is shown in Figure 5. Each small circle in the figure represents a beacon scanning sub-area, and each sub-area overlaps in a square manner. Assuming that the diameter of each sub-area is the beacon divergence angle α, the scanning step length is:
search for the target in the uncertain area with a step length of α0 until the beacon spot is captured, and then enter the tracking state.
3.2 Tracking algorithm based on incremental PID control
PID control algorithm includes position PID control algorithm and incremental PID control algorithm. Incremental PID control algorithm is commonly used in real-time control systems, and its formula is:
Where: △u(k) is the output control quantity; q0=KP; q1=KP(TS/TI); q2=KP(TD/TS) are the coefficients of comparison term, integral term and differential term respectively; TS is the sampling time. For different control systems, TS is different and should be determined based on actual debugging experience. In this experiment, TS is 0.15 s. It can be seen from formula (1) that as long as the three most recent error sampling values e(k), e(k-1), and e(k-2) are stored, △u(k) can be calculated, thereby realizing feedback control of position and speed and completing stable tracking.
3.3 System flow chart
Based on the above analysis, the system flow chart can be obtained as shown in Figure 6.
4 Test results and conclusions
According to the experimental test, the maximum power consumption of the whole system is about 20 W, the rotation speed range of the turntable is 0.2~0.8 (°)/s, the tracking accuracy is calculated according to the standard deviation, the minimum is about 20.69μrad, and the fastest response time can reach 200 ms. The ARM chip LPC2124 produced by Philips is used as the control core for design and development. From the test results, it can be seen that the system power consumption is low, the accuracy basically meets the requirements of the APT control system, and has great practical value.
Previous article:Design and implementation of handheld multimedia system based on ARM Linux QT
Next article:Transplantation of μC/OS-Ⅱ on ARM Series MCU S3C44B0x
Recommended ReadingLatest update time:2024-11-17 01:31
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!
- Rambus Launches Industry's First HBM 4 Controller IP: What Are the Technical Details Behind It?
- 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
- TI Award-winning Live Broadcast: Talking about "packaged antenna" smart millimeter wave sensors, even novices can handle industrial robots
- The voltage of the TPS73033 buck chip drops to 0.7V after the load is connected
- How to use MSP430 to implement PWM signal
- [Zero-knowledge ESP8266 tutorial] Quick start 29 How to use the nine-axis sensor module
- MicroPython adds self-power and power consumption parameters to USB
- [New Year's Festival Competition] + More than 200 girls walk
- Introduction to PLC, excerpted from "Control Engineer"
- Postpartum lamp - what kind of light do women need during confinement?
- Introduction to RF5 Architecture
- The relationship between standard, bandwidth, and baud rate/speed