- Home >> Technical Service >> MCU
Single-chip air pressure detection system
Design of air pressure detection system based on single chip microcomputer
In the past, our country used the imported full static pressure system in-situ detector to detect the air pressure of the aircraft. These detectors are general-purpose equipment developed in the 1970s. They have a single purpose and cannot meet the inspections of various instruments and sensors on the aircraft, and cannot perform quantitative performance inspections. With the development of sensor intelligent technology, the introduction of function chain neural network (FLANN) and data fusion technology has realized the nonlinear correction and temperature compensation of sensors. Taking the single-chip microcomputer as the core, a detection system is constructed. The function and accuracy of the air pressure detection device developed based on this method are greatly improved.
1. Air pressure detection system hardware
The block diagram of the hardware part of the system is shown in Figure 1. It is composed of five parts: power supply, pressure sensor, embedded microprocessor system, vacuum pressure pump unit, gas circuit and control combination switch, among which the embedded microprocessor system is composed, as shown in Figure 2. When the pressure sensor senses the external pressure, after frequency/digital (F/D) conversion and analog/digital (A/D) conversion, the result is collected by the main microprocessor, and after calculation, compensation, correction and filtering, the result is displayed The interface is delivered to the display. At the same time, the synchronization interface of the communication processor is used to synchronize the data and the data of the downlink command. The collection of the touch keyboard interface and data collection are also carried out by the main processor, so that the user can change the display content through the keyboard. Data calculation method, instrument operation status, etc. The communication processor is used to realize the RS-232 communication interface function, the optional IEFE-488 instrumentation (GP1B) bus interface function, and the optional configuration printer interface function. Accept the downloaded information.
1.1 Processor unit
The main processor selects MCS-51 single-chip microcomputer series 8031 to form the minimum application system. A piece of 27512 (64K8) EPROM and a piece of 6264 (8K8) RAM are used as the program memory and data memory for the external expansion memory. A piece of ATMEL company's ATF16V8PLD device is used to design the address decoder, which realizes the function that the traditional design method needs multi-chip or multi-level decoding to complete.
The communication processor adopts the MCS-51 single-chip microcomputer series 8751, which is used to realize the RS-232 communication interface function, the IEEE-488 instrumentation (GPIB) bus interface function, and the printer printing interface function. The RS232 interface uses MAX202 receiver/transmitter from MAXIM Company. 8255 is selected for the printer interface, and data printing is realized through parallel I/O expansion. When communicating with the main processor, the DS1609 chip is used to realize the batch data exchange between the main processor and the communication processor, which realizes the separation of data transmission and data processing functions, makes them perform their own duties, and ensures the real-time performance of the system. It also effectively solves the addressing problem of the upper computer to the lower computer.
1.2 Sensors
The pressure sensor used in the instrument is a resonant cylinder pressure sensor with high precision (0.02%-0.007% FS) and high stability (0.01% FS per year). Its working principle is shown in Figure 3: (1) Composition: The resonance cylinder is made of special constant elastic material with a wall thickness of 0.08mm. The material of the outer protective cylinder is similar to that of the resonant cylinder. A piezoceramic disc is used to excite and pick up the resonant rate of the cylinders, with a high vacuum between the two cylinders. (2) Principle: The pressure to be measured is passed inside the resonant cylinder, so that the resonant cylinder is subjected to a tension force. Different pressures and different tension forces have different natural frequencies. An electromechanical closed oscillator (positive feedback) is formed by using an amplifier, an exciting (pick-up) vibration element and a cylinder. They resonate at the natural frequency point of the lowest resonance level and output. That is to say, different pressures correspond to different frequencies, and the pressure can be known by measuring the frequency. Since the outside of the vibrating cylinder is vacuum, the measured pressure is absolute pressure. (3) Features: The resolution of the sensor is very high, corresponding to the pressure range of 10-1070hPa, the output change is 350,000 words, that is, each word corresponds to 0.1Pa, and the output change is 70-750,000 words corresponding to 10-3400hPa. Are in the 1 ~ 3 / million. It adopts constant elasticity and undergoes multiple aging chemical treatments, so it has good long-term stability and even better short-term stability.
1.3 Interface technology
(1) F/D (frequency/digital) conversion interface: Since the output of the sensor is frequency (period value), an ASIC chip (FDC9201) that converts frequency into digital is used. The input and output ports of FDC9201 are compatible with TTL/CMOS; the sampling cycle is divided into 4 levels according to the input high-frequency clock; the conversion accuracy varies between 0.1% and 0.001% depending on the situation; it has F/D self-test function; single +5V power supply. FDC9201 has four sets of independent low-frequency 12-bit binary counters and a set of high-frequency 20-bit high-speed synchronous counters, all of which are cycle counters. The low-frequency counter is connected with the data bus through the buffer, and the high-frequency counter is connected with the data bus through the latch. The synchronous controller is the core part of the chip. It is used for synchronous counting control, and ensures that the high-frequency count value of the latch is an integer multiple corresponding to the measured cycle, and at the same time generates an RDY signal to notify the CPU that the high-frequency and low-frequency data have been completed. Ready to read. In addition, there is a standard sampling cycle controller, which is used to generate four grades of standard timing cycles, and use IN-TR as a timing signal to notify the CPU. The length of the cycle depends on the external clock CLK.
(2) A/D (analog/digital) conversion interface: Although the temperature coefficient of the sensor is very small, one millionth per degree, it is still not negligible for high precision, so the sensor is added Temperature sensor (AD590JH), the temperature sensor has a linearity of 0.1%, which is converted into a voltage signal of 0-5V by the amplifier, and then converted by 12-bit A/D, and the temperature compensation of the vibration cylinder is carried out by the CPU. Within the range (military products: -55°C ~ 85°C, civilian products 0°C ~ 50°C), the instrument can guarantee the accuracy mentioned above without any correction.
(3) Keyboard display control interface: The system selects 8279 chip as the touch keyboard interface, and completes the scanning work of the touch keyboard by programming it, and the user can change the display content, data calculation method, instrument operation status, etc. by touching the keyboard. In addition, the user can also perform nonlinear correction on the current data through the data keypad. The system adopts VFD fluorescent digital tube display, the visible size is 150×35mm, and the display content is divided into two rows, upper and lower, with 20 characters in each row, generally composed of three parts: “parameter symbol + parameter value + unit”. When there are three parameters, the upper row is Pt or Ps, and the lower row shows the relative sensor cycle value (μs) and temperature voltage value (V).
2. Main features of air pressure detection system
(1) Can independently measure and display the following parameters: Ps, Pt, Qc, H, Vi, Vt, M, Mi, ΔH, H and other 10 kinds of parameters combined display, such as: Ps+H, Ps+Pt, H+H, H+M, Qc+Mi, H+Vt, Qc+Vi, etc.
(2) When testing the airtightness of the static pressure system and the total pressure system of the aircraft, the instrument provides precise timing and standard measurement parameters. The timing and test points can be set by the user (password protection by designated personnel) , and can be stored for a long time (ten years), and can perform sound prompts and parameter display, and simultaneously display the set value and timing value. When the set timing time is up, the time, pressure change value or altitude change value will stop changing, and an audible reminder will be issued.
(3) This instrument not only compares its flight atmospheric parameters with the instruments on the aircraft to check the consistency and validity in the in-situ detection, but also can be used as a standard for infield detection of flight parameters.
(4) This instrument can be used in both the outfield and the infield (repair shop), mainly in the outfield. However, its technical parameter indicators have reached the technical indicators of ZHY-type flight atmospheric parameter comprehensive tester and GCY-1A high-precision comprehensive tester. The air path control combination switch of this instrument can control the detection of any flight air pressure instrument and sensor.
(5) Sensor correction function: Any sensor has long-term stability problems. This correction function is specially designed for the convenience of users. It can be done as long as the user has pressure conditions. The instrument has two correction functions, namely linear correction and non-linear correction, which are password protected.
(6) Modification function of air pressure in-situ detection parameters: parameters such as pressure air tightness timing time, pressure air tightness inspection test pressure, maximum allowable value of pressure leakage, maximum allowable value of vacuum pressure change speed, etc. can be modified. Since the above parameters are different for different aircrafts, users or qualified persons are allowed to modify them and have password protection.
(7) With multiple protection functions: power supply 27V, reverse polarity protection; lifting speed protection, prevent overshoot, overshoot alarm; airspeed protection, prevent overvoltage, overvoltage alarm; air tightness There is an alarm prompt when the air leakage is out of tolerance; the connection switch Kst, the lifting speed setting value switch Pv and the maximum pressure value setting switch Pc are reminded by a white alarm circle, special attention should be paid to the operation, do not operate casually, the alarm mode has sound, Light display, flashing, etc.
(8) Self-inspection function: Automatically detect EPROM, SRAM, EEPROM, F/D, A/D, sensors, etc. when power on, with fault location function.
(9) Adaptive function for wide power supply changes: the 27V DC power supply in the external field has a large range of changes, so this instrument provides a wide input voltage range: it can work normally at 20-36V.
3. Design of air pressure detection system software
3.1 Software functions and block diagram
In terms of software programming, it is written in PLM assembly language, which can operate the hardware, is easy to improve and expand, has strong readability, reliability, and structure, and can provide users with high-quality conversion codes. Functionally, the program is divided into six parts: the main control program, the initialization program, the frame diagram of the data acquisition map 4 software system and the calculation program, the keyboard interrupt service program, the display program, and the self-test program.
The main control program is the backbone of the whole program, and the system usually runs in the main program cycle. After receiving the keyboard interrupt signal, it turns to execute the corresponding interrupt service routine for data acquisition and pressure conversion. In addition, the main control program also completes the initialization and self-test tasks of 8279, timer, etc. The sampling interrupt service program has the highest priority, and the sampling period is 52.4288ms. After responding to the interrupt, the calculation of the sampling period is first completed, and then the period is calculated, so that the pressure value is obtained for use by various flight parameters.
The self-inspection program detects the CPU, external RAM, F/D, and sensors. If there is a fault, the display window will report fault location information for maintenance personnel to troubleshoot. "CPUERR" means CPU fault, "RAMERR" means external RAM fault, " "F/DERR" means F/D failure, "SENERR" means sensor failure. When the MCU responds to the 8279 keyboard interrupt, the program first analyzes the key, obtains the key value, and transfers to the corresponding parameter calculation program. At the same time, it continuously accepts the pressure value of the F/D sampling interruption to calculate the flight parameter. The flight parameters to be calculated are: altitude (H), ascending and descending speed (H′), Mach number (M), indicated airspeed (Vi), and true airspeed (Vt). In terms of memory address allocation, the program memory 27512 is 0~3FFFH, and the data memory 6264 is 8000~9FFFH. In terms of interrupt distribution, F/D sampling interrupt priority is high, timer timing interrupt priority is low, and 8279 keyboard interrupt priority is low.
3.2 Data collection and calculation program compilation
In the data acquisition and calculation program, the data acquisition and storage are mainly realized, and the data fusion technology based on the function chain neural network is used to linearize the data and perform temperature compensation.
The program mainly includes the following parts:
(1) String conversion. This part of the program includes functions such as data comparison, binary to string and string to hexadecimal. By calling this program in the following programs, table lookup, data comparison and measurement data storage are realized.
(2) Data collection. Store the collected period values, call the pressure calculation program to solve the pressure, and convert the calculation results into strings and store them in the data memory.
(3) Calculate the pressure according to the fitting formula. Substitute the obtained cycle and temperature values into the formula calculation, and realize the nonlinear correction and temperature compensation of the pressure at the same time.
(4) Look up the table to calculate the temperature. The temperature value of the sensor during measurement is calculated according to the look-up table method.
(5) Solve the height, Mach number, vacuum number, etc. according to the pressure. Get the pressure value Pt, and then solve other atmospheric parameters according to the Pt value: barometric altitude H, true air velocity Vt, indicated air velocity Vi, Mach number M, indicated Mach number Mi, and ascending and descending speed H, etc.
(6) Sensor calibration. The user only needs to have a pressure reference with an accuracy higher than 0.02% to perform regular calibration on the equipment. The equipment provides sensor linearity and nonlinear correction functions. The user only needs to input 10, 50, 150, 200, 250, 300 at different temperatures , 350, 400, 450, 500, 550, 600, 650, 700, 750, 800, 850, 900, 950, 1025, 1045, 1070 A total of 22 pressure values, the sensor can be nonlinearly corrected.
The above are the details of the design technology of the single-chip microcomputer-based air pressure detection system introduced by Shenzhen Zuchuang Microelectronics Co., Ltd. We have rich experience in customized development of smart electronic products, can evaluate the development cycle and IC price as soon as possible, and can also calculate the PCBA quotation. We are the agent of Sonix MCU and Yingguang MCU agent, selling and developing MCU and voice IC solutions of Sonix and Yingguang. We act as an agent and develop ICs and solutions of Jieli, Ankai, Quanzhi, realtek and other series, and also develop BLE Bluetooth IC, dual-mode Bluetooth module, wifi module, and Internet of Things module. We have hardware design and software development capabilities. Covering circuit design, PCB design, single-chip microcomputer development, software custom development, APP custom development, WeChat official account development, voice recognition technology, Bluetooth development, wifi technology, etc. It can also undertake the research and development of smart electronic products, the design of household appliances, the development of beauty equipment, the development of Internet of Things applications, the design of smart home solutions, the development of TWS earphones, the development of Bluetooth earphone speakers, the development of children's toys, and the development of electronic education products.
- TOP