Among the stage mechanical equipment, the boom plays an important role. In large theaters, a performance often requires the mobilization of a large number of stage backgrounds, and sometimes up to 64 booms need to be controlled to move simultaneously. The operator has to constantly change the stage background on site, and the control room staff has to constantly coordinate with the on-site personnel, which brings great inconvenience to the stage control. The centralized control of the boom, the real-time response to requests from multiple channels, and the precise positioning of the boom position are the three key issues to be solved in the design. Most of the current stage control systems use photoelectric encoders to generate pulse signals to obtain the moving distance of the boom, and directly use a single-chip microcomputer for counting and control. When responding to multiple requests, this method often causes the loss of counting pulses due to the heavy tasks of the single-chip microcomputer, causing measurement errors. In summary, this paper proposes a method for designing a stage boom controller using a CYGNAL single-chip microcomputer and FPGA.
1 Composition and working principle of stage hoist control system
The stage boom control system is mainly composed of a remote control terminal (PC), a stage boom controller, on-site equipment, an LCD display, etc., as shown in Figure 1.
The system adopts a distributed structure. The remote control terminal is used as a management machine, responsible for managing and coordinating on-site equipment, sending control instructions and collecting on-site data through the LAN using the UDP/IP protocol; the stage boom controller is used as a terminal, receiving instructions sent by the remote control terminal, and controlling the on-site equipment according to the received control commands. After collecting the on-site data, the data is packaged in UDP format and sent to the remote control terminal so that the remote control terminal can monitor the site in real time. At the same time, in order to enable the operation of a single device to be observed on site, these data are also sent to the on-site LCD display through the serial port.
2 Hardware Design of Stage Boom Controller
In the entire control system, the stage boom controller is the key to the design. It has two functions: first, receiving and sending UDP data packets, parsing the data packets and converting them into a format that the FPGA controller can recognize. Second, receiving the field information sent by the FPGA controller.
2.1 Hardware composition and working principle of stage boom controller
The stage boom controller is mainly composed of C8051F020 single chip microcomputer, FPGA controller, LCD display, E2PROM memory, RTL8019 network card chip and JTAG program download and scheduling interface, etc. Its hardware composition block diagram is shown in Figure 2.
The working principle is as follows: C8051F020 MCU receives the control command data packet in UDP format sent by the remote control end through the RTL8019 network card chip, parses the control command from the control command data packet, and transmits it to the FPGA controller. The FPGA controller controls the action of the field equipment according to the control command, and returns the relevant field data to the MCU. The MCU stores these field data in E2PROM as backup data, sends it to the LCD display, and converts it into a UDP data packet and sends it to the remote control end through the network card chip. The following mainly introduces the design of the MCU control system and FPGA controller. [page]
2.2 Single-chip microcomputer control system
The single-chip control system is mainly composed of C8051F020 single-chip microcomputer, which mainly completes the reception and processing of data. The characteristics of C8051F020 are fast operation speed, high integration, pin configurability, stable operation and high reliability. It can fully meet the requirements of the stage boom controller for memory capacity, multiple bus interfaces, processing speed and floating-point operations.
The C8051F020 microcontroller has two serial ports, UART0 and UART1. Serial port UART0 is connected to the LCD display to send the position data of the stage boom to the LCD display. The microcontroller uses its SMBUS interface to connect to the E2PROM (FM24C64 iron memory) with an I2C bus interface, and stores the field data in the memory so that the current position of the boom can be read when it is powered on again after power failure, and the movement of the boom can be continuously controlled; at the same time, its ordinary I/O port is connected to the network card chip RTL8019 and the FPGA controller to realize data transmission and reception.
2.3 Design of FPGA Controller
The FPGA controller is implemented using the EDA method, and is mainly used to count the pulses from the Hall sensor and control the motor. Since the pulse frequency generated during the boom movement is high and the number of pulses counted by the FPGA controller is large, this design chooses a high-capacity, high-performance programmable logic device, namely the FLEX 10K series FPGA from ALTERA.
2.3.1 Module Division of FPGA Controller
According to the system function requirements, the top-level module of the FPGA controller is divided into the following four modules: two 5-32 decoders, eight-way AND gate module, eight-way 16-bit reversible parallel counting module, and motor control module, as shown in Figure 3.
The function of the two 5-32 decoder modules is to provide an interface with the microcontroller and realize programmable interface logic. The eight-way counting module (COUNTER8_FILE_LAST module) includes eight single-way counting modules, data conversion modules, etc. Its function is to reversibly count the eight-way pulse signals from the Hall sensor and complete the conversion between 16-bit data and 8-bit data. Since the data length of the C8051F020 microcontroller is 8 bits, and the counting module completes 16-bit counting, the number of data bits must be converted.
2.3.2 Functional Simulation of FPGA Module
The FPGA controller is designed and synthesized using the FLEX10K10 chip of ALTERA Company in MAX+PLUSII software. According to the above module division, the simulation waveform in MAX+PLUSII is shown in Figure 4.
3 Software Design of Stage Boom Controller
The software of the stage boom controller mainly includes: main program, UDP data transmission and parsing program, serial port data sending program, data storage program, etc.
3.1 Communication protocol design
In the stage boom control system, the remote control terminal uses the UDP/IP protocol through the local area network to send commands to the stage boom controller and receive data packets from the controller. The format of the UDP/IP data packet is as follows:
When using this protocol, command information and status data are in the UDP DATA area. In order to achieve the control purpose, a protocol must be formulated for the data in this data area. The protocol format is shown in Table 1.
Table 1 Protocol format
[page]
3.2 Main program design
The main program mainly completes the initialization of the microcontroller and each functional module, calls each functional module and controls the FPGA controller. Due to space constraints, only the flow chart of the main program is given, as shown in Figure 5.
4 Reliability Design
4.1 Compensation method for errors caused by motor inertia
In the motor drive system, the inertia of the motor must be considered in order to compensate for the error in time. In the current system, most of them use a first-order or second-order function to approximate the inertia of the motor. However, this system uses the method of manually inputting the compensation coefficient Q at the remote control end to achieve error compensation. The measurement of the compensation coefficient Q here can be carried out during rehearsal.
When the system is working, the remote control end needs to set the position to which the road sign is to run, that is, the final count value and the error compensation coefficient. When the compensation coefficient measurement command is received, the control system will start to measure the compensation coefficient Q. Here, it is assumed that the input end position value is S1 and the actual end position value is S2, then Q=(S2-S1)/S1×100% (due to the large-scale effect of inertia, S2>S1). Then the control system sends this error compensation coefficient Q back to the remote controller and stores it in the memory. When the boom is actually moving, the control system will perform error compensation on the input value, that is: the actual operation end value S=input value S1-input value S1×Q. The motor inertia obtained by this method is very accurate.
4.2 Anti-interference design of the system
In order to ensure that the stage boom controller can operate reliably for a long time, the system has taken effective anti-interference measures in both hardware and software. In terms of hardware, the main methods adopted are 3.3V power supply and 5V power supply isolation (they are isolated from electromagnetics) and "watchdog". Power supply isolation can effectively prevent power supply level instability and other electrical appliances from interfering with the controller, ensuring the stability of the system; "watchdog" can ensure the normal operation of the program and the reliability of the system. In terms of software, methods such as software traps are adopted.
The large-scale stage control system developed before the trip uses 8044 single-chip microcomputer to complete data processing and counting functions, and uses BitBusU bus to complete communication functions. Since the single-chip microcomputer has very heavy tasks, pulse loss and slow system response speed often occur in practical applications. This design uses EDA technology to implement the stage boom controller with CYGNAL single-chip microcomputer and FPGA, and UDP/IP protocol to realize communication within the local area network, solving the above problems. The on-site application of the stage control system shows that the performance of the boom controller fully meets the requirements.
Previous article:Design of communication system between single chip microcomputer and digital signal processor based on CAN bus
Next article:An embedded video switcher implemented by a single chip microcomputer
Recommended ReadingLatest update time:2024-11-16 21:23
- Popular Resources
- Popular amplifiers
- Analysis and Implementation of MAC Protocol for Wireless Sensor Networks (by Yang Zhijun, Xie Xianjie, and Ding Hongwei)
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- MATLAB and FPGA implementation of wireless communication
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
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
- EuroPython will be held online on July 26, 2021
- [RISC-V MCU CH32V103 Review] Real-time marking of file creation time
- Use itop4412 development board to compile driver module separately
- Diodes and Potentials
- Problems with making the digital tubes flash simultaneously
- EEWORLD University ----TI Precision Labs - Operational Amplifiers: 15 Comparator Applications
- system console
- STM32MP157A-DK1 Evaluation (5) STM32MP Linux System Boot Process
- How to combine the main program + boot program into one configuration for the programmer when programming Renesas chip with PG-FP5
- E220-400TBL-01 lora module wireless test board + 02Lora learning