Design of stage boom controller based on single chip microcomputer and FPGA

Publisher:as8849402Latest update time:2011-12-13 Keywords:MCU Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.

Design of stage boom controller based on CYGNAL single chip microcomputer and FPGA

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.

Design of stage boom controller based on CYGNAL single chip microcomputer and FPGA

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.

Design of stage boom controller based on CYGNAL single chip microcomputer and FPGA

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.

Design of stage boom controller based on CYGNAL single chip microcomputer and FPGA

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.

Design of stage boom controller based on CYGNAL single chip microcomputer and FPGA

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.

Keywords:MCU Reference address:Design of stage boom controller based on single chip microcomputer and FPGA

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

[MCU framework][bsp layer][nrf51822][nrf51422][nrf51802][bsp_key] KEY configuration and use
The basic principle of keystroke is to set the MCU IO port (PB0-PB3) to input state, such as DDRB = 0XF0 (direction register, "1" is output, "0" is input); The microcontroller always detects the status of the button port (PB0-PB3). When the port is at a low level (that is, the button is pressed), it performs the cor
[Microcontroller]
Design and experiment of MCU music program
Using a single-chip microcomputer (or single-board computer) to play music is probably one of the issues that radio enthusiasts are interested in. This article starts with the basic experiment of single-chip microcomputers, discusses the design principles of music programs, and gives specific examples for reference. 1
[Microcontroller]
Research and design of ultrasonic distance measurement system based on single chip microcomputer
In daily production and life, many occasions such as car reversing, robot obstacle avoidance, industrial well logging, reservoir level measurement, etc. require automatic non-contact distance measurement. Ultrasonic waves refer to mechanical shock waves with a frequency greater than 20 kHz generated in elastic media
[Microcontroller]
LED digital large screen display system based on single chip microcomputer
1 Introduction LED display is a new type of information display media that has developed rapidly in the world in the late 1980s and is increasingly widely used. The ATMEGA16L microcontroller is a low-power CMOS 8-bit microcontroller based on AVRRISC, with 16K bytes of self-programmable FLASH, 512 bytes of EEPRO
[Power Management]
LED digital large screen display system based on single chip microcomputer
Application of magnetostrictive displacement sensor based on single chip microcomputer
Introduction Magnetostrictive displacement sensor is a displacement sensor for high-precision, long-stroke absolute position measurement manufactured based on the principle of magnetostriction. It adopts a non-contact measurement method. Since the active magnetic ring used for measurement and the sensor itself
[sensor]
Application of magnetostrictive displacement sensor based on single chip microcomputer
How to exit sleep mode of PIC16C5X microcontroller
In some applications, the CPU only needs to work intermittently or process external events, and is usually in standby mode. The PIC16C5X microcontroller has a power-saving mode, the sleep (SLEEP) mode. In this mode, the oscillator driver stops working and the I/O port maintains the state before the SLEEP instruction
[Microcontroller]
How to exit sleep mode of PIC16C5X microcontroller
MCU reads 4*4 matrix keyboard
1. What is a matrix keyboard? A matrix keyboard is a keyboard group with a matrix-like layout used in external devices of a single-chip microcomputer. Since more external inputs are required during circuit design, controlling a single button would waste a lot of IO resources, so a matrix keyboard was created. Commonly
[Microcontroller]
MCU reads 4*4 matrix keyboard
Methods to Improve the Flash Erasing Life of MSP430G MCU
In embedded design, many application designs need to use EEPROM to store non-volatile data. Due to cost reasons, some microcontrollers do not have EEPROM integrated inside the chip. The MSP430G series processors are low-cost 16-bit processors launched by TI. There is no EEPROM in the MSP430G series microcontrollers. I
[Microcontroller]
Methods to Improve the Flash Erasing Life of MSP430G MCU
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号