Design of embedded data recording equipment for short-range wireless communication
Design of embedded data recording equipment for short-range wireless communication. Black box is one of the more popular electronic recording equipment, which is widely used to record important data during the travel of aircraft, ships, automobiles, etc. in real time, including speed Baidu_ CLB_ singleFillSlot(24611); Black box is one of the more popular electronic recording devices, which is widely used to record important data in the moving process of aircraft, ships, cars and so on, including speed, direction, height, deflection angle, engine speed and temperature. Through these data, we can understand the situation in the operation process, and it is also an important basis for fault detection and analysis of accident causes. In the industrial field, common recorders include pressure recorders, temperature recorders, humidity recorders, etc., which are used to monitor the production environment in real time, so as to ensure effective and safe production
there are usually two ways to download the data of the recorder: through the transmission cable and through the plug-in memory card. The former needs to connect cables, the latter needs to plug and unplug memory cards, and both require structural disassembly. However, in some application environments, the recorder is not easy to disassemble, especially in some highly radioactive industrial sites, and it is not suitable for long-term close contact. In addition, these two methods may reduce the reliability of the system to a certain extent
according to the data recording requirements of electronic equipment in an industrial field, this paper proposes a data recording equipment based on short-range wireless communication. The device downloads data in the form of infrared or Bluetooth. Compared with the traditional data download method, it does not need to disassemble the connecting cable of the device or plug and unplug the memory card when downloading data, and reduces the possible contact failure caused by connecting and plugging the memory card
1 design requirements
in the working process of electronic equipment in an industrial site, the recording system is required to be able to record all kinds of electrical signals and their working sequence of the equipment in real time, which is used for the analysis of equipment operation status, troubleshooting and positioning afterwards. The signal packets that need to be collected and recorded in real time have better improved the satisfaction of new and old customers, including 2-channel ARINC429 signal, 10 channel TTL digital signal and 16 channel analog signal. The sampling frequency should be greater than or equal to 1 kHz, and the recording time should be about 1 h. According to the number of signal channels, data acquisition rate and data recording time, it can be estimated that the storage capacity of the recording system should be greater than 500 MB. Generally, the internal storage space of microprocessor is limited, so it is necessary to store the collected data in the external memory with large storage capacity and non-volatile. This system uses the 1 GB industrial CF card of SanDisk company as the storage device
2 overall design scheme of the system
the system adopts the scheme of DSP and FPGA coordinated control. The overall design scheme is shown in Figure 1. DSP mainly completes the real-time data acquisition and control, FPGA data transmission, and data transmission with wireless communication module; FPGA realizes the logical timing control of data cache and reading and writing CF card
dsp is the main controller. The 16 bit fixed-point DSP chip TMS320F240 of TI company is selected. Its instruction cycle is 50 ns, with 544 word ram, 224k word addressable storage space, double 10 bit a/D converter, 28 independently programmable multiplexed I/O pins, an asynchronous serial communication port (SCI), and a synchronous serial communication port (SPI). Its internal resources can meet the system's requirements for TTL signal and analog signal acquisition. Through external ARINC429, infrared and Bluetooth special interface chips, ARINC429 data signal acquisition and two wireless communication modes are realized
fpga is an auxiliary controller, whose core is FIFO and logic control circuit, which is used to complete the data transmission between DSP and CF card. FPGA chip ep2c20q240c8 of cycloneli series of Altera company is selected. It has 142 user usable I/O pins, 52 m4k embedded array blocks and 18752 logic units. The abundant internal resources of DSP and FPGA meet the needs of system design
the system mainly includes two functions: data storage and data download:
① data storage. DSP realizes the real-time acquisition of two ARINC429 signals, 16 analog signals and 10 digital signals, and stores the data in the FIFO of FPGA in real time. When a certain amount of data is stored in FIFO, FPGA control logic circuit automatically writes the data in FIFO into CF card
② data download. First, DSP sets the Bluetooth and infrared modules of the system as slave devices. After receiving the connection request from the ground equipment with Bluetooth or infrared interface held by the staff, authenticate it first, and then establish a connection with it. Then, the FPGA control logic circuit reads out the data in the CF card and stores it in the FIFO. The DSP sends the data in the FIFO to the ground equipment through the wireless communication module through query or interrupt
3 design of each functional module
3.1 design of FPGA functional module
using FPGA to realize asynchronous FIFO module and CF card reading and writing module is the focus and difficulty of this design
3.1.1 asynchronous FIFO module
data recording equipment has strong real-time performance and large amount of data. In order to improve the speed of data transmission and avoid data congestion, an asynchronous FIFO module with a width of 16 bits and a depth of 512 is built inside the FPGA, which is used as the relay station for data transmission between DSP and CF card
the structure diagram of asynchronous FIFO is shown in Figure 2. It includes four modules: data storage module, write address generation module, read address generation module and flag bit generation module. The reading and writing of FIFO adopts two clocks: read clock and write clock. The read clock synchronization signal includes the read request and read address generated by the read address generation module. Write enable and read enable are generated by DSP and FPGA data transmission control logic and CF card read-write control logic respectively. The preset reciprocating times flag bit generation module generates FIFO storage status flags by slowly opening the oil delivery valve to read and write the address relationship, and feeds them back to the host DSP. DSP controls the data transmission with FPGA by querying this flag
3.1.2 CF card reading and writing module
CF card reading and writing module is divided into CF card reading control module and CF card writing control module. The design of CF card read or write module is similar. Here we only introduce the working process of writing CF card
first, set the CF card's attribute register. The CF card has four attribute registers. Usually, you only need to set the configuration selection register to select the read-write mode of the CF card. There are three reading and writing modes of CF card: I/O mode, memory mode and true ide mode. This design uses 16 bit memory mode to read and write CF card. Memory mode is the default read-write mode of CF card, so it is not necessary to set the configuration attribute register during CF card initialization
secondly, set the task file register of the CF card. The task file registers used in this design include: data register, sector number register, sector number register, low cylinder number register, high cylinder number register, drive selection/head register and status/command register. To set them, you can select the sector addressing mode, set the number of sectors and logical addressing address for each read and write, obtain the CF card status and input the read and write command
the addressing mode of CF card is similar to the hard disk operation mode of computer. There are two addressing modes of sectors: physical addressing mode (CHS) and logical addressing mode (LBA). This design uses LBA addressing, corresponding to 28 bit LBA address. The head register stores 27 ~ 24 bits of LBA address; The cylinder number register stores 23 ~ 8 bits of LBA address; The sector number register stores 7 ~ 0 bits of LBA address
Copyright © 2011 JIN SHI